]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: ccp - Add support for SNP_FEATURE_INFO command
authorAshish Kalra <ashish.kalra@amd.com>
Mon, 21 Jul 2025 14:13:10 +0000 (14:13 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 16 Aug 2025 09:20:23 +0000 (17:20 +0800)
commit33cfb80d1910b41d1a25cef89b159c945aff0f24
tree362055037887c50dfd425e409181cd2a1d740263
parent459daec42ea0cf5e276dfb82e90ed91e2db45d9e
crypto: ccp - Add support for SNP_FEATURE_INFO command

The FEATURE_INFO command provides hypervisors with a programmatic means
to learn about the supported features of the currently loaded firmware.
This command mimics the CPUID instruction relative to sub-leaf input and
the four unsigned integer output values. To obtain information
regarding the features present in the currently loaded SEV firmware,
use the SNP_FEATURE_INFO command.

Cache the SNP platform status and feature information from CPUID
0x8000_0024 in the sev_device structure. If SNP is enabled, utilize
this cached SNP platform status for the API major, minor and build
version.

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Reviewed-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/sev-dev.c
drivers/crypto/ccp/sev-dev.h
include/linux/psp-sev.h