Re: [PATCH v3 10/18] x86/virt: KVM: Move VMXOFF helpers into KVM VMX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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

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)?






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux