Re: [PATCH 1/3] x86/coco: Add CC_ATTR_GUEST_SEV

From: Borislav Petkov

Date: Wed Sep 09 2026 - 22:42:02 EST


On Mon, Aug 03, 2026 at 02:58:25PM +0200, Jörg Rödel wrote:
> From: Joerg Roedel <joerg.roedel@xxxxxxx>
>
> Add a new attribute to the CC platform code to check whether the
> kernel runs in an environment using SEV memory encryption. This will
> be used to establish the an sev/ directory in SYSFS (which is
> currently SEV-SNP-only).

Yeah, the initial intention for cc_plaform_has() is to use it in arch-agnostic
code and for something which you're going to use in coco code itself, you're
better off simply doing:

if (sev_status & MSR_AMD64_SEV_ENABLED)

I can fix that up when applying if you prefer - it is easy enough.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette