Re: [PATCH v10 2/6] x86/sev: Initialize RMPOPT configuration MSRs

Borislav Petkov <[email protected]>
Newsgroups dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <20260721153225.GFal-RCQdG54tNiPGb@fat_crate.local>
On Tue, Jul 21, 2026 at 09:26:48AM -0500, Kalra, Ashish wrote:
> That's why v7 moved to a runtime check. In v11 (as i mentioned) this will be a small local helper,  it will also handles two things
> the cap-clear can't:
>   - a contiguous (non-segmented) RMP, where RMPOPT isn't usable even with X86_FEATURE_RMPOPT set.

That's the point of clearing the flag - to mark it non-usable.

>   - SNP being disabled at runtime (CC_ATTR_HOST_SEV_SNP).

Same as RMPOPT being not usable follows from disabled SNP.

>   static bool rmpopt_capable(void)
>   {
>         return cpu_feature_enabled(X86_FEATURE_RMPOPT) &&
>                cc_platform_has(CC_ATTR_HOST_SEV_SNP) &&
>                (rmp_cfg & MSR_AMD64_SEG_RMP_ENABLED) &&
>                rmp_segment_table;
>   }

But yes, this is a local helper so that's good enough.

We can always change it later if needed.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.