From: Tycho Andersen <tycho@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Ashish Kalra <ashish.kalra@amd.com>,
John Allen <john.allen@amd.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Ard Biesheuvel <ardb@kernel.org>,
Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>,
Kishon Vijay Abraham I <kvijayab@amd.com>,
Alexey Kardashevskiy <aik@amd.com>,
Nikunj A Dadhania <nikunj@amd.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Kim Phillips <kim.phillips@amd.com>,
Sean Christopherson <seanjc@google.com>,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH v1 1/2] x86/sev: Do not initialize SNP if missing CPUs
Date: Fri, 3 Apr 2026 11:52:09 -0600 [thread overview]
Message-ID: <ac_-Sfa6qAhdG8rR@tycho.pizza> (raw)
In-Reply-To: <20260403171833.GXac_2aVdvz9gTb_DL@fat_crate.local>
On Fri, Apr 03, 2026 at 07:18:33PM +0200, Borislav Petkov wrote:
> On Fri, Apr 03, 2026 at 08:31:24AM -0500, Tom Lendacky wrote:
> > > + if (!cpumask_equal(cpu_online_mask, cpu_possible_mask))
> >
> > If CONFIG_INIT_ALL_POSSIBLE is set, won't that set cpu_possible_mask to
> > include all CPUs up to NR_CPUS? That would result in this always failing.
Thanks, I didn't know about this config.
> Yah,
>
> sashiko gave another possible situation where this can fail:
>
> https://sashiko.dev/#/patchset/20260401143552.3038979-1-tycho%40kernel.org
> disabled ACPI MADT entries for hotplug
I suppose depends on how the firmware reasons about such things too.
But it seems like the suggestion of cpus_present_mask is right.
> > Not sure if this change is worth it.
>
> Well, it would save us a lot of effort if we can check at module load time
> whether some CPUs are offlined. A very simple use case:
>
> echo 0 > /sys/devices/system/cpu.../online
> modprobe ccp
This is how I was testing this, but I'll see about testing the ACPI
thing too.
Tycho
next prev parent reply other threads:[~2026-04-03 17:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 14:35 [PATCH v1 1/2] x86/sev: Do not initialize SNP if missing CPUs Tycho Andersen
2026-04-01 14:35 ` [PATCH v1 2/2] crypto/ccp: skip SNP_INIT if preparation fails Tycho Andersen
2026-04-01 14:39 ` Tycho Andersen
2026-04-03 13:33 ` Tom Lendacky
2026-04-01 14:35 ` [PATCH v1 2/2] crypto/ccp: Skip " Tycho Andersen
2026-04-03 13:31 ` [PATCH v1 1/2] x86/sev: Do not initialize SNP if missing CPUs Tom Lendacky
2026-04-03 17:18 ` Borislav Petkov
2026-04-03 17:52 ` Tycho Andersen [this message]
2026-04-03 19:53 ` Borislav Petkov
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=ac_-Sfa6qAhdG8rR@tycho.pizza \
--to=tycho@kernel.org \
--cc=Neeraj.Upadhyay@amd.com \
--cc=aik@amd.com \
--cc=ardb@kernel.org \
--cc=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=john.allen@amd.com \
--cc=kim.phillips@amd.com \
--cc=kvijayab@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.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