[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <101c3910-a164-4b4c-9474-8743dc6d1199@cschramm.eu>
Date: Wed, 6 Sep 2023 16:04:14 +0200
From: Christopher Schramm <linux@...hramm.eu>
To: Tom Lendacky <thomas.lendacky@....com>,
linux-kernel@...r.kernel.org, x86@...nel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
"H. Peter Anvin" <hpa@...or.com>,
Michael Roth <michael.roth@....com>,
Joerg Roedel <jroedel@...e.de>,
Dionna Glaze <dionnaglaze@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v9 5/6] x86/sev: Add SNP-specific unaccepted memory
support
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5c72067c06d4..b9c451f75d5e 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1543,11 +1543,13 @@ config X86_MEM_ENCRYPT
> config AMD_MEM_ENCRYPT
> bool "AMD Secure Memory Encryption (SME) support"
> depends on X86_64 && CPU_SUP_AMD
> + depends on EFI_STUB
> select DMA_COHERENT_POOL
> select ARCH_USE_MEMREMAP_PROT
> select INSTRUCTION_DECODER
> select ARCH_HAS_CC_PLATFORM
> select X86_MEM_ENCRYPT
> + select UNACCEPTED_MEMORY
> help
> Say yes to enable support for the encryption of system memory.
> This requires an AMD processor that supports Secure Memory
Unfortunately this makes AMD_MEM_ENCRYPT depend on EFI just to
unconditionally enable UNACCEPTED_MEMORY. It seems like an easy target
to make that optional, e.g. with a separate configuration item:
---
config AMD_UNACCEPTED_MEMORY
def_bool y
depends on AMD_MEM_ENCRYPT && EFI_STUB
select UNACCEPTED_MEMORY
---
Using that we can successfully build and run SNP VMs without UEFI/OVMF
(which we already did with earlier Linux versions).
From a quick look at
[PATCHv14 9/9] x86/tdx: Add unaccepted memory support
it actually seems very similar for INTEL_TDX_GUEST.
Ideally UNACCEPTED_MEMORY would not assume EFI either, but the
implementation actually clearly does.
Powered by blists - more mailing lists