mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'David Woodhouse' <dwmw2@infradead.org>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Usama Arif <usama.arif@bytedance.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"Phillips, Kim" <kim.phillips@amd.com>,
	"brgerst@gmail.com" <brgerst@gmail.com>,
	"Rapan, Sabin" <sabrapan@amazon.com>
Cc: "piotrgorski@cachyos.org" <piotrgorski@cachyos.org>,
	"oleksandr@natalenko.name" <oleksandr@natalenko.name>,
	"arjan@linux.intel.com" <arjan@linux.intel.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"paulmck@kernel.org" <paulmck@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"mimoja@mimoja.de" <mimoja@mimoja.de>,
	"hewenliang4@huawei.com" <hewenliang4@huawei.com>,
	"seanjc@google.com" <seanjc@google.com>,
	"pmenzel@molgen.mpg.de" <pmenzel@molgen.mpg.de>,
	"fam.zheng@bytedance.com" <fam.zheng@bytedance.com>,
	"punit.agrawal@bytedance.com" <punit.agrawal@bytedance.com>,
	"simon.evans@bytedance.com" <simon.evans@bytedance.com>,
	"liangma@liangbit.com" <liangma@liangbit.com>
Subject: RE: [PATCH v13 00/11] Parallel CPU bringup for x86_64
Date: Wed, 8 Mar 2023 12:15:56 +0000	[thread overview]
Message-ID: <5aef7e908e1d492386d568ef36b75493@AcuMS.aculab.com> (raw)
In-Reply-To: <ba8aae2eafdeb09ec1a41d45ab3c2e4cdaf7a28f.camel@infradead.org>

From: David Woodhouse
> Sent: 08 March 2023 09:05
...
> https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/parallel-6.2-v14
> 
> Looks like this:
> 
> /*
>  * We can do 64-bit AP bringup in parallel if the CPU reports its APIC
>  * ID in CPUID (either leaf 0x0B if we need the full APIC ID in X2APIC
>  * mode, or leaf 0x01 if 8 bits are sufficient). Otherwise it's too
>  * hard.
>  */
> static bool prepare_parallel_bringup(void)
> {
> 	bool has_sev_es = IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) &&
> 		static_branch_unlikely(&sev_es_enable_key);
> 
> 	if (IS_ENABLED(CONFIG_X86_32))
> 		return false;
> 
> 	/*
> 	 * Encrypted guests other than SEV-ES (in the future) will need to
> 	 * implement an early way of finding the APIC ID, since they will
> 	 * presumably block direct CPUID too. Be kind to our future selves
> 	 * by warning here instead of just letting them break. Parallel
> 	 * startup doesn't have to be in the first round of enabling patches
> 	 * for any such technology.
> 	 */
> 	if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT) || !has_sev_es) {
> 		pr_info("Disabling parallel bringup due to guest memory encryption\n");
> 		return false;
> 	}

That looks wrong, won't has_sev_es almost always be false
so it prints the message and returns?
Maybe s/||/&&/ ?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  parent reply	other threads:[~2023-03-08 12:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 11:12 Usama Arif
2023-03-02 11:12 ` [PATCH v13 01/11] x86/apic/x2apic: Allow CPU cluster_mask to be populated in parallel Usama Arif
2023-03-02 11:12 ` [PATCH v13 02/11] cpu/hotplug: Move idle_thread_get() to <linux/smpboot.h> Usama Arif
2023-03-02 11:12 ` [PATCH v13 03/11] cpu/hotplug: Add dynamic parallel bringup states before CPUHP_BRINGUP_CPU Usama Arif
2023-03-02 11:12 ` [PATCH v13 04/11] x86/smpboot: Reference count on smpboot_setup_warm_reset_vector() Usama Arif
2023-03-02 11:12 ` [PATCH v13 05/11] x86/smpboot: Split up native_cpu_up into separate phases and document them Usama Arif
2023-03-02 11:12 ` [PATCH v13 06/11] x86/smpboot: Remove initial_stack on 64-bit Usama Arif
2023-03-02 11:12 ` [PATCH v13 07/11] x86/smpboot: Remove early_gdt_descr " Usama Arif
2023-03-02 11:12 ` [PATCH v13 08/11] x86/smpboot: Remove initial_gs Usama Arif
2023-03-02 11:12 ` [PATCH v13 09/11] x86/smpboot: Support parallel startup of secondary CPUs Usama Arif
2023-03-02 11:12 ` [PATCH v13 10/11] x86/smpboot: Send INIT/SIPI/SIPI to secondary CPUs in parallel Usama Arif
2023-03-02 11:12 ` [PATCH v13 11/11] x86/smpboot: Serialize topology updates for secondary bringup Usama Arif
2023-03-07 14:42 ` [PATCH v13 00/11] Parallel CPU bringup for x86_64 David Woodhouse
2023-03-07 16:45   ` Tom Lendacky
2023-03-07 19:18     ` David Woodhouse
2023-03-07 20:06       ` Tom Lendacky
2023-03-07 22:22         ` Tom Lendacky
2023-03-07 22:27           ` David Woodhouse
2023-03-07 22:55             ` Tom Lendacky
2023-03-08  9:04               ` David Woodhouse
2023-03-08 11:27                 ` [External] " Usama Arif
2023-03-08 12:15                 ` David Laight [this message]
2023-03-08 12:19                   ` David Woodhouse
2023-03-08 14:10                 ` [External] " Usama Arif
2023-03-08 14:40                 ` Tom Lendacky
2023-03-07 23:35             ` Sean Christopherson
2023-03-08  7:38               ` David Woodhouse
2023-03-07 21:00       ` [External] " Usama Arif

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=5aef7e908e1d492386d568ef36b75493@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=arjan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=fam.zheng@bytedance.com \
    --cc=hewenliang4@huawei.com \
    --cc=hpa@zytor.com \
    --cc=kim.phillips@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=liangma@liangbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mimoja@mimoja.de \
    --cc=mingo@redhat.com \
    --cc=oleksandr@natalenko.name \
    --cc=paulmck@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=piotrgorski@cachyos.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=punit.agrawal@bytedance.com \
    --cc=rcu@vger.kernel.org \
    --cc=sabrapan@amazon.com \
    --cc=seanjc@google.com \
    --cc=simon.evans@bytedance.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=usama.arif@bytedance.com \
    --cc=x86@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

all inboxes | Powered by JetHome®