Commit 2245d398 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Paolo Bonzini

x86/kvm/vmx: Use native read/write_cr2()

read/write_cr2() go throuh the paravirt XXL indirection, but nested VMX in
a XEN_PV guest is not supported.

Use the native variants.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Message-Id: <20200708195322.344731916@linutronix.de>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c3f08ed1
...@@ -6686,13 +6686,13 @@ static noinstr void vmx_vcpu_enter_exit(struct kvm_vcpu *vcpu, ...@@ -6686,13 +6686,13 @@ static noinstr void vmx_vcpu_enter_exit(struct kvm_vcpu *vcpu,
else if (static_branch_unlikely(&mds_user_clear)) else if (static_branch_unlikely(&mds_user_clear))
mds_clear_cpu_buffers(); mds_clear_cpu_buffers();
if (vcpu->arch.cr2 != read_cr2()) if (vcpu->arch.cr2 != native_read_cr2())
write_cr2(vcpu->arch.cr2); native_write_cr2(vcpu->arch.cr2);
vmx->fail = __vmx_vcpu_run(vmx, (unsigned long *)&vcpu->arch.regs, vmx->fail = __vmx_vcpu_run(vmx, (unsigned long *)&vcpu->arch.regs,
vmx->loaded_vmcs->launched); vmx->loaded_vmcs->launched);
vcpu->arch.cr2 = read_cr2(); vcpu->arch.cr2 = native_read_cr2();
/* /*
* VMEXIT disables interrupts (host state), but tracing and lockdep * VMEXIT disables interrupts (host state), but tracing and lockdep
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment