Re: [PATCH v10 2/6] x86/sev: Initialize RMPOPT configuration MSRs
From: Kalra, Ashish
Date: Thu Jul 23 2026 - 02:53:13 EST
Hello Boris,
On 7/23/2026 12:14 AM, Borislav Petkov wrote:
> On Thu, Jul 23, 2026 at 10:23:56AM +0530, K Prateek Nayak wrote:
>> The offline cores will remain offline since hotplug is disabled. RMPOPT
>> is simply a performance optimization for RMP checks and leaving the
>> offline cores (that will never exit idle) unoptimized should be
>> acceptable.
>
> What happens if you boot with a subset of cores, the boot flow enables RMPOPT
> and then you online the rest?
>
> Have we tried that?
>
It can't happen here. snp_prepare() does the following, in order:
1. cpu_hotplug_disable() — freeze the CPU set.
2. fail SNP init (-EOPNOTSUPP) unless every present CPU is online (cpumask_equal(cpu_online_mask, cpu_present_mask).
3. enable SNP.
snp_setup_rmpopt() runs only after snp_prepare() succeeds, so all present CPUs are online and stay online (hotplug is
disabled). No core's primary thread can be offline at this point.
(The kexec path is the one exception — snp_prepare() returns early there — which I'm handling in the other thread.)
Thanks,
Ashish