Re: [PATCH 1/2] x86/sev: Clear RMPOPT when segmented RMP is disabled by firmware

From: Kalra, Ashish

Date: Tue Oct 13 2026 - 19:24:48 EST



On 10/13/2026 5:26 PM, Borislav Petkov wrote:
> On Tue, Oct 13, 2026 at 03:44:18PM +0000, Ashish Kalra wrote:
>> snp_probe_rmptable_info() only clears X86_FEATURE_RMPOPT when the platform
>> does not advertise X86_FEATURE_SEGMENTED_RMP, or when the segmented RMP
>> table probe fails. It misses the case where the platform advertises
>> segmented RMP but the firmware has it disabled (MSR_AMD64_RMP_CFG's
>> SEG_RMP_ENABLED bit is clear)
>
> What does that mean: "the platform advertises segmented RMP"?
>
> The CPUID bit is still set?

Yes, "Advertises" is the X86_FEATURE_SEGMENTED_RMP CPUID bit set. That's separate from segmented RMP being enabled,
which is MSR_AMD64_RMP_CFG[SEG_RMP_ENABLED] (0xc0010136, bit 0), programmed by firmware

>
> Or anything else?
>
> How do you create this configuration?

There is a BIOS option to enable/disable Segmented RMP. Disabling it on a part that supports/advertises segmented RMP
feature brings the RMP up contiguous (SEG_RMP_ENABLED clear) while the SEGMENTED_RMP CPUID bit stays set.

Thanks,
Ashish

>
> Thx.
>