lkml.org 
[lkml]   [2020]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch V2 7/7] x86/kvm/vmx: Use native read/write_cr2()
From: Thomas Gleixner <tglx@linutronix.de>

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: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kvm/vmx/vmx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6683,13 +6683,13 @@ static noinstr void vmx_vcpu_enter_exit(
else if (static_branch_unlikely(&mds_user_clear))
mds_clear_cpu_buffers();

- if (vcpu->arch.cr2 != read_cr2())
- write_cr2(vcpu->arch.cr2);
+ if (vcpu->arch.cr2 != native_read_cr2())
+ native_write_cr2(vcpu->arch.cr2);

vmx->fail = __vmx_vcpu_run(vmx, (unsigned long *)&vcpu->arch.regs,
vmx->loaded_vmcs->launched);

- vcpu->arch.cr2 = read_cr2();
+ vcpu->arch.cr2 = native_read_cr2();

/*
* VMEXIT disables interrupts (host state), but tracing and lockdep
\
 
 \ /
  Last update: 2020-07-08 21:54    [W:0.096 / U:2.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site