public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] TDX host: kexec() support
@ 2024-04-07 12:44 Kai Huang
  2024-04-07 12:44 ` [PATCH v3 1/5] x86/kexec: do unconditional WBINVD for bare-metal in stop_this_cpu() Kai Huang
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Kai Huang @ 2024-04-07 12:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: x86, dave.hansen, bp, kirill.shutemov, tglx, mingo, hpa, luto,
	peterz, rick.p.edgecombe, thomas.lendacky, ashish.kalra, chao.gao,
	bhe, nik.borisov, pbonzini, seanjc

Currently kexec() support and TDX host are muturally exclusive in the
Kconfig.  This series adds the TDX host kexec support so that they can
work together and can be enabled at the same time in the Kconfig.

v2 -> v3:
 - Change to only do WBINVD for bare-metal, as Kirill/Tom pointed out
   WBINVD in TDX guests and SEV-ES/SEV-SNP guests triggers #VE.

 v2: https://lore.kernel.org/linux-kernel/cover.1710811610.git.kai.huang@intel.com/

v1 -> v2:
 - Do unconditional WBINVD during kexec() -- Boris
 - Change to cover crash kexec() -- Rick
 - Add a new patch (last one) to add a mechanism to reset all TDX private
   pages due to having to cover crash kexec().
 - Other code improvements  -- Dave
 - Rebase to latest tip/master.

 v1: https://lore.kernel.org/linux-kernel/cover.1706698706.git.kai.huang@intel.com/

Hi Dave, Sean, Paolo,

The last patch provides a new mechanism to handle all other TDX private
pages when they become possible to exist, e.g., when KVM is ready to run
TDX guests.  It's not mandatory at this stage because currently we only
have PAMT as private pages, but if we agree it's the right way to do then
it can be applied together with rest patches too.

Hi Tom, Ashish,

This series touches AMD SME code too, and I don't have AMD machine to
test.  I appreciate if you can help to review and/or test.


Kai Huang (5):
  x86/kexec: do unconditional WBINVD for bare-metal in stop_this_cpu()
  x86/kexec: do unconditional WBINVD for bare-metal in relocate_kernel()
  x86/kexec: Reset TDX private memory on platforms with TDX erratum
  x86/virt/tdx: Remove the !KEXEC_CORE dependency
  x86/virt/tdx: Add TDX memory reset notifier to reset other private
    pages

 arch/x86/Kconfig                     |   1 -
 arch/x86/include/asm/kexec.h         |   2 +-
 arch/x86/include/asm/tdx.h           |  16 +++++
 arch/x86/kernel/machine_kexec_64.c   |  29 ++++++--
 arch/x86/kernel/process.c            |  18 +++--
 arch/x86/kernel/relocate_kernel_64.S |  14 ++--
 arch/x86/virt/vmx/tdx/tdx.c          | 100 +++++++++++++++++++++++++++
 7 files changed, 158 insertions(+), 22 deletions(-)


base-commit: 6569784d306a8d356bb2517c1528c1d611a51922
-- 
2.43.2


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-04-15 21:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-07 12:44 [PATCH v3 0/5] TDX host: kexec() support Kai Huang
2024-04-07 12:44 ` [PATCH v3 1/5] x86/kexec: do unconditional WBINVD for bare-metal in stop_this_cpu() Kai Huang
2024-04-10 14:12   ` Kirill A. Shutemov
2024-04-10 21:54     ` Huang, Kai
2024-04-11 13:31       ` Kirill A. Shutemov
2024-04-11 13:53         ` Huang, Kai
2024-04-15 17:59       ` Borislav Petkov
2024-04-15 21:43         ` Huang, Kai
2024-04-10 16:08   ` Tom Lendacky
2024-04-10 16:14     ` Tom Lendacky
2024-04-10 22:26       ` Huang, Kai
2024-04-11 14:13         ` Tom Lendacky
2024-04-11 21:55           ` Huang, Kai
2024-04-07 12:44 ` [PATCH v3 2/5] x86/kexec: do unconditional WBINVD for bare-metal in relocate_kernel() Kai Huang
2024-04-10 14:15   ` Kirill A. Shutemov
2024-04-10 16:21   ` Tom Lendacky
2024-04-10 22:55     ` Huang, Kai
2024-04-11 14:25       ` Tom Lendacky
2024-04-11 21:59         ` Huang, Kai
2024-04-07 12:44 ` [PATCH v3 3/5] x86/kexec: Reset TDX private memory on platforms with TDX erratum Kai Huang
2024-04-07 12:44 ` [PATCH v3 4/5] x86/virt/tdx: Remove the !KEXEC_CORE dependency Kai Huang
2024-04-07 12:44 ` [PATCH v3 5/5] x86/virt/tdx: Add TDX memory reset notifier to reset other private pages Kai Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox