[PATCH v3 00/14] x86/virt/tdx: Add SEAMCALL wrappers for KVM
From: Paolo Bonzini
Date: Wed Jan 15 2025 - 11:09:26 EST
Hi,
This is the final-ish version of the "SEAMCALL Wrappers" RFC[0], with
all the wrappers extracted out of the corresponding TDX patches.
This version of the series uses u64 only for guest physical addresses
and error return values:
* u64 pfn is replaced by struct page
* u64 level is replaced by int level
* u64 tdr and u64 tdvpr are replaced by structs that contain struct page
for them as well as for tdcs and tdcx.
A couple functions are also moved over from KVM to tdx.h
static inline u64 mk_keyed_paddr(u16 hkid, struct page *page)
static inline int pg_level_to_tdx_sept_level(enum pg_level level)
The plan is to include these in kvm.git together with their first user.
Thanks,
Paolo
Isaku Yamahata (5):
x86/virt/tdx: Add SEAMCALL wrapper tdh_mem_sept_add() to add SEPT
pages
x86/virt/tdx: Add SEAMCALL wrappers to add TD private pages
x86/virt/tdx: Add SEAMCALL wrappers to remove a TD private page
x86/virt/tdx: Add SEAMCALL wrappers for TD measurement of initial
contents
x86/virt/tdx: Add tdx_guest_keyid_alloc/free() to alloc and free TDX
guest KeyID
x86/virt/tdx: Add SEAMCALL wrappers to manage TDX TLB tracking
Kai Huang (1):
x86/virt/tdx: Add SEAMCALL wrapper to enter/exit TDX guest
x86/virt/tdx: Read essential global metadata for KVM
Rick Edgecombe (6):
x86/virt/tdx: Add SEAMCALL wrappers for TDX KeyID management
x86/virt/tdx: Add SEAMCALL wrappers for TDX TD creation
x86/virt/tdx: Add SEAMCALL wrappers for TDX vCPU creation
x86/virt/tdx: Add SEAMCALL wrappers for TDX page cache management
x86/virt/tdx: Add SEAMCALL wrappers for TDX VM/vCPU field access
x86/virt/tdx: Add SEAMCALL wrappers for TDX flush operations
arch/x86/include/asm/tdx.h | 68 ++++
arch/x86/virt/vmx/tdx/tdx.c | 403 ++++++++++++++++++++
arch/x86/virt/vmx/tdx/tdx.h | 47 ++-
arch/x86/virt/vmx/tdx/tdx_global_metadata.c | 50 +++
arch/x86/virt/vmx/tdx/tdx_global_metadata.h | 19 +
5 files changed, 580 insertions(+), 7 deletions(-)
--
2.43.5