[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39f23da7-1e77-4535-21a6-00f77a382ae5@amd.com>
Date: Tue, 7 Mar 2023 16:55:31 -0600
From: Tom Lendacky <thomas.lendacky@....com>
To: David Woodhouse <dwmw2@...radead.org>,
Usama Arif <usama.arif@...edance.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"Phillips, Kim" <kim.phillips@....com>,
"brgerst@...il.com" <brgerst@...il.com>,
"Rapan, Sabin" <sabrapan@...zon.com>
Cc: "piotrgorski@...hyos.org" <piotrgorski@...hyos.org>,
"oleksandr@...alenko.name" <oleksandr@...alenko.name>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"paulmck@...nel.org" <paulmck@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"rcu@...r.kernel.org" <rcu@...r.kernel.org>,
"mimoja@...oja.de" <mimoja@...oja.de>,
"hewenliang4@...wei.com" <hewenliang4@...wei.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>,
"fam.zheng@...edance.com" <fam.zheng@...edance.com>,
"punit.agrawal@...edance.com" <punit.agrawal@...edance.com>,
"simon.evans@...edance.com" <simon.evans@...edance.com>,
"liangma@...ngbit.com" <liangma@...ngbit.com>
Subject: Re: [PATCH v13 00/11] Parallel CPU bringup for x86_64
On 3/7/23 16:27, David Woodhouse wrote:
> On Tue, 2023-03-07 at 16:22 -0600, Tom Lendacky wrote:
>>
>> I did some Qemu/KVM testing. One thing I noticed is that on AMD, CPUID 0xB
>> EAX will be non-zero only if SMT is enabled. So just booting some guests
>> without CPU topology never did parallel booting ("smpboot: Disabling
>> parallel bringup because CPUID 0xb looks untrustworthy"). I would imagine
>> a bare-metal system that has diabled SMT will not do parallel booting, too
>> (but I haven't had time to test that).
>
> Interesting, thanks. Should I change to checking for *both* EAX and EBX
> being zero? That's what I did first, after reading only the Intel SDM.
> But I changed to only EAX because the AMD doc only says that EAX will
> be zero for unsupported leaves.
From a baremetal perspective, I think that works. Rome was the first
generation to support x2apic, and the PPR for Rome states that 0's are
returned in all 4 registers for undefined function numbers.
For virtualization, at least Qemu/KVM, that also looks to be a safe test.
Thanks,
Tom
>
>> I did have to change "vmgexit" to a "rep; vmmcall" based on my binutils
>> and the IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) change I mentioned before. But
>> with that, I was able to successfully boot 64 vCPU SEV-ES and SEV-SNP
>> guests using parallel booting.
>
> Thanks. I'll look at retconning that rework of can_parallel_bringup()
> out into a separate function, into the earlier parts of the series.
Powered by blists - more mailing lists