Commit 5aacef9
Herton R. Krzesinski
Merge: TDX core kernel enabling (support running Linux as guest)
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/875
Bugzilla: http://bugzilla.redhat.com/1955275
Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1359
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Omitted-fix: 4b3f764 ("tools headers cpufeatures: Sync with the
kernel sources")
Unnecessary to this MR.
Omitted-fix: 5ced812 ("tools headers cpufeatures: Sync with the
kernel sources")
Unnecessary to this MR.
d86d28c25344 (Wander Lairson Costa)
config: Enable TDX Guest
3f18abeb0dff (Wander Lairson Costa)
x86/hyperv: Initialize shared memory boundary in the Isolation VM.
2d58bdec9d0c (Wander Lairson Costa)
Documentation/x86: Document TDX kernel architecture
7b2226734233 (Wander Lairson Costa)
ACPICA: Avoid cache flush inside virtual machines
04420296b84a (Wander Lairson Costa)
x86/tdx/ioapic: Add shared bit for IOAPIC base address
8ef8f998f932 (Wander Lairson Costa)
x86/mm: Make DMA memory shared for TD guest
9768974a2782 (Wander Lairson Costa)
x86/mm/cpa: Add support for TDX shared memory
1fcb980c6af2 (Wander Lairson Costa)
x86/tdx: Make pages shared in ioremap()
60e4f2d0615c (Wander Lairson Costa)
x86/topology: Disable CPU online/offline control for TDX guests
0ef54dd634a9 (Wander Lairson Costa)
x86/acpi/x86/boot: Add multiprocessor wake-up support
dcc0b0bb9386 (Wander Lairson Costa)
x86/boot: Avoid #VE during boot for TDX platforms
d9f6dbc65b99 (Wander Lairson Costa)
x86/boot: Set CR0.NE early and keep it set during the boot
9918045fab36 (Wander Lairson Costa)
x86/acpi/x86/boot: Add multiprocessor wake-up support
0089010a4c0d (Wander Lairson Costa)
x86/boot: Add a trampoline for booting APs via firmware handoff
ace0733b9895 (Wander Lairson Costa)
x86/tdx: Wire up KVM hypercalls
2be45c89174c (Wander Lairson Costa)
x86/tdx: Port I/O: Add early boot support
e4d019d0ab47 (Wander Lairson Costa)
x86/tdx: Port I/O: Add runtime hypercalls
4defa6a6e997 (Wander Lairson Costa)
x86/boot: Port I/O: Add decompression-time support for TDX
4c739b45c9d8 (Wander Lairson Costa)
x86/boot: Port I/O: Allow to hook up alternative helpers
965b5f7d6581 (Wander Lairson Costa)
x86: Consolidate port I/O helpers
74ed20bd60d2 (Wander Lairson Costa)
x86: Adjust types used in port I/O helpers
1ae2ce7ee424 (Wander Lairson Costa)
x86/tdx: Detect TDX at early kernel decompression time
0089726a21e8 (Wander Lairson Costa)
x86/tdx: Handle in-kernel MMIO
1c50354f716a (Wander Lairson Costa)
x86/tdx: Handle CPUID via #VE
407152b69b48 (Wander Lairson Costa)
x86/tdx: Add MSR support for TDX guests
17e87935337c (Wander Lairson Costa)
x86/tdx: Add HLT support for TDX guests
1bf9e16304ff (Wander Lairson Costa)
x86/traps: Add #VE support for TDX guest
25aeaa15a0cb (Wander Lairson Costa)
x86/traps: Refactor exc_general_protection()
69558857494c (Wander Lairson Costa)
x86/tdx: Exclude shared bit from __PHYSICAL_MASK
cd447f3886c1 (Wander Lairson Costa)
x86/tdx: Extend the confidential computing API to support TDX guests
b684ce611a45 (Wander Lairson Costa)
x86/tdx: Add __tdx_module_call() and __tdx_hypercall() helper functions
161598be64cd (Wander Lairson Costa)
x86/tdx: Provide common base for SEAMCALL and TDCALL C wrappers
b140c1045eef (Wander Lairson Costa)
x86/tdx: Detect running as a TDX guest in early boot
995afcdd46f7 (Wander Lairson Costa)
x86/ibt: Disable IBT around firmware
045dfa4ec296 (Wander Lairson Costa)
x86/ibt,kexec: Disable CET on kexec
496a5f1f0623 (Wander Lairson Costa)
x86/ibt: Add IBT feature, MSR and #CP handling
5d67f5402e4f (Wander Lairson Costa)
x86/ibt: Base IBT bits
1521fcb8488c (Wander Lairson Costa)
Documentation: Add x86/amd_hsmp driver
c844f1ba98c8 (Wander Lairson Costa)
x86/mm/cpa: Generalize __set_memory_enc_pgtable()
44c6c035ecbb (Wander Lairson Costa)
x86/coco: Add API to handle encryption mask
953a82ec52c4 (Wander Lairson Costa)
x86/coco: Explicitly declare type of confidential computing platform
f9ac78c1574b (Wander Lairson Costa)
x86/cc: Move arch/x86/{kernel/cc_platform.c => coco/core.c}
01e18facbab7 (Wander Lairson Costa)
hyper-v: Enable swiotlb bounce buffer for Isolation VM
90e8d9c572bc (Wander Lairson Costa)
x86/hyper-v: Add hyperv Isolation VM check in the cc_platform_has()
3de5845b13de (Wander Lairson Costa)
swiotlb: Add swiotlb bounce buffer remap function for HV IVM
aa622fccff1b (Wander Lairson Costa)
x86/sev: Move common memory encryption code to mem_encrypt.c
a97b7c77b835 (Wander Lairson Costa)
x86/sev: Rename mem_encrypt.c to mem_encrypt_amd.c
61db1fc94f8f (Wander Lairson Costa)
x86/sev: Use CC_ATTR attribute to generalize string I/O unroll
8aaa3ebc1c97 (Wander Lairson Costa)
x86/insn-eval: Introduce insn_decode_mmio()
81d528215bf4 (Wander Lairson Costa)
x86/insn-eval: Introduce insn_get_modrm_reg_ptr()
880e1d2cd664 (Wander Lairson Costa)
x86/sev: Remove do_early_exception() forward declarations
7b6d4f843752 (Wander Lairson Costa)
x86/head64: Carve out the guest encryption postprocessing into a helper
4a1dcbfcb64d (Wander Lairson Costa)
x86/sev: Get rid of excessive use of defines
5611b4e29bdb (Wander Lairson Costa)
x86/sev: Shorten GHCB terminate macro names
63ca1c66f961 (Wander Lairson Costa)
x86/kvm: Add guest support for detecting and enabling SEV Live Migration
feature.
547ffb035c0e (Wander Lairson Costa)
EFI: Introduce the new AMD Memory Encryption GUID.
2f1f679e8f94 (Wander Lairson Costa)
x86/hyperv: Initialize GHCB page in Isolation VM
d983844169c3 (Wander Lairson Costa)
x86/iopl: Fake iopl(3) CLI/STI usage
67a8e0127390 (Wander Lairson Costa)
mm: x86: Invoke hypercall when page encryption status is changed
2ff153eba629 (Wander Lairson Costa)
x86/kvm: Add AMD SEV specific Hypercall3
Documentation/x86/amd_hsmp.rst | 86 +++
Documentation/x86/index.rst | 2 +
Documentation/x86/tdx.rst | 218 +++++++
arch/x86/Kbuild | 2 +
arch/x86/Kconfig | 45 +-
arch/x86/Makefile | 16 +-
arch/x86/boot/boot.h | 37 +-
arch/x86/boot/compressed/Makefile | 1 +
arch/x86/boot/compressed/head_64.S | 27 +-
arch/x86/boot/compressed/misc.c | 12 +
arch/x86/boot/compressed/misc.h | 4 +-
arch/x86/boot/compressed/pgtable.h | 2 +-
arch/x86/boot/compressed/sev.c | 6 +-
arch/x86/boot/compressed/tdcall.S | 3 +
arch/x86/boot/compressed/tdx.c | 77 +++
arch/x86/boot/compressed/tdx.h | 13 +
arch/x86/boot/cpuflags.c | 3 +-
arch/x86/boot/cpuflags.h | 1 +
arch/x86/boot/io.h | 41 ++
arch/x86/boot/main.c | 4 +
arch/x86/coco/Makefile | 8 +
arch/x86/coco/core.c | 137 ++++
arch/x86/coco/tdx/Makefile | 3 +
arch/x86/coco/tdx/tdcall.S | 204 ++++++
arch/x86/coco/tdx/tdx.c | 692 +++++++++++++++++++++
arch/x86/hyperv/hv_init.c | 80 ++-
arch/x86/include/asm/acenv.h | 14 +-
arch/x86/include/asm/apic.h | 7 +
arch/x86/include/asm/coco.h | 32 +
arch/x86/include/asm/cpu.h | 4 +
arch/x86/include/asm/cpufeatures.h | 2 +
arch/x86/include/asm/disabled-features.h | 8 +-
arch/x86/include/asm/efi.h | 9 +-
arch/x86/include/asm/ibt.h | 93 +++
arch/x86/include/asm/idtentry.h | 9 +
arch/x86/include/asm/insn-eval.h | 14 +
arch/x86/include/asm/io.h | 62 +-
arch/x86/include/asm/kvm_para.h | 34 +
arch/x86/include/asm/mem_encrypt.h | 10 +-
arch/x86/include/asm/mshyperv.h | 4 +
arch/x86/include/asm/msr-index.h | 20 +-
arch/x86/include/asm/paravirt.h | 6 +
arch/x86/include/asm/paravirt_types.h | 1 +
arch/x86/include/asm/pgtable.h | 13 +-
arch/x86/include/asm/processor.h | 1 +
arch/x86/include/asm/realmode.h | 1 +
arch/x86/include/asm/sev-common.h | 55 +-
arch/x86/include/asm/shared/io.h | 34 +
arch/x86/include/asm/shared/tdx.h | 40 ++
arch/x86/include/asm/tdx.h | 91 +++
arch/x86/include/asm/traps.h | 2 +
arch/x86/include/asm/x86_init.h | 16 +
arch/x86/include/uapi/asm/processor-flags.h | 2 +
arch/x86/kernel/Makefile | 5 -
arch/x86/kernel/acpi/boot.c | 100 ++-
arch/x86/kernel/apic/apic.c | 10 +
arch/x86/kernel/apic/io_apic.c | 18 +-
arch/x86/kernel/apm_32.c | 7 +
arch/x86/kernel/asm-offsets.c | 17 +
arch/x86/kernel/cc_platform.c | 69 --
arch/x86/kernel/cpu/common.c | 59 +-
arch/x86/kernel/cpu/mshyperv.c | 24 +
arch/x86/kernel/head64.c | 67 +-
arch/x86/kernel/head_64.S | 28 +-
arch/x86/kernel/idt.c | 7 +
arch/x86/kernel/kvm.c | 82 +++
arch/x86/kernel/machine_kexec_64.c | 4 +-
arch/x86/kernel/paravirt.c | 1 +
arch/x86/kernel/process.c | 5 +
arch/x86/kernel/relocate_kernel_64.S | 8 +
arch/x86/kernel/sev-shared.c | 2 +-
arch/x86/kernel/sev.c | 11 +-
arch/x86/kernel/smpboot.c | 12 +-
arch/x86/kernel/traps.c | 249 +++++++-
arch/x86/kernel/x86_init.c | 16 +-
arch/x86/lib/insn-eval.c | 106 +++-
arch/x86/mm/Makefile | 7 +-
arch/x86/mm/ioremap.c | 5 +
arch/x86/mm/mem_encrypt.c | 392 +-----------
arch/x86/mm/mem_encrypt_amd.c | 466 ++++++++++++++
arch/x86/mm/mem_encrypt_identity.c | 12 +-
arch/x86/mm/pat/set_memory.c | 21 +-
arch/x86/realmode/rm/header.S | 1 +
arch/x86/realmode/rm/trampoline_64.S | 57 +-
arch/x86/realmode/rm/trampoline_common.S | 12 +-
arch/x86/realmode/rm/wakemain.c | 4 +
arch/x86/virt/vmx/tdx/tdxcall.S | 96 +++
include/asm-generic/mshyperv.h | 18 +-
include/linux/cc_platform.h | 21 +
include/linux/efi.h | 1 +
include/linux/swiotlb.h | 6 +
kernel/cpu.c | 7 +
kernel/dma/swiotlb.c | 43 +-
.../configs/common/generic/CONFIG_INTEL_TDX_GUEST | 1 +
.../configs/common/generic/CONFIG_X86_KERNEL_IBT | 1 +
95 files changed, 3691 insertions(+), 695 deletions(-)
Approved-by: Rafael Aquini <aquini@redhat.com>
Approved-by: David Arcari <darcari@redhat.com>
Approved-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>File tree
63 files changed
+2549
-294
lines changed- Documentation/x86
- arch
- arm/xen
- x86
- boot
- compressed
- coco
- tdx
- include/asm
- kernel
- acpi
- apic
- lib
- mm
- realmode/rm
- virt/vmx/tdx
- include
- linux
- xen/arm
- kernel
- redhat/configs/common/generic/x86
- tools
- arch/x86/include/asm
- testing/selftests/x86
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
63 files changed
+2549
-294
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 34 | + | |
| 35 | + | |
39 | 36 | | |
40 | 37 | | |
41 | | - | |
| 38 | + | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 123 | + | |
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
| |||
143 | 138 | | |
144 | 139 | | |
145 | 140 | | |
146 | | - | |
147 | 141 | | |
148 | | - | |
149 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
| |||
0 commit comments