[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <79073b9c22cf60ac87896f0bbcdfd905196e1b4a.camel@intel.com>
Date: Mon, 22 May 2023 13:15:47 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"Christopherson,, Sean" <seanjc@...gle.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Gao, Chao" <chao.gao@...el.com>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>
Subject: Re: [PATCH v3 10/18] x86/virt: KVM: Move VMXOFF helpers into KVM VMX
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@...gle.com>
Reviewed-by: Kai Huang <kai.huang@...el.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)?
Powered by blists - more mailing lists