Messages in this thread | | | Date | Fri, 2 Feb 2024 09:02:27 +0800 | Subject | Re: [PATCH v18 012/121] KVM: TDX: Define TDX architectural definitions | From | Xiaoyao Li <> |
| |
On 1/23/2024 7:52 AM, isaku.yamahata@intel.com wrote: > From: Isaku Yamahata <isaku.yamahata@intel.com> > > Define architectural definitions for KVM to issue the TDX SEAMCALLs. > > Structures and values that are architecturally defined in the TDX module > specifications the chapter of ABI Reference. > > Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> > Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> > --- > v18: > - Add metadata field id > --- > arch/x86/kvm/vmx/tdx_arch.h | 269 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 269 insertions(+) > create mode 100644 arch/x86/kvm/vmx/tdx_arch.h > > diff --git a/arch/x86/kvm/vmx/tdx_arch.h b/arch/x86/kvm/vmx/tdx_arch.h > new file mode 100644 > index 000000000000..569d59c55229 > --- /dev/null > +++ b/arch/x86/kvm/vmx/tdx_arch.h > @@ -0,0 +1,269 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* architectural constants/data definitions for TDX SEAMCALLs */ > + > +#ifndef __KVM_X86_TDX_ARCH_H > +#define __KVM_X86_TDX_ARCH_H > + > +#include <linux/types.h> > + > +/* > + * TDX SEAMCALL API function leaves > + */ > +#define TDH_VP_ENTER 0 > +#define TDH_MNG_ADDCX 1 > +#define TDH_MEM_PAGE_ADD 2 > +#define TDH_MEM_SEPT_ADD 3 > +#define TDH_VP_ADDCX 4 > +#define TDH_MEM_PAGE_RELOCATE 5 > +#define TDH_MEM_PAGE_AUG 6 > +#define TDH_MEM_RANGE_BLOCK 7 > +#define TDH_MNG_KEY_CONFIG 8 > +#define TDH_MNG_CREATE 9 > +#define TDH_VP_CREATE 10 > +#define TDH_MNG_RD 11 > +#define TDH_MR_EXTEND 16 > +#define TDH_MR_FINALIZE 17 > +#define TDH_VP_FLUSH 18 > +#define TDH_MNG_VPFLUSHDONE 19 > +#define TDH_MNG_KEY_FREEID 20 > +#define TDH_MNG_INIT 21 > +#define TDH_VP_INIT 22 > +#define TDH_MEM_SEPT_RD 25 > +#define TDH_VP_RD 26 > +#define TDH_MNG_KEY_RECLAIMID 27 > +#define TDH_PHYMEM_PAGE_RECLAIM 28 > +#define TDH_MEM_PAGE_REMOVE 29 > +#define TDH_MEM_SEPT_REMOVE 30 > +#define TDH_SYS_RD 34 > +#define TDH_MEM_TRACK 38 > +#define TDH_MEM_RANGE_UNBLOCK 39 > +#define TDH_PHYMEM_CACHE_WB 40 > +#define TDH_PHYMEM_PAGE_WBINVD 41 > +#define TDH_VP_WR 43 > +#define TDH_SYS_LP_SHUTDOWN 44 > + > +#define TDG_VP_VMCALL_GET_TD_VM_CALL_INFO 0x10000 > +#define TDG_VP_VMCALL_MAP_GPA 0x10001 > +#define TDG_VP_VMCALL_GET_QUOTE 0x10002 > +#define TDG_VP_VMCALL_REPORT_FATAL_ERROR 0x10003 > +#define TDG_VP_VMCALL_SETUP_EVENT_NOTIFY_INTERRUPT 0x10004 > +
these are definitions shared with TDX guest codes, and already defined in arch/x86/include/asm/shared/tdx.h. Please drop it.
Other than above,
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
| |