From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org
Cc: sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com,
ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com,
hpa@zytor.com, jgross@suse.com, jmattson@google.com,
joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org,
pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com,
tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com,
x86@kernel.org, linux-kernel@vger.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH 00/26] TDX Guest: TDX core support
Date: Tue, 14 Dec 2021 18:02:38 +0300 [thread overview]
Message-ID: <20211214150304.62613-1-kirill.shutemov@linux.intel.com> (raw)
Hi All,
Intel's Trust Domain Extensions (TDX) protects confidential guest VMs
from the host and physical attacks by isolating the guest register
state and by encrypting the guest memory. In TDX, a special TDX module
sits between the host and the guest, and runs in a special mode and
manages the guest/host separation.
More details of TDX guests can be found in Documentation/x86/tdx.rst.
This cover letter is structured as below:
1. Previous versions/changes : Contains details about previous submission
and its patchset structure.
2. Current Patchset Structure : Covers details about the current patchset
and its structure.
3. Patch-set dependency : Covers info about this patch series
dependencies.
4. SEV/TDX comparison : Details about SEV and TDX guest differences
and similarities
5: TDX/VM/comparison : Compares TDX guests with regular VMs
Previous versions/changes:
--------------------------
Previously, the TDX patch series has been submitted into 4 different
patch sets. You can find them in the following links. Due to review
feedback and to make the next review easier, we have re-organized
the patchsets into two sets (cleanup/core). Details are explained
in the "current patch-set structure" section.
Initial support:
https://lore.kernel.org/lkml/20211009053747.1694419-1-sathyanarayanan.kuppuswamy@linux.intel.com/
#VE support:
https://lore.kernel.org/lkml/20211005204136.1812078-1-sathyanarayanan.kuppuswamy@linux.intel.com/
Boot support:
https://lore.kernel.org/lkml/20211005230550.1819406-1-sathyanarayanan.kuppuswamy@linux.intel.com/
Shared-mm support:
https://lore.kernel.org/lkml/20211009003711.1390019-1-sathyanarayanan.kuppuswamy@linux.intel.com/
Current Patch-set Structure:
----------------------------
The minimal code that can run real userspace is spread across 30
patches in 2 sets:
1. TDX Infrastructure/cleanup set (4 patches)
2. TDX core support (26 patches)
"Infrastructure/cleanup set" includes infrastructure changes made in
generic code (like for sharing with AMD SEV code) to add TDX guest
support. It was posted as 2 different patch series (links are included
below).
Share common features between AMD SEV / TDX guest:
https://lore.kernel.org/r/20211206135505.75045-1-kirill.shutemov@linux.intel.com
Skip CSTAR MSR on Intel:
https://lore.kernel.org/lkml/20211116005103.2929441-1-sathyanarayanan.kuppuswamy@linux.intel.com/
"TDX core support" patches add TDX infrastructure in Linux kernel (like
#VE support for I/O, MMIO, CPUID, etc), detection support, some boot
fixes.
This series adds TDX core support.
Patch-set dependency:
---------------------
This series also has dependency on MMIO decoding patchset.
https://lore.kernel.org/lkml/20211130184933.31005-1-kirill.shutemov@linux.intel.com/
It is also dependent on the "TDX Infrastructure/cleanup set".
SEV/TDX comparison:
-------------------
TDX has a lot of similarities to SEV. It enhances confidentiality
of guest memory and state (like registers) and includes a new exception
(#VE) for the same basic reasons as SEV-ES. Like SEV-SNP (not merged
yet), TDX limits the host's ability to make changes in the guest
physical address space.
TDX/VM comparison:
------------------
Some of the key differences between TD and regular VM is,
1. Multi CPU bring-up is done using the ACPI MADT wake-up table.
2. A new #VE exception handler is added. The TDX module injects #VE exception
to the guest TD in cases of instructions that need to be emulated, disallowed
MSR accesses, etc.
3. By default memory is marked as private, and TD will selectively share it with
VMM based on need.
You can find TDX related documents in the following link.
https://software.intel.com/content/www/br/pt/develop/articles/intel-trust-domain-extensions.html
Andi Kleen (1):
x86/tdx: Early boot handling of port I/O
Isaku Yamahata (1):
x86/tdx: ioapic: Add shared bit for IOAPIC base address
Kirill A. Shutemov (13):
x86/traps: Add #VE support for TDX guest
x86/tdx: Add HLT support for TDX guests (#VE approach)
x86/tdx: Add MSR support for TDX guests
x86/tdx: Handle CPUID via #VE
x86/tdx: Handle in-kernel MMIO
x86/tdx: Get page shared bit info from the TDX Module
x86/tdx: Exclude shared bit from __PHYSICAL_MASK
x86/tdx: Make pages shared in ioremap()
x86/tdx: Add helper to convert memory between shared and private
x86/mm/cpa: Add support for TDX shared memory
x86/kvm: Use bounce buffers for TD guest
ACPICA: Avoid cache flush on TDX guest
x86/tdx: Warn about unexpected WBINVD
Kuppuswamy Sathyanarayanan (9):
x86/tdx: Detect running as a TDX guest in early boot
x86/tdx: Extend the cc_platform_has() API to support TDX guests
x86/tdx: Add __tdx_module_call() and __tdx_hypercall() helper
functions
x86/tdx: Detect TDX at early kernel decompression time
x86/tdx: Support TDX guest port I/O at decompression time
x86/tdx: Add port I/O emulation
x86/acpi, x86/boot: Add multiprocessor wake-up support
x86/topology: Disable CPU online/offline control for TDX guests
Documentation/x86: Document TDX kernel architecture
Sean Christopherson (2):
x86/boot: Add a trampoline for booting APs via firmware handoff
x86/boot: Avoid #VE during boot for TDX platforms
Documentation/x86/index.rst | 1 +
Documentation/x86/tdx.rst | 194 ++++++++
arch/x86/Kconfig | 16 +
arch/x86/boot/compressed/Makefile | 2 +
arch/x86/boot/compressed/head_64.S | 25 +-
arch/x86/boot/compressed/misc.c | 8 +
arch/x86/boot/compressed/misc.h | 6 +
arch/x86/boot/compressed/pgtable.h | 2 +-
arch/x86/boot/compressed/tdcall.S | 3 +
arch/x86/boot/compressed/tdx.c | 33 ++
arch/x86/boot/compressed/tdx.h | 60 +++
arch/x86/boot/cpuflags.c | 13 +-
arch/x86/boot/cpuflags.h | 2 +
arch/x86/include/asm/acenv.h | 16 +-
arch/x86/include/asm/apic.h | 7 +
arch/x86/include/asm/cpufeatures.h | 1 +
arch/x86/include/asm/disabled-features.h | 8 +-
arch/x86/include/asm/idtentry.h | 4 +
arch/x86/include/asm/io.h | 16 +-
arch/x86/include/asm/pgtable.h | 19 +-
arch/x86/include/asm/realmode.h | 1 +
arch/x86/include/asm/tdx.h | 110 +++++
arch/x86/kernel/Makefile | 4 +
arch/x86/kernel/acpi/boot.c | 114 +++++
arch/x86/kernel/apic/apic.c | 10 +
arch/x86/kernel/apic/io_apic.c | 18 +-
arch/x86/kernel/asm-offsets.c | 20 +
arch/x86/kernel/cc_platform.c | 20 +-
arch/x86/kernel/head64.c | 7 +
arch/x86/kernel/head_64.S | 24 +-
arch/x86/kernel/idt.c | 3 +
arch/x86/kernel/process.c | 7 +
arch/x86/kernel/smpboot.c | 12 +-
arch/x86/kernel/tdcall.S | 302 ++++++++++++
arch/x86/kernel/tdx.c | 586 +++++++++++++++++++++++
arch/x86/kernel/traps.c | 79 +++
arch/x86/mm/ioremap.c | 5 +
arch/x86/mm/mem_encrypt.c | 36 +-
arch/x86/mm/pat/set_memory.c | 39 +-
arch/x86/realmode/rm/header.S | 1 +
arch/x86/realmode/rm/trampoline_64.S | 63 ++-
arch/x86/realmode/rm/trampoline_common.S | 12 +-
include/linux/cc_platform.h | 19 +
kernel/cpu.c | 3 +
44 files changed, 1892 insertions(+), 39 deletions(-)
create mode 100644 Documentation/x86/tdx.rst
create mode 100644 arch/x86/boot/compressed/tdcall.S
create mode 100644 arch/x86/boot/compressed/tdx.c
create mode 100644 arch/x86/boot/compressed/tdx.h
create mode 100644 arch/x86/include/asm/tdx.h
create mode 100644 arch/x86/kernel/tdcall.S
create mode 100644 arch/x86/kernel/tdx.c
--
2.32.0
next reply other threads:[~2021-12-14 15:03 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 15:02 Kirill A. Shutemov [this message]
2021-12-14 15:02 ` [PATCH 01/26] x86/tdx: Detect running as a TDX guest in early boot Kirill A. Shutemov
2021-12-14 18:18 ` Borislav Petkov
2021-12-14 20:21 ` Kirill A. Shutemov
2021-12-14 20:58 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 02/26] x86/tdx: Extend the cc_platform_has() API to support TDX guests Kirill A. Shutemov
2021-12-15 23:19 ` Josh Poimboeuf
2021-12-15 23:35 ` Kirill A. Shutemov
2021-12-15 23:37 ` Josh Poimboeuf
2021-12-16 18:33 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 03/26] x86/tdx: Add __tdx_module_call() and __tdx_hypercall() helper functions Kirill A. Shutemov
2021-12-21 19:11 ` Borislav Petkov
2021-12-23 16:55 ` Kirill A. Shutemov
2021-12-23 18:53 ` Borislav Petkov
2021-12-24 9:16 ` Paolo Bonzini
2021-12-24 10:34 ` Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 04/26] x86/traps: Add #VE support for TDX guest Kirill A. Shutemov
2021-12-23 19:45 ` Borislav Petkov
2021-12-28 23:31 ` Kirill A. Shutemov
2021-12-29 11:29 ` Borislav Petkov
2021-12-29 17:07 ` Sean Christopherson
2021-12-29 17:35 ` Borislav Petkov
2021-12-29 17:47 ` Sean Christopherson
2021-12-30 8:05 ` Kirill A. Shutemov
2021-12-30 10:53 ` Borislav Petkov
2021-12-30 15:41 ` Kirill A. Shutemov
2021-12-30 18:02 ` Borislav Petkov
2021-12-29 18:42 ` Dave Hansen
2021-12-14 15:02 ` [PATCH 05/26] x86/tdx: Add HLT support for TDX guests (#VE approach) Kirill A. Shutemov
2021-12-28 19:08 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 06/26] x86/tdx: Add MSR support for TDX guests Kirill A. Shutemov
2021-12-29 11:59 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 07/26] x86/tdx: Handle CPUID via #VE Kirill A. Shutemov
2021-12-31 17:19 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 08/26] x86/tdx: Handle in-kernel MMIO Kirill A. Shutemov
2021-12-15 23:31 ` Josh Poimboeuf
2021-12-15 23:37 ` Kirill A. Shutemov
2022-01-06 15:08 ` Kirill A. Shutemov
2022-01-05 10:37 ` Borislav Petkov
2022-01-05 15:43 ` Kirill A. Shutemov
2022-01-07 13:46 ` Borislav Petkov
2022-01-07 17:49 ` Kirill A. Shutemov
2022-01-07 19:04 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 09/26] x86/tdx: Detect TDX at early kernel decompression time Kirill A. Shutemov
2022-01-07 16:27 ` Borislav Petkov
2021-12-14 15:02 ` [PATCH 10/26] x86/tdx: Support TDX guest port I/O at " Kirill A. Shutemov
2022-01-13 13:51 ` Borislav Petkov
2022-01-15 1:01 ` Kirill A. Shutemov
2022-01-15 12:16 ` Borislav Petkov
2022-01-17 14:39 ` Kirill A. Shutemov
2022-01-17 18:32 ` Borislav Petkov
2022-01-19 11:53 ` Kirill A. Shutemov
2022-01-19 13:35 ` Borislav Petkov
2022-01-19 15:49 ` Kirill A. Shutemov
2022-01-19 19:46 ` Borislav Petkov
2022-01-19 20:08 ` Kirill A. Shutemov
2022-01-19 20:26 ` Borislav Petkov
2022-01-20 2:15 ` [PATCH 1/3] x86: Consolidate port I/O helpers Kirill A. Shutemov
2022-01-20 2:15 ` [PATCH 2/3] x86/boot: Allow to hook up alternative " Kirill A. Shutemov
2022-01-20 16:38 ` Kirill A. Shutemov
2022-01-20 21:13 ` Josh Poimboeuf
2022-01-20 22:19 ` Borislav Petkov
2022-01-20 2:15 ` [PATCH 3/3] x86/boot/compressed: Support TDX guest port I/O at decompression time Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 11/26] x86/tdx: Add port I/O emulation Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 12/26] x86/tdx: Early boot handling of port I/O Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 13/26] x86/boot: Add a trampoline for booting APs via firmware handoff Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 14/26] x86/acpi, x86/boot: Add multiprocessor wake-up support Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 15/26] x86/boot: Avoid #VE during boot for TDX platforms Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 16/26] x86/topology: Disable CPU online/offline control for TDX guests Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 17/26] x86/tdx: Get page shared bit info from the TDX Module Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 18/26] x86/tdx: Exclude shared bit from __PHYSICAL_MASK Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 19/26] x86/tdx: Make pages shared in ioremap() Kirill A. Shutemov
2021-12-22 17:26 ` Tom Lendacky
2021-12-23 17:15 ` Kirill A. Shutemov
2021-12-23 19:45 ` Dave Hansen
2021-12-23 19:53 ` Borislav Petkov
2021-12-23 20:56 ` Kirill A. Shutemov
2021-12-23 21:09 ` Borislav Petkov
2021-12-24 11:03 ` Kirill A. Shutemov
2021-12-27 11:51 ` Borislav Petkov
2021-12-27 14:14 ` Kirill A. Shutemov
2021-12-28 18:39 ` Borislav Petkov
2021-12-28 23:33 ` Kirill A. Shutemov
2021-12-27 15:07 ` Tom Lendacky
2022-01-03 14:17 ` Kirill A. Shutemov
2022-01-03 14:29 ` Borislav Petkov
2022-01-03 15:15 ` Kirill A. Shutemov
2022-01-03 16:50 ` Dave Hansen
2022-01-03 18:10 ` Kirill A. Shutemov
2022-01-04 19:14 ` Kirill A. Shutemov
2022-01-04 20:36 ` Dave Hansen
2022-01-05 0:31 ` Kirill A. Shutemov
2022-01-05 0:43 ` Dave Hansen
2022-01-05 0:57 ` Kirill A. Shutemov
2022-01-05 1:02 ` Kirill A. Shutemov
2022-01-05 1:38 ` Dave Hansen
2022-01-05 9:46 ` Kirill A. Shutemov
2022-01-05 14:16 ` Tom Lendacky
2022-01-05 16:02 ` Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 20/26] x86/tdx: Add helper to convert memory between shared and private Kirill A. Shutemov
2021-12-14 15:02 ` [PATCH 21/26] x86/mm/cpa: Add support for TDX shared memory Kirill A. Shutemov
2021-12-14 15:03 ` [PATCH 22/26] x86/kvm: Use bounce buffers for TD guest Kirill A. Shutemov
2021-12-14 15:03 ` [PATCH 23/26] x86/tdx: ioapic: Add shared bit for IOAPIC base address Kirill A. Shutemov
2021-12-14 15:03 ` [PATCH 24/26] ACPICA: Avoid cache flush on TDX guest Kirill A. Shutemov
2021-12-14 15:03 ` [PATCH 25/26] x86/tdx: Warn about unexpected WBINVD Kirill A. Shutemov
2021-12-14 15:03 ` [PATCH 26/26] Documentation/x86: Document TDX kernel architecture Kirill A. Shutemov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211214150304.62613-1-kirill.shutemov@linux.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=aarcange@redhat.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=david@redhat.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=jpoimboe@redhat.com \
--cc=knsathya@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=sdeep@vmware.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.