[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210810062626.1012-1-kirill.shutemov@linux.intel.com>
Date: Tue, 10 Aug 2021 09:26:21 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Borislav Petkov <bp@...en8.de>, Andy Lutomirski <luto@...nel.org>,
Sean Christopherson <seanjc@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Joerg Roedel <jroedel@...e.de>
Cc: Andi Kleen <ak@...ux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Tom Lendacky <thomas.lendacky@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Varad Gautam <varad.gautam@...e.com>,
Dario Faggioli <dfaggioli@...e.com>, x86@...nel.org,
linux-mm@...ck.org, linux-coco@...ts.linux.dev,
linux-kernel@...r.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: [PATCH 0/5] x86: Impplement support for unaccepted memory
UEFI Specification version 2.9 introduces concept of memory acceptance:
Some Virtual Machine platforms, such as Intel TDX or AMD SEV-SNP,
requiring memory to be accepted before it can be used by the guest.
Accepting happens via a protocol specific for the Virtrual Machine
platform.
Accepting memory is costly and it makes VMM allocate memory for the
accepted guest physical address range. We don't want to accept all memory
upfront.
The patchset implements on-demand memory acceptance for TDX.
Please, review. Any feedback is welcome.
Kirill A. Shutemov (5):
mm: Add support for unaccepted memory
efi/x86: Implement support for unaccepted memory
x86/boot/compressed: Handle unaccepted memory
x86/mm: Provide helpers for unaccepted memory
x86/tdx: Unaccepted memory support
Documentation/x86/zero-page.rst | 1 +
arch/x86/Kconfig | 1 +
arch/x86/boot/compressed/Makefile | 1 +
arch/x86/boot/compressed/bitmap.c | 86 ++++++++++++++++++++
arch/x86/boot/compressed/kaslr.c | 14 +++-
arch/x86/boot/compressed/misc.c | 9 ++
arch/x86/boot/compressed/tdx.c | 29 +++++++
arch/x86/boot/compressed/unaccepted_memory.c | 51 ++++++++++++
arch/x86/include/asm/page.h | 5 ++
arch/x86/include/asm/tdx.h | 2 +
arch/x86/include/asm/unaccepted_memory.h | 17 ++++
arch/x86/include/uapi/asm/bootparam.h | 3 +-
arch/x86/kernel/tdx.c | 8 ++
arch/x86/mm/Makefile | 2 +
arch/x86/mm/unaccepted_memory.c | 84 +++++++++++++++++++
drivers/firmware/efi/Kconfig | 12 +++
drivers/firmware/efi/efi.c | 1 +
drivers/firmware/efi/libstub/x86-stub.c | 75 ++++++++++++++---
include/linux/efi.h | 3 +-
mm/internal.h | 14 ++++
mm/memblock.c | 1 +
mm/page_alloc.c | 13 ++-
22 files changed, 414 insertions(+), 18 deletions(-)
create mode 100644 arch/x86/boot/compressed/bitmap.c
create mode 100644 arch/x86/boot/compressed/unaccepted_memory.c
create mode 100644 arch/x86/include/asm/unaccepted_memory.h
create mode 100644 arch/x86/mm/unaccepted_memory.c
--
2.31.1
Powered by blists - more mailing lists