diff options
author | Borislav Petkov <bp@suse.de> | 2021-03-15 10:49:59 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-03-15 10:49:59 +0100 |
commit | 0d391319809ec2999565fbb92de712a83cef861b (patch) | |
tree | 7a43c3e2c329e498267fb059daa1a02d26bc66cc /arch | |
parent | aa7680f6fe21ba92c3d633e345f85d4125cd56f1 (diff) | |
parent | 229164175ff0c61ff581e6bf37fbfcb608b6e9bb (diff) | |
download | linux-0d391319809ec2999565fbb92de712a83cef861b.tar.bz2 |
Merge 'x86/seves' into x86/core
Pick up dependent changes.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | arch/x86/kernel/sev-es.c | 2 | ||||
-rw-r--r-- | arch/x86/mm/mem_encrypt.c | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 10cc6199bf67..d0db8cc4293e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1515,6 +1515,7 @@ config AMD_MEM_ENCRYPT select ARCH_USE_MEMREMAP_PROT select ARCH_HAS_FORCE_DMA_UNENCRYPTED select INSTRUCTION_DECODER + select ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS help Say yes to enable support for the encryption of system memory. This requires an AMD processor that supports Secure Memory diff --git a/arch/x86/kernel/sev-es.c b/arch/x86/kernel/sev-es.c index 04a780abb512..225704ed2055 100644 --- a/arch/x86/kernel/sev-es.c +++ b/arch/x86/kernel/sev-es.c @@ -277,7 +277,7 @@ static enum es_result vc_decode_insn(struct es_em_ctxt *ctxt) return ES_EXCEPTION; } - insn_init(&ctxt->insn, buffer, MAX_INSN_SIZE - res, 1); + insn_init(&ctxt->insn, buffer, MAX_INSN_SIZE, 1); insn_get_length(&ctxt->insn); } diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c index 4b01f7dbaf30..f3eb53fe0215 100644 --- a/arch/x86/mm/mem_encrypt.c +++ b/arch/x86/mm/mem_encrypt.c @@ -19,6 +19,7 @@ #include <linux/kernel.h> #include <linux/bitops.h> #include <linux/dma-mapping.h> +#include <linux/virtio_config.h> #include <asm/tlbflush.h> #include <asm/fixmap.h> @@ -484,3 +485,8 @@ void __init mem_encrypt_init(void) print_mem_encrypt_feature_info(); } +int arch_has_restricted_virtio_memory_access(void) +{ + return sev_active(); +} +EXPORT_SYMBOL_GPL(arch_has_restricted_virtio_memory_access); |