From: "Huang, Kai" <kai.huang@intel.com>
To: "Gao, Chao" <chao.gao@intel.com>,
"Yamahata, Isaku" <isaku.yamahata@intel.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"isaku.yamahata@gmail.com" <isaku.yamahata@gmail.com>,
"will@kernel.org" <will@kernel.org>, "Christopherson,,
Sean" <seanjc@google.com>
Subject: Re: [PATCH v2 05/19] KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section
Date: Thu, 1 Sep 2022 10:58:04 +0000 [thread overview]
Message-ID: <933858c97f69bcf6fb00ea5dcb2ec9fa368eced3.camel@intel.com> (raw)
In-Reply-To: <YxBOoWckyP1wvzMZ@gao-cwp>
On Thu, 2022-09-01 at 14:18 +0800, Gao, Chao wrote:
> On Tue, Aug 30, 2022 at 05:01:20AM -0700, isaku.yamahata@intel.com wrote:
> > From: Chao Gao <chao.gao@intel.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@linutronix.de>
> > Signed-off-by: Chao Gao <chao.gao@intel.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?
--
Thanks,
-Kai
next prev parent reply other threads:[~2022-09-01 10:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 12:01 [PATCH v2 00/19] KVM hardware enable/disable reorganize isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 01/19] KVM: x86: Drop kvm_user_return_msr_cpu_online() isaku.yamahata
2022-09-01 5:29 ` Chao Gao
2022-09-01 14:12 ` Sean Christopherson
2022-09-01 17:49 ` Isaku Yamahata
2022-08-30 12:01 ` [PATCH v2 02/19] KVM: x86: Use this_cpu_ptr() instead of per_cpu_ptr(smp_processor_id()) isaku.yamahata
2022-09-01 5:56 ` Chao Gao
2022-08-30 12:01 ` [PATCH v2 03/19] KVM: x86: Move check_processor_compatibility from init ops to runtime ops isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 04/19] Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs" isaku.yamahata
2022-08-30 22:39 ` Huang, Kai
2022-09-01 18:01 ` Isaku Yamahata
2022-08-30 12:01 ` [PATCH v2 05/19] KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section isaku.yamahata
2022-09-01 5:59 ` Chao Gao
2022-09-01 6:18 ` Chao Gao
2022-09-01 10:58 ` Huang, Kai [this message]
2022-09-01 16:52 ` Isaku Yamahata
2022-08-30 12:01 ` [PATCH v2 06/19] KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 07/19] KVM: Add arch hooks for PM events with empty stub isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 08/19] KVM: x86: Move TSC fixup logic to KVM arch resume callback isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 09/19] KVM: Add arch hook when VM is added/deleted isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 10/19] KVM: Move out KVM arch PM hooks and hardware enable/disable logic isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 11/19] KVM: kvm_arch.c: Remove _nolock post fix isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 12/19] KVM: kvm_arch.c: Remove a global variable, hardware_enable_failed isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 13/19] KVM: Do processor compatibility check on cpu online and resume isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 14/19] KVM: x86: Duplicate arch callbacks related to pm events isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 15/19] KVM: Eliminate kvm_arch_post_init_vm() isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 16/19] KVM: x86: Delete kvm_arch_hardware_enable/disable() isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 17/19] KVM: Add config to not compile kvm_arch.c isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 18/19] RFC: KVM: x86: Remove cpus_hardware_enabled and related sanity check isaku.yamahata
2022-08-30 12:01 ` [PATCH v2 19/19] RFC: KVM: " isaku.yamahata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=933858c97f69bcf6fb00ea5dcb2ec9fa368eced3.camel@intel.com \
--to=kai.huang@intel.com \
--cc=chao.gao@intel.com \
--cc=isaku.yamahata@gmail.com \
--cc=isaku.yamahata@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox