Message ID | 20250306003806.1048517-2-kim.phillips@amd.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | KVM: SEV: Add support for the ALLOWED_SEV_FEATURES feature | expand |
On 3/6/2025 1:38 AM, Kim Phillips wrote: > From: Kishon Vijay Abraham I <kvijayab@amd.com> > > Add CPU feature detection for "Allowed SEV Features" to allow the > Hypervisor to enforce that SEV-ES and SEV-SNP guest VMs cannot > enable features (via SEV_FEATURES) that the Hypervisor does not > support or wish to be enabled. > > Signed-off-by: Kishon Vijay Abraham I <kvijayab@amd.com> > Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> > Signed-off-by: Kim Phillips <kim.phillips@amd.com> Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com> > --- > arch/x86/include/asm/cpufeatures.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h > index 8f8aaf94dc00..6a12c8c48bd2 100644 > --- a/arch/x86/include/asm/cpufeatures.h > +++ b/arch/x86/include/asm/cpufeatures.h > @@ -454,6 +454,7 @@ > #define X86_FEATURE_DEBUG_SWAP (19*32+14) /* "debug_swap" SEV-ES full debug state swap support */ > #define X86_FEATURE_RMPREAD (19*32+21) /* RMPREAD instruction */ > #define X86_FEATURE_SEGMENTED_RMP (19*32+23) /* Segmented RMP support */ > +#define X86_FEATURE_ALLOWED_SEV_FEATURES (19*32+27) /* Allowed SEV Features */ > #define X86_FEATURE_SVSM (19*32+28) /* "svsm" SVSM present */ > #define X86_FEATURE_HV_INUSE_WR_ALLOWED (19*32+30) /* Allow Write to in-use hypervisor-owned pages */ >
On Wed, Mar 05, 2025 at 06:38:04PM -0600, Kim Phillips wrote: > From: Kishon Vijay Abraham I <kvijayab@amd.com> > > Add CPU feature detection for "Allowed SEV Features" to allow the > Hypervisor to enforce that SEV-ES and SEV-SNP guest VMs cannot > enable features (via SEV_FEATURES) that the Hypervisor does not > support or wish to be enabled. > > Signed-off-by: Kishon Vijay Abraham I <kvijayab@amd.com> > Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> > Signed-off-by: Kim Phillips <kim.phillips@amd.com> > --- > arch/x86/include/asm/cpufeatures.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h > index 8f8aaf94dc00..6a12c8c48bd2 100644 > --- a/arch/x86/include/asm/cpufeatures.h > +++ b/arch/x86/include/asm/cpufeatures.h > @@ -454,6 +454,7 @@ > #define X86_FEATURE_DEBUG_SWAP (19*32+14) /* "debug_swap" SEV-ES full debug state swap support */ > #define X86_FEATURE_RMPREAD (19*32+21) /* RMPREAD instruction */ > #define X86_FEATURE_SEGMENTED_RMP (19*32+23) /* Segmented RMP support */ > +#define X86_FEATURE_ALLOWED_SEV_FEATURES (19*32+27) /* Allowed SEV Features */ > #define X86_FEATURE_SVSM (19*32+28) /* "svsm" SVSM present */ > #define X86_FEATURE_HV_INUSE_WR_ALLOWED (19*32+30) /* Allow Write to in-use hypervisor-owned pages */ > > -- I guess this goes thru Sean: Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 8f8aaf94dc00..6a12c8c48bd2 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -454,6 +454,7 @@ #define X86_FEATURE_DEBUG_SWAP (19*32+14) /* "debug_swap" SEV-ES full debug state swap support */ #define X86_FEATURE_RMPREAD (19*32+21) /* RMPREAD instruction */ #define X86_FEATURE_SEGMENTED_RMP (19*32+23) /* Segmented RMP support */ +#define X86_FEATURE_ALLOWED_SEV_FEATURES (19*32+27) /* Allowed SEV Features */ #define X86_FEATURE_SVSM (19*32+28) /* "svsm" SVSM present */ #define X86_FEATURE_HV_INUSE_WR_ALLOWED (19*32+30) /* Allow Write to in-use hypervisor-owned pages */