diff options
author | Borislav Petkov (AMD) <bp@alien8.de> | 2023-02-15 11:01:42 +0100 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-03-13 11:20:20 +0100 |
commit | d6fd48eff7506bb866a54e40369df8899f2078a9 (patch) | |
tree | 0c43b93da1a1b330156173d0d12d70bebe9a488e /arch/x86 | |
parent | eeac8ede17557680855031c6f305ece2378af326 (diff) | |
download | linux-stable-d6fd48eff7506bb866a54e40369df8899f2078a9.tar.gz linux-stable-d6fd48eff7506bb866a54e40369df8899f2078a9.tar.bz2 linux-stable-d6fd48eff7506bb866a54e40369df8899f2078a9.zip |
virt/coco/sev-guest: Check SEV_SNP attribute at probe time
No need to check it on every ioctl. And yes, this is a common SEV driver
but it does only SNP-specific operations currently. This can be
revisited later, when more use cases appear.
No functional changes.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20230307192449.24732-3-bp@alien8.de
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/sev.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c index 679026a640ef..c644c34372e8 100644 --- a/arch/x86/kernel/sev.c +++ b/arch/x86/kernel/sev.c @@ -2183,9 +2183,6 @@ int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, unsigned struct ghcb *ghcb; int ret; - if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) - return -ENODEV; - if (!fw_err) return -EINVAL; |