diff --git a/hypervisor/arch/x86/cpu_caps.c b/hypervisor/arch/x86/cpu_caps.c index 759f7d675..847e1c845 100644 --- a/hypervisor/arch/x86/cpu_caps.c +++ b/hypervisor/arch/x86/cpu_caps.c @@ -57,17 +57,6 @@ bool pcpu_has_cap(uint32_t bit) return ret; } -bool monitor_cap_buggy(void) -{ - bool buggy = false; - - if ((boot_cpu_data.displayfamily == 0x6U) && (boot_cpu_data.displaymodel == 0x5cU)) { - buggy = true; - } - - return buggy; -} - bool has_monitor_cap(void) { bool ret = false; @@ -77,7 +66,7 @@ bool has_monitor_cap(void) * in hypervisor, but still expose it to the guests and * let them handle it correctly */ - if (!monitor_cap_buggy()) { + if (!is_apl_platform()) { ret = true; } } @@ -118,7 +107,7 @@ bool is_apl_platform(void) { bool ret = false; - if ((boot_cpu_data.displayfamily == 0x6U) && (boot_cpu_data.displaymodel == 0x92U)) { + if ((boot_cpu_data.displayfamily == 0x6U) && (boot_cpu_data.displaymodel == 0x5cU)) { ret = true; } diff --git a/hypervisor/arch/x86/guest/vmsr.c b/hypervisor/arch/x86/guest/vmsr.c index 6ba5153ae..cf5d6dbc3 100644 --- a/hypervisor/arch/x86/guest/vmsr.c +++ b/hypervisor/arch/x86/guest/vmsr.c @@ -698,7 +698,7 @@ static void set_guest_ia32_misc_enalbe(struct acrn_vcpu *vcpu, uint64_t v) if ((ecx & CPUID_ECX_SSE3) == 0U) { vcpu_inject_gp(vcpu, 0U); update_vmsr = false; - } else if ((!has_monitor_cap()) && (!monitor_cap_buggy())) { + } else if ((!has_monitor_cap()) && (!is_apl_platform())) { msr_value = msr_read(MSR_IA32_MISC_ENABLE) & ~MSR_IA32_MISC_ENABLE_MONITOR_ENA; msr_value |= v & MSR_IA32_MISC_ENABLE_MONITOR_ENA; /* This will not change the return value of has_monitor_cap() since the feature values diff --git a/hypervisor/include/arch/x86/cpu_caps.h b/hypervisor/include/arch/x86/cpu_caps.h index 39a40f755..486625598 100644 --- a/hypervisor/include/arch/x86/cpu_caps.h +++ b/hypervisor/include/arch/x86/cpu_caps.h @@ -46,7 +46,7 @@ struct cpuinfo_x86 { }; bool has_monitor_cap(void); -bool monitor_cap_buggy(void); +bool is_apl_platform(void); bool is_apicv_advanced_feature_supported(void); bool pcpu_has_cap(uint32_t bit); bool pcpu_has_vmx_ept_cap(uint32_t bit_mask);