aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/kvm/vmx/tdx.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/vmx/tdx.h')
-rw-r--r--arch/x86/kvm/vmx/tdx.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/x86/kvm/vmx/tdx.h b/arch/x86/kvm/vmx/tdx.h
index 5f34b79d16dd..0a54d286e380 100644
--- a/arch/x86/kvm/vmx/tdx.h
+++ b/arch/x86/kvm/vmx/tdx.h
@@ -6,6 +6,8 @@
#include "tdx_errno.h"
#ifdef CONFIG_KVM_INTEL_TDX
+#include "common.h"
+
int tdx_bringup(void);
void tdx_cleanup(void);
@@ -45,28 +47,23 @@ enum vcpu_tdx_state {
struct vcpu_tdx {
struct kvm_vcpu vcpu;
+ struct vcpu_vt vt;
+ struct tdx_module_args vp_enter_args;
struct tdx_vp vp;
struct list_head cpu_list;
+ u64 vp_enter_ret;
+
enum vcpu_tdx_state state;
+ bool guest_entered;
};
void tdh_vp_rd_failed(struct vcpu_tdx *tdx, char *uclass, u32 field, u64 err);
void tdh_vp_wr_failed(struct vcpu_tdx *tdx, char *uclass, char *op, u32 field,
u64 val, u64 err);
-static inline bool is_td(struct kvm *kvm)
-{
- return kvm->arch.vm_type == KVM_X86_TDX_VM;
-}
-
-static inline bool is_td_vcpu(struct kvm_vcpu *vcpu)
-{
- return is_td(vcpu->kvm);
-}
-
static __always_inline u64 td_tdcs_exec_read64(struct kvm_tdx *kvm_tdx, u32 field)
{
u64 err, data;
@@ -176,9 +173,6 @@ struct vcpu_tdx {
struct kvm_vcpu vcpu;
};
-static inline bool is_td(struct kvm *kvm) { return false; }
-static inline bool is_td_vcpu(struct kvm_vcpu *vcpu) { return false; }
-
#endif
#endif