[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6b6ba1875251c5b92f509b6d379252d9674ba91a.camel@intel.com>
Date: Wed, 15 Mar 2023 01:30:35 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Christopherson,, Sean" <seanjc@...gle.com>
CC: "Gao, Chao" <chao.gao@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>, "bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH v2 05/18] x86/reboot: KVM: Disable SVM during reboot via
virt/KVM reboot callback
On Tue, 2023-03-14 at 17:47 -0700, Sean Christopherson wrote:
> > Also, personally I don't particularly like the middle state in patch 04:
> >
> > void cpu_emergency_disable_virtualization(void)
> > {
> > #if IS_ENABLED(CONFIG_KVM_INTEL)
> > - cpu_crash_vmclear_loaded_vmcss();
> > -#endif
> > + cpu_emergency_virt_cb *callback;
> >
> > - cpu_emergency_vmxoff();
> > + rcu_read_lock();
> > + callback = rcu_dereference(cpu_emergency_virt_callback);
> > + if (callback)
> > + callback();
> > + rcu_read_unlock();
> > +#endif
> > + /* KVM_AMD doesn't yet utilize the common callback. */
> > cpu_emergency_svm_disable();
> > }
> >
> > Which eventually got fixed up in patch 05:
> >
> > void cpu_emergency_disable_virtualization(void)
> > {
> > -#if IS_ENABLED(CONFIG_KVM_INTEL)
> > +#if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD)
> > cpu_emergency_virt_cb *callback;
> >
> > rcu_read_lock();
> > @@ -830,8 +830,6 @@ void cpu_emergency_disable_virtualization(void)
> > callback();
> > rcu_read_unlock();
> > #endif
> > - /* KVM_AMD doesn't yet utilize the common callback. */
> > - cpu_emergency_svm_disable();
> > }
> >
> > Could we just merge the two patches together?
>
> I'd prefer not to squash the two. I agree it's ugly, but I dislike converting
> VMX and SVM at the same time. I'm not totally opposed to moving everything in
> one fell swoop, but my preference is to keep them separate.
Sure.
Powered by blists - more mailing lists