Thread (1 message) 1 message, 1 author, 2021-01-07

Re: [PATCH v3 1/2] KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE

From: Bharata B Rao <hidden>
Date: 2021-01-07 04:10:43

On Wed, Jan 06, 2021 at 05:27:27PM -0300, Fabiano Rosas wrote:
Bharata B Rao [off-list ref] writes:
quoted
+
+long kvmhv_h_rpti_nested(struct kvm_vcpu *vcpu, unsigned long lpid,
+			 unsigned long type, unsigned long pg_sizes,
+			 unsigned long start, unsigned long end)
+{
+	struct kvm_nested_guest *gp;
+	long ret;
+	unsigned long psize, ap;
+
+	/*
+	 * If L2 lpid isn't valid, we need to return H_PARAMETER.
+	 *
+	 * However, nested KVM issues a L2 lpid flush call when creating
+	 * partition table entries for L2. This happens even before the
+	 * corresponding shadow lpid is created in HV which happens in
+	 * H_ENTER_NESTED call. Since we can't differentiate this case from
+	 * the invalid case, we ignore such flush requests and return success.
+	 */
So for a nested lpid the H_TLB_INVALIDATE in:

kvmppc_core_init_vm_hv -> kvmppc_setup_partition_table ->
kvmhv_set_ptbl_entry -> kvmhv_flush_lpid

has always been a noop? It seems that we could just skip
kvmhv_flush_lpid in L1 during init_vm then.
May be, but I suppose that flush is required and could be fixed
eventually.

Regards,
Bharata.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help