]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: TDX: Implement TDX vcpu enter/exit path
authorIsaku Yamahata <isaku.yamahata@intel.com>
Wed, 29 Jan 2025 09:58:54 +0000 (11:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Mar 2025 18:20:54 +0000 (14:20 -0400)
commit81bf912b2c15201ac96ee07042f804d02c0f69ee
tree2a80b23504a6f5f2975e78f84cc8b963bdb8cab9
parent7172c753c26a51c2e2bce922f0c94b62cb2ade46
KVM: TDX: Implement TDX vcpu enter/exit path

Implement callbacks to enter/exit a TDX VCPU by calling tdh_vp_enter().
Ensure the TDX VCPU is in a correct state to run.

Do not pass arguments from/to vcpu->arch.regs[] unconditionally. Instead,
marshall state to/from the appropriate x86 registers only when needed,
i.e., to handle some TDVMCALL sub-leaves following KVM's ABI to leverage
the existing code.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20250129095902.16391-6-adrian.hunter@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/main.c
arch/x86/kvm/vmx/tdx.c
arch/x86/kvm/vmx/tdx.h
arch/x86/kvm/vmx/x86_ops.h