diff --git a/hypervisor/arch/x86/guest/vmcs.c b/hypervisor/arch/x86/guest/vmcs.c index 2dec33340..04b0abd25 100644 --- a/hypervisor/arch/x86/guest/vmcs.c +++ b/hypervisor/arch/x86/guest/vmcs.c @@ -266,6 +266,7 @@ static void init_exec_ctrl(struct acrn_vcpu *vcpu) * guest access to IO bit-mapped ports causes VM exit * guest access to MSR causes VM exit * Activate secondary controls + * Activate tertiary controls */ /* These are bits 1,4-6,8,13-16, and 26, the corresponding bits of * the IA32_VMX_PROCBASED_CTRLS MSR are always read as 1 --- A.3.2 @@ -273,7 +274,7 @@ static void init_exec_ctrl(struct acrn_vcpu *vcpu) value32 = check_vmx_ctrl(MSR_IA32_VMX_PROCBASED_CTLS, VMX_PROCBASED_CTLS_TSC_OFF | VMX_PROCBASED_CTLS_TPR_SHADOW | VMX_PROCBASED_CTLS_IO_BITMAP | VMX_PROCBASED_CTLS_MSR_BITMAP | - VMX_PROCBASED_CTLS_HLT | VMX_PROCBASED_CTLS_SECONDARY); + VMX_PROCBASED_CTLS_HLT | VMX_PROCBASED_CTLS_SECONDARY | VMX_PROCBASED_CTLS_TERTIARY); /*Disable VM_EXIT for CR3 access*/ value32 &= ~(VMX_PROCBASED_CTLS_CR3_LOAD | VMX_PROCBASED_CTLS_CR3_STORE); diff --git a/hypervisor/include/arch/x86/msr.h b/hypervisor/include/arch/x86/msr.h index 7255359fa..e30184da7 100644 --- a/hypervisor/include/arch/x86/msr.h +++ b/hypervisor/include/arch/x86/msr.h @@ -254,6 +254,7 @@ #define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048FU #define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490U #define MSR_IA32_VMX_VMFUNC 0x00000491U +#define MSR_IA32_VMX_PROCBASED_CTLS3 0x00000492U #define MSR_IA32_A_PMC0 0x000004C1U #define MSR_IA32_A_PMC1 0x000004C2U #define MSR_IA32_A_PMC2 0x000004C3U diff --git a/hypervisor/include/arch/x86/vmx.h b/hypervisor/include/arch/x86/vmx.h index 3f2636e26..a33ee2bd4 100644 --- a/hypervisor/include/arch/x86/vmx.h +++ b/hypervisor/include/arch/x86/vmx.h @@ -281,6 +281,7 @@ #define VMX_PROCBASED_CTLS_RDTSC (1U<<12U) #define VMX_PROCBASED_CTLS_CR3_LOAD (1U<<15U) #define VMX_PROCBASED_CTLS_CR3_STORE (1U<<16U) +#define VMX_PROCBASED_CTLS_TERTIARY (1U<<17U) #define VMX_PROCBASED_CTLS_CR8_LOAD (1U<<19U) #define VMX_PROCBASED_CTLS_CR8_STORE (1U<<20U) #define VMX_PROCBASED_CTLS_TPR_SHADOW (1U<<21U)