kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Unify TDCALL/SEAMCALL and TDVMCALL assembly
@ 2023-07-12  8:55 Kai Huang
  2023-07-12  8:55 ` [PATCH 01/10] x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro Kai Huang
                   ` (9 more replies)
  0 siblings, 10 replies; 58+ messages in thread
From: Kai Huang @ 2023-07-12  8:55 UTC (permalink / raw)
  To: peterz, kirill.shutemov, linux-kernel
  Cc: dave.hansen, tglx, bp, mingo, hpa, x86, seanjc, pbonzini, kvm,
	isaku.yamahata, sathyanarayanan.kuppuswamy, kai.huang

Hi Peter, Kirill, all,

This series unifies the assembly code for TDCALL/SEAMCALL and TDVMCALL.
Now all of them use one singe TDX_MODULE_CALL asm macro.  I basically
followed Peter's code here:

https://lore.kernel.org/linux-mm/20230630120650.GB2534364@hirez.programming.kicks-ass.net/

With some differences that I found during my code writing and testing.

With this series, I have verified the TDX guest can boot successfully
and the TDX module can also be initialized successfully.

The last two patches are SEAMCALL patches that are needed for TDX host
patchset.  They are not mandatory to be here though, i.e., can be in the
TDX host support series.  I put them here so we can have a complete view
how TDCALL/SEAMCALL and TDVMCALL are implemented.

Could you help to review?  Thanks in advance.

Also cc Sean/Paolo/Isaku and KVM list for TDH.VP.ENTER part.

Kai Huang (10):
  x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro
  x86/tdx: Use cmovc to save a label in TDX_MODULE_CALL asm
  x86/tdx: Move FRAME_BEGIN/END to TDX_MODULE_CALL asm macro
  x86/tdx: Make macros of TDCALLs consistent with the spec
  x86/tdx: Rename __tdx_module_call() to __tdcall()
  x86/tdx: Pass TDCALL/SEAMCALL input/output registers via a structure
  x86/tdx: Extend TDX_MODULE_CALL to support more TDCALL/SEAMCALL leafs
  x86/tdx: Unify TDX_HYPERCALL and TDX_MODULE_CALL assembly
  x86/virt/tdx: Wire up basic SEAMCALL functions
  x86/virt/tdx: Allow SEAMCALL to handle #UD and #GP

 arch/x86/Kconfig                  |  12 ++
 arch/x86/Makefile                 |   2 +
 arch/x86/boot/compressed/tdx.c    |  26 +++-
 arch/x86/coco/tdx/tdcall.S        | 238 +++++-------------------------
 arch/x86/coco/tdx/tdx.c           | 124 +++++++++-------
 arch/x86/include/asm/shared/tdx.h |  48 ++++--
 arch/x86/include/asm/tdx.h        |  31 ++--
 arch/x86/kernel/asm-offsets.c     |  33 ++---
 arch/x86/virt/Makefile            |   2 +
 arch/x86/virt/vmx/Makefile        |   2 +
 arch/x86/virt/vmx/tdx/Makefile    |   2 +
 arch/x86/virt/vmx/tdx/seamcall.S  |  54 +++++++
 arch/x86/virt/vmx/tdx/tdxcall.S   | 206 ++++++++++++++++++++------
 13 files changed, 431 insertions(+), 349 deletions(-)
 create mode 100644 arch/x86/virt/Makefile
 create mode 100644 arch/x86/virt/vmx/Makefile
 create mode 100644 arch/x86/virt/vmx/tdx/Makefile
 create mode 100644 arch/x86/virt/vmx/tdx/seamcall.S


base-commit: 94142c9d1bdf1c18027a42758ceb6bdd59a92012
-- 
2.41.0


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

