lkml.org 
[lkml]   [2023]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v3 10/18] x86/virt: KVM: Move VMXOFF helpers into KVM VMX
Date
On Fri, 2023-05-12 at 16:50 -0700, Sean Christopherson wrote:
> Now that VMX is disabled in emergencies via the virt callbacks, move the
> VMXOFF helpers into KVM, the only remaining user.
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>

Reviewed-by: Kai Huang <kai.huang@intel.com>

One nit ...

[...]


> static void vmx_emergency_disable(void)
> {
> int cpu = raw_smp_processor_id();
> @@ -753,7 +775,8 @@ static void vmx_emergency_disable(void)
> loaded_vmcss_on_cpu_link)
> vmcs_clear(v->vmcs);
>
> - __cpu_emergency_vmxoff();
> + if (__read_cr4() & X86_CR4_VMXE)
> + kvm_cpu_vmxoff();
> }

As replied to patch 3, is it better to move CR4.VMXE bit check before VMCLEAR
(can be done in either patch 3, or here)?


\
 
 \ /
  Last update: 2023-05-22 18:48    [W:0.221 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site