[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1d4f912292fbfb4f7d88940f22eb9fbcc582ba1.camel@intel.com>
Date: Thu, 10 Nov 2022 02:20:57 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "farman@...ux.ibm.com" <farman@...ux.ibm.com>,
"frankja@...ux.ibm.com" <frankja@...ux.ibm.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
"mjrosato@...ux.ibm.com" <mjrosato@...ux.ibm.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"chenhuacai@...nel.org" <chenhuacai@...nel.org>,
"aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
"palmer@...belt.com" <palmer@...belt.com>,
"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"maz@...nel.org" <maz@...nel.org>,
"anup@...infault.org" <anup@...infault.org>,
"imbrenda@...ux.ibm.com" <imbrenda@...ux.ibm.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"borntraeger@...ux.ibm.com" <borntraeger@...ux.ibm.com>,
"aleksandar.qemu.devel@...il.com" <aleksandar.qemu.devel@...il.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"atishp@...shpatra.org" <atishp@...shpatra.org>,
"farosas@...ux.ibm.com" <farosas@...ux.ibm.com>,
"david@...hat.com" <david@...hat.com>,
"Yao, Yuan" <yuan.yao@...el.com>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"alexandru.elisei@....com" <alexandru.elisei@....com>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>,
"kvmarm@...ts.linux.dev" <kvmarm@...ts.linux.dev>,
"james.morse@....com" <james.morse@....com>,
"kvm-riscv@...ts.infradead.org" <kvm-riscv@...ts.infradead.org>,
"suzuki.poulose@....com" <suzuki.poulose@....com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
"Gao, Chao" <chao.gao@...el.com>,
"oliver.upton@...ux.dev" <oliver.upton@...ux.dev>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH 38/44] KVM: Disable CPU hotplug during hardware enabling
On Thu, 2022-11-10 at 01:08 +0000, Huang, Kai wrote:
> > - WARN_ON(!irqs_disabled());
> > + /*
> > + * Compatibility checks are done when loading KVM and when enabling
> > + * hardware, e.g. during CPU hotplug, to ensure all online CPUs are
> > + * compatible, i.e. KVM should never perform a compatibility check
> > on
> > + * an offline CPU.
> > + */
> > + WARN_ON(!irqs_disabled() && cpu_active(cpu));
>
> Comment doesn't match with the code?
>
> "KVM should never perform a compatibility check on on offline CPU" should be
> something like:
>
> WARN_ON(!cpu_online(cpu));
>
> So, should the comment be something like below?
>
> "KVM compatibility check happens before CPU is marked as active".
Also ignore this one as I only thought about hotplug case.
Powered by blists - more mailing lists