@@ -7648,6 +7648,12 @@ static int vmx_vcpu_create(struct kvm_vcpu *vcpu)
tsx_ctrl->mask = ~(u64)TSX_CTRL_CPUID_CLEAR;
}
+ /*
+ * hfi_table_idx is initialized to 0, but later it may be changed according
+ * to the value in the Guest's CPUID.0x06.edx[bits 16-31].
+ */
+ vmx->hfi_table_idx = 0;
+
err = alloc_loaded_vmcs(&vmx->vmcs01);
if (err < 0)
goto free_pml;
@@ -362,6 +362,9 @@ struct vcpu_vmx {
struct pt_desc pt_desc;
struct lbr_desc lbr_desc;
+ /* Should be extracted from Guest's CPUID.0x06.edx[bits 16-31]. */
+ int hfi_table_idx;
+
/* Save desired MSR intercept (read: pass-through) state */
#define MAX_POSSIBLE_PASSTHROUGH_MSRS 16
struct {