lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220901165240.GG2711697@ls.amr.corp.intel.com>
Date:   Thu, 1 Sep 2022 09:52:40 -0700
From:   Isaku Yamahata <isaku.yamahata@...il.com>
To:     "Huang, Kai" <kai.huang@...el.com>
Cc:     "Gao, Chao" <chao.gao@...el.com>,
        "Yamahata, Isaku" <isaku.yamahata@...el.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
        "will@...nel.org" <will@...nel.org>,
        "Christopherson,, Sean" <seanjc@...gle.com>
Subject: Re: [PATCH v2 05/19] KVM: Rename and move CPUHP_AP_KVM_STARTING to
 ONLINE section

On Thu, Sep 01, 2022 at 10:58:04AM +0000,
"Huang, Kai" <kai.huang@...el.com> wrote:

> On Thu, 2022-09-01 at 14:18 +0800, Gao, Chao wrote:
> > On Tue, Aug 30, 2022 at 05:01:20AM -0700, isaku.yamahata@...el.com wrote:
> > > From: Chao Gao <chao.gao@...el.com>
> > > 
> > > The CPU STARTING section doesn't allow callbacks to fail. Move KVM's
> > > hotplug callback to ONLINE section so that it can abort onlining a CPU in
> > > certain cases to avoid potentially breaking VMs running on existing CPUs.
> > > For example, when kvm fails to enable hardware virtualization on the
> > > hotplugged CPU.
> > > 
> > > Place KVM's hotplug state before CPUHP_AP_SCHED_WAIT_EMPTY as it ensures
> > > when offlining a CPU, all user tasks and non-pinned kernel tasks have left
> > > the CPU, i.e. there cannot be a vCPU task around. So, it is safe for KVM's
> > > CPU offline callback to disable hardware virtualization at that point.
> > > Likewise, KVM's online callback can enable hardware virtualization before
> > > any vCPU task gets a chance to run on hotplugged CPUs.
> > > 
> > > KVM's CPU hotplug callbacks are renamed as well.
> > > 
> > > Suggested-by: Thomas Gleixner <tglx@...utronix.de>
> > > Signed-off-by: Chao Gao <chao.gao@...el.com>
> > 
> > Isaku, your signed-off-by is missing.
> > 
> > > Link: https://lore.kernel.org/r/20220216031528.92558-6-chao.gao@intel.com
> > > ---
> > > include/linux/cpuhotplug.h |  2 +-
> > > virt/kvm/kvm_main.c        | 30 ++++++++++++++++++++++--------
> > > 2 files changed, 23 insertions(+), 9 deletions(-)
> > > 
> > > diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
> > > index f61447913db9..7972bd63e0cb 100644
> > > --- a/include/linux/cpuhotplug.h
> > > +++ b/include/linux/cpuhotplug.h
> > > @@ -185,7 +185,6 @@ enum cpuhp_state {
> > > 	CPUHP_AP_CSKY_TIMER_STARTING,
> > > 	CPUHP_AP_TI_GP_TIMER_STARTING,
> > > 	CPUHP_AP_HYPERV_TIMER_STARTING,
> > > -	CPUHP_AP_KVM_STARTING,
> > > 	CPUHP_AP_KVM_ARM_VGIC_INIT_STARTING,
> > > 	CPUHP_AP_KVM_ARM_VGIC_STARTING,
> > > 	CPUHP_AP_KVM_ARM_TIMER_STARTING,
> > 
> > The movement of CPUHP_AP_KVM_STARTING changes the ordering between
> > CPUHP_AP_KVM_STARTING and CPUHP_AP_KVM_ARM_* above [1]. We need
> > the patch [2] from Marc to avoid breaking ARM.
> > 
> > [1] https://lore.kernel.org/lkml/87sfsq4xy8.wl-maz@kernel.org/
> > [2] https://lore.kernel.org/lkml/20220216031528.92558-5-chao.gao@intel.com/
> 
> How about Isaku just to take your series directly (+his SoB) and add additional
> patches?

Ok will do.  Although I hoped to slim it down, I've ended up to take most of it.
four out of six.  Now why not two more.
-- 
Isaku Yamahata <isaku.yamahata@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