]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sev-es: Do not support MMIO to/from encrypted memory
authorJoerg Roedel <jroedel@suse.de>
Wed, 28 Oct 2020 16:46:59 +0000 (17:46 +0100)
committerBorislav Petkov <bp@suse.de>
Thu, 29 Oct 2020 18:27:42 +0000 (19:27 +0100)
commite5864e57fabc1f2b4dcb1bd2c88e7396be0cccd4
treeb49db12b5fb9ca93bd04725ab135439b153b381f
parent18d01b2b5e717020989e6d2c052f1442b3e6fc5c
x86/sev-es: Do not support MMIO to/from encrypted memory

MMIO memory is usually not mapped encrypted, so there is no reason to
support emulated MMIO when it is mapped encrypted.

Prevent a possible hypervisor attack where a RAM page is mapped as
an MMIO page in the nested page-table, so that any guest access to it
will trigger a #VC exception and leak the data on that page to the
hypervisor via the GHCB (like with valid MMIO). On the read side this
attack would allow the HV to inject data into the guest.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lkml.kernel.org/r/20201028164659.27002-6-joro@8bytes.org
arch/x86/kernel/sev-es.c