mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
hv: remove duplicated is_vmx_disabled
This patch fixes the duplicated functions introduced by cpu caps modularization. In cpu caps modularization, function `is_vmx_disabled` was supposed to be moved from `arch/x86/vmcs.c` to`arch/x86/cpu_caps.c`, but the original one was not removed. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -14,23 +14,6 @@ static uint64_t cr0_always_off_mask;
|
||||
static uint64_t cr4_always_on_mask;
|
||||
static uint64_t cr4_always_off_mask;
|
||||
|
||||
bool is_vmx_disabled(void)
|
||||
{
|
||||
uint64_t msr_val;
|
||||
bool ret = false;
|
||||
|
||||
/* Read Feature ControL MSR */
|
||||
msr_val = msr_read(MSR_IA32_FEATURE_CONTROL);
|
||||
|
||||
/* Check if feature control is locked and vmx cannot be enabled */
|
||||
if (((msr_val & MSR_IA32_FEATURE_CONTROL_LOCK) != 0U) &&
|
||||
((msr_val & MSR_IA32_FEATURE_CONTROL_VMX_NO_SMX) == 0U)) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void init_cr0_cr4_host_mask(void)
|
||||
{
|
||||
static bool inited = false;
|
||||
|
||||
Reference in New Issue
Block a user