[RFC PATCH] KVM: VMX: Always sync CR3 to VMCS in nested_vmx_load_cr3

Reto Buerki
2019-09-26T14:15:27Z

Required to make a Muen system work on KVM nested.

Signed-off-by: Reto Buerki <reet@codelabs.ch>
---
arch/x86/kvm/vmx/nested.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 41abc62c9a8a..101b2c0c8480 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -1008,6 +1008,8 @@ static int nested_vmx_load_cr3(struct kvm_vcpu *vcpu, unsigned long cr3, bool ne
}
}

+ vmcs_writel(GUEST_CR3, cr3);
+
if (!nested_ept)
kvm_mmu_new_cr3(vcpu, cr3, false);

--
2.20.1