diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2021-09-08 17:58:37 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-10-04 11:46:58 +0200 |
commit | 4d96f9109109be93618050a50cabb8df7c931ba7 (patch) | |
tree | dde3455d1a40572c7d51ef373b3e027031ddbf20 /arch/x86/kernel/crash_dump_64.c | |
parent | 32cb4d02fb02cae2e0696c1ce92d8195574faf59 (diff) | |
download | linux-stable-4d96f9109109be93618050a50cabb8df7c931ba7.tar.gz linux-stable-4d96f9109109be93618050a50cabb8df7c931ba7.tar.bz2 linux-stable-4d96f9109109be93618050a50cabb8df7c931ba7.zip |
x86/sev: Replace occurrences of sev_active() with cc_platform_has()
Replace uses of sev_active() with the more generic cc_platform_has()
using CC_ATTR_GUEST_MEM_ENCRYPT. If future support is added for other
memory encryption technologies, the use of CC_ATTR_GUEST_MEM_ENCRYPT
can be updated, as required.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210928191009.32551-7-bp@alien8.de
Diffstat (limited to 'arch/x86/kernel/crash_dump_64.c')
-rw-r--r-- | arch/x86/kernel/crash_dump_64.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/crash_dump_64.c b/arch/x86/kernel/crash_dump_64.c index 045e82e8945b..a7f617a3981d 100644 --- a/arch/x86/kernel/crash_dump_64.c +++ b/arch/x86/kernel/crash_dump_64.c @@ -10,6 +10,7 @@ #include <linux/crash_dump.h> #include <linux/uaccess.h> #include <linux/io.h> +#include <linux/cc_platform.h> static ssize_t __copy_oldmem_page(unsigned long pfn, char *buf, size_t csize, unsigned long offset, int userbuf, @@ -73,5 +74,6 @@ ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize, ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos) { - return read_from_oldmem(buf, count, ppos, 0, sev_active()); + return read_from_oldmem(buf, count, ppos, 0, + cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)); } |