audk/OvmfPkg/Sec
Michael Roth f0ed194236 OvmfPkg: Don't make APIC MMIO accesses with encryption bit set
For the most part, OVMF will clear the encryption bit for MMIO regions,
but there is currently one known exception during SEC when the APIC
base address is accessed via MMIO with the encryption bit set for
SEV-ES/SEV-SNP guests. In the case of SEV-SNP, this requires special
handling on the hypervisor side which may not be available in the
future[1], so make the necessary changes in the SEC-configured page
table to clear the encryption bit for 4K region containing the APIC
base address.

[1] https://lore.kernel.org/lkml/20240208002420.34mvemnzrwwsaesw@amd.com/#t

Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Jianyong Wu <jianyong.wu@arm.com>
Cc: Anatol Belski <anbelski@linux.microsoft.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
2024-05-02 12:43:50 +00:00
..
Ia32 OvmfPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:19 -07:00
X64 OvmfPkg/Sec: Move TDX APs related nasm code to IntelTdxAPs.nasm 2022-12-21 07:06:17 +00:00
AmdSev.c OvmfPkg: Don't make APIC MMIO accesses with encryption bit set 2024-05-02 12:43:50 +00:00
AmdSev.h OvmfPkg: Don't make APIC MMIO accesses with encryption bit set 2024-05-02 12:43:50 +00:00
SecMain.c OvmfPkg: Don't make APIC MMIO accesses with encryption bit set 2024-05-02 12:43:50 +00:00
SecMain.inf OvmfPkg: Don't make APIC MMIO accesses with encryption bit set 2024-05-02 12:43:50 +00:00