All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Chao Gao <chao.gao@intel.com>
Cc: maz@kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com,
	kevin.tian@intel.com, tglx@linutronix.de,
	John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
	Shaokun Zhang <zhangshaokun@hisilicon.com>,
	Qi Liu <liuqi115@huawei.com>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>,
	Thomas Richter <tmricht@linux.ibm.com>,
	Dave Chinner <dchinner@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 5/6] KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section
Date: Fri, 18 Feb 2022 18:34:44 +0000	[thread overview]
Message-ID: <Yg/mxKrB5ZoRBIG+@google.com> (raw)
In-Reply-To: <20220216031528.92558-6-chao.gao@intel.com>

On Wed, Feb 16, 2022, Chao Gao wrote:
> 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>
> ---

For the KVM bits,

  Reviewed-by: Sean Christopherson <seanjc@google.com>

Someone with more knowledge of the CPU hotplug sequences should really review this
too.

  reply	other threads:[~2022-02-18 18:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16  3:15 [PATCH v4 0/6] Improve KVM's interaction with CPU hotplug Chao Gao
2022-02-16  3:15 ` Chao Gao
2022-02-16  3:15 ` Chao Gao
2022-02-16  3:15 ` [PATCH v4 1/6] KVM: x86: Move check_processor_compatibility from init ops to runtime ops Chao Gao
2022-02-16  3:15 ` [PATCH v4 2/6] Partially revert "KVM: Pass kvm_init()'s opaque param to additional arch funcs" Chao Gao
2022-02-16  3:15   ` Chao Gao
2022-02-16  3:15   ` Chao Gao
2022-02-16  3:25   ` Anup Patel
2022-02-16  3:25     ` Anup Patel
2022-02-16  3:25     ` Anup Patel
2022-02-16 16:21   ` Claudio Imbrenda
2022-02-16 16:21     ` Claudio Imbrenda
2022-02-16 16:21     ` Claudio Imbrenda
2022-02-16 16:21     ` Claudio Imbrenda
2022-03-17 13:24   ` Suzuki Kuruppassery Poulose
2022-03-17 13:24     ` Suzuki Kuruppassery Poulose
2022-03-17 13:24     ` Suzuki Kuruppassery Poulose
2022-03-17 13:24     ` Suzuki Kuruppassery Poulose
2022-02-16  3:15 ` [PATCH v4 3/6] KVM: Provide more information in kernel log if hardware enabling fails Chao Gao
2022-02-16  3:15 ` [PATCH v4 4/6] KVM: arm64: Simplify the CPUHP logic Chao Gao
2022-02-16  3:15   ` Chao Gao
2022-03-17 17:36   ` Oliver Upton
2022-03-17 17:36     ` Oliver Upton
2022-03-17 17:36     ` Oliver Upton
2022-02-16  3:15 ` [PATCH v4 5/6] KVM: Rename and move CPUHP_AP_KVM_STARTING to ONLINE section Chao Gao
2022-02-18 18:34   ` Sean Christopherson [this message]
2022-02-16  3:15 ` [PATCH v4 6/6] KVM: Do compatibility checks on hotplugged CPUs Chao Gao
2022-03-17  9:15 ` [PATCH v4 0/6] Improve KVM's interaction with CPU hotplug Chao Gao
2022-03-17  9:15   ` Chao Gao
2022-03-17  9:15   ` Chao Gao
2022-03-17  9:15   ` Chao Gao

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=Yg/mxKrB5ZoRBIG+@google.com \
    --to=seanjc@google.com \
    --cc=chao.gao@intel.com \
    --cc=dchinner@redhat.com \
    --cc=john.garry@huawei.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuqi115@huawei.com \
    --cc=maz@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sumanthk@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tmricht@linux.ibm.com \
    --cc=will@kernel.org \
    --cc=zhangshaokun@hisilicon.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.