Merge tag 'x86_tdx_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2022 00:51:12 +0000 (17:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2022 00:51:12 +0000 (17:51 -0700)
Pull Intel TDX support from Borislav Petkov:
 "Intel Trust Domain Extensions (TDX) support.

  This is the Intel version of a confidential computing solution called
  Trust Domain Extensions (TDX). This series adds support to run the
  kernel as part of a TDX guest. It provides similar guest protections
  to AMD's SEV-SNP like guest memory and register state encryption,
  memory integrity protection and a lot more.

  Design-wise, it differs from AMD's solution considerably: it uses a
  software module which runs in a special CPU mode called (Secure
  Arbitration Mode) SEAM. As the name suggests, this module serves as
  sort of an arbiter which the confidential guest calls for services it
  needs during its lifetime.

  Just like AMD's SNP set, this series reworks and streamlines certain
  parts of x86 arch code so that this feature can be properly
  accomodated"

* tag 'x86_tdx_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits)
  x86/tdx: Fix RETs in TDX asm
  x86/tdx: Annotate a noreturn function
  x86/mm: Fix spacing within memory encryption features message
  x86/kaslr: Fix build warning in KASLR code in boot stub
  Documentation/x86: Document TDX kernel architecture
  ACPICA: Avoid cache flush inside virtual machines
  x86/tdx/ioapic: Add shared bit for IOAPIC base address
  x86/mm: Make DMA memory shared for TD guest
  x86/mm/cpa: Add support for TDX shared memory
  x86/tdx: Make pages shared in ioremap()
  x86/topology: Disable CPU online/offline control for TDX guests
  x86/boot: Avoid #VE during boot for TDX platforms
  x86/boot: Set CR0.NE early and keep it set during the boot
  x86/acpi/x86/boot: Add multiprocessor wake-up support
  x86/boot: Add a trampoline for booting APs via firmware handoff
  x86/tdx: Wire up KVM hypercalls
  x86/tdx: Port I/O: Add early boot support
  x86/tdx: Port I/O: Add runtime hypercalls
  x86/boot: Port I/O: Add decompression-time support for TDX
  x86/boot: Port I/O: Allow to hook up alternative helpers
  ...

13 files changed:
1  2 
arch/x86/Kconfig
arch/x86/boot/compressed/Makefile
arch/x86/boot/compressed/head_64.S
arch/x86/boot/compressed/misc.c
arch/x86/boot/compressed/misc.h
arch/x86/coco/core.c
arch/x86/include/asm/io.h
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S
arch/x86/kernel/smpboot.c
arch/x86/mm/mem_encrypt.c
include/linux/cc_platform.h
kernel/cpu.c

Simple merge
index e69c3d2e0628aec111f79b427003ec6f4862efbe,8fd0e6ae2e1fe78920b53cbe27ce9390330493f3..19e1905dcbf6fd59f6cc5ca4d89e8997482b935d
@@@ -101,9 -101,9 +101,10 @@@ ifdef CONFIG_X86_6
  endif
  
  vmlinux-objs-$(CONFIG_ACPI) += $(obj)/acpi.o
+ vmlinux-objs-$(CONFIG_INTEL_TDX_GUEST) += $(obj)/tdx.o $(obj)/tdcall.o
  
  vmlinux-objs-$(CONFIG_EFI_MIXED) += $(obj)/efi_thunk_$(BITS).o
 +vmlinux-objs-$(CONFIG_EFI) += $(obj)/efi.o
  efi-obj-$(CONFIG_EFI_STUB) = $(objtree)/drivers/firmware/efi/libstub/lib.a
  
  $(obj)/vmlinux: $(vmlinux-objs-y) $(efi-obj-y) FORCE
Simple merge
Simple merge
index 4ca2857ea0413192f9f0bdee198dd5c23c4cc9a2,ea71cf3d64e1837d0f3277fc2f8f64b90da5e6b5..4910bf230d7b4afbb44f83d958e0b1902fe26458
  
  #define BOOT_BOOT_H
  #include "../ctype.h"
+ #include "../io.h"
  
 +#include "efi.h"
 +
  #ifdef CONFIG_X86_64
  #define memptr long
  #else
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d08dd65b5c43f74afc9c7371b2f152d3f8ff3a2e,691494bbaf5af4c174c599e0278a43a0c3658bfd..cb0d6cd1c12f24e1dd8681b5f9f0302675bec7d5
@@@ -73,13 -73,15 +73,23 @@@ enum cc_attr 
         */
        CC_ATTR_GUEST_UNROLL_STRING_IO,
  
 +      /**
 +       * @CC_ATTR_SEV_SNP: Guest SNP is active.
 +       *
 +       * The platform/OS is running as a guest/virtual machine and actively
 +       * using AMD SEV-SNP features.
 +       */
 +      CC_ATTR_GUEST_SEV_SNP,
++
+       /**
+        * @CC_ATTR_HOTPLUG_DISABLED: Hotplug is not supported or disabled.
+        *
+        * The platform/OS is running as a guest/virtual machine does not
+        * support CPU hotplug feature.
+        *
+        * Examples include TDX Guest.
+        */
+       CC_ATTR_HOTPLUG_DISABLED,
  };
  
  #ifdef CONFIG_ARCH_HAS_CC_PLATFORM
diff --cc kernel/cpu.c
Simple merge