end of thread, other threads:[~2023-08-14 20:38 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12  8:55 [PATCH 00/10] Unify TDCALL/SEAMCALL and TDVMCALL assembly Kai Huang
2023-07-12  8:55 ` [PATCH 01/10] x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro Kai Huang
2023-07-12 19:19   ` Sathyanarayanan Kuppuswamy
2023-07-12  8:55 ` [PATCH 02/10] x86/tdx: Use cmovc to save a label in TDX_MODULE_CALL asm Kai Huang
2023-07-12 19:27   ` Sathyanarayanan Kuppuswamy
2023-07-13 10:32     ` Huang, Kai
2023-07-12  8:55 ` [PATCH 03/10] x86/tdx: Move FRAME_BEGIN/END to TDX_MODULE_CALL asm macro Kai Huang
2023-07-12 19:57   ` Sathyanarayanan Kuppuswamy
2023-07-12 22:05   ` Isaku Yamahata
2023-07-12  8:55 ` [PATCH 04/10] x86/tdx: Make macros of TDCALLs consistent with the spec Kai Huang
2023-07-14 12:28   ` Nikolay Borisov
2023-07-14 12:28   ` Nikolay Borisov
2023-07-17  0:57     ` Huang, Kai
2023-07-12  8:55 ` [PATCH 05/10] x86/tdx: Rename __tdx_module_call() to __tdcall() Kai Huang
2023-07-12  8:55 ` [PATCH 06/10] x86/tdx: Pass TDCALL/SEAMCALL input/output registers via a structure Kai Huang
2023-07-12  8:55 ` [PATCH 07/10] x86/tdx: Extend TDX_MODULE_CALL to support more TDCALL/SEAMCALL leafs Kai Huang
2023-07-12 16:53   ` Peter Zijlstra
2023-07-12 16:59     ` Peter Zijlstra
2023-07-13  8:02       ` Huang, Kai
2023-07-13  8:43         ` Peter Zijlstra
2023-07-13 10:19           ` Huang, Kai
2023-07-13 10:24             ` Huang, Kai
2023-07-13 10:39               ` Peter Zijlstra
2023-07-13 10:37             ` Peter Zijlstra
2023-07-13 10:47               ` Huang, Kai
2023-07-13 11:22                 ` Andrew Cooper
2023-07-13 11:40                   ` Huang, Kai
2023-07-13  7:48     ` Huang, Kai
2023-07-13  8:46       ` Peter Zijlstra
2023-07-13  9:34         ` Huang, Kai
2023-07-13  9:40           ` Peter Zijlstra
2023-07-12 17:11   ` Peter Zijlstra
2023-07-13  8:09     ` Huang, Kai
2023-07-13  9:01       ` Peter Zijlstra
2023-07-13  9:15         ` Huang, Kai
2023-07-13  9:25           ` Peter Zijlstra
2023-07-13 10:01             ` Huang, Kai
2023-07-12  8:55 ` [PATCH 08/10] x86/tdx: Unify TDX_HYPERCALL and TDX_MODULE_CALL assembly Kai Huang
2023-07-15 10:05   ` Nikolay Borisov
2023-07-17  6:35     ` Huang, Kai
2023-07-17  7:02       ` Nikolay Borisov
2023-07-17  7:58         ` Huang, Kai
2023-07-18 10:32           ` Huang, Kai
2023-07-12  8:55 ` [PATCH 09/10] x86/virt/tdx: Wire up basic SEAMCALL functions Kai Huang
2023-07-12 22:15   ` Isaku Yamahata
2023-07-13  3:46     ` Huang, Kai
2023-07-13  7:42       ` Peter Zijlstra
2023-07-13  8:18         ` Huang, Kai
2023-07-13  9:03           ` Peter Zijlstra
2023-07-13  9:20             ` Huang, Kai
2023-07-13 14:51           ` Sean Christopherson
2023-07-17  3:52             ` Huang, Kai
2023-07-13 18:44       ` Isaku Yamahata
2023-08-08  9:16         ` Yuan Yao
2023-08-14 20:37           ` Isaku Yamahata
2023-07-12  8:55 ` [PATCH 10/10] x86/virt/tdx: Allow SEAMCALL to handle #UD and #GP Kai Huang
2023-07-13  8:07   ` Peter Zijlstra
2023-07-13  9:58     ` Huang, Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).