|
@@ -360,6 +360,11 @@ static inline bool cpu_has_vmx_invept_global(void)
|
|
return vmx_capability.ept & VMX_EPT_EXTENT_GLOBAL_BIT;
|
|
return vmx_capability.ept & VMX_EPT_EXTENT_GLOBAL_BIT;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline bool cpu_has_vmx_invvpid_single(void)
|
|
|
|
+{
|
|
|
|
+ return vmx_capability.vpid & VMX_VPID_EXTENT_SINGLE_CONTEXT_BIT;
|
|
|
|
+}
|
|
|
|
+
|
|
static inline bool cpu_has_vmx_ept(void)
|
|
static inline bool cpu_has_vmx_ept(void)
|
|
{
|
|
{
|
|
return vmcs_config.cpu_based_2nd_exec_ctrl &
|
|
return vmcs_config.cpu_based_2nd_exec_ctrl &
|
|
@@ -504,7 +509,8 @@ static inline void vpid_sync_vcpu_all(struct vcpu_vmx *vmx)
|
|
if (vmx->vpid == 0)
|
|
if (vmx->vpid == 0)
|
|
return;
|
|
return;
|
|
|
|
|
|
- __invvpid(VMX_VPID_EXTENT_SINGLE_CONTEXT, vmx->vpid, 0);
|
|
|
|
|
|
+ if (cpu_has_vmx_invvpid_single())
|
|
|
|
+ __invvpid(VMX_VPID_EXTENT_SINGLE_CONTEXT, vmx->vpid, 0);
|
|
}
|
|
}
|
|
|
|
|
|
static inline void ept_sync_global(void)
|
|
static inline void ept_sync_global(void)
|