From d9cd7f964bafec9e4ffd405f031403bd53a104b3 Mon Sep 17 00:00:00 2001 From: Shuo A Liu Date: Tue, 23 Mar 2021 10:46:02 +0800 Subject: [PATCH] hv: WA: Disable advanced feature of apicv to WA ACRN-6886 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tracked-On: #5866 Signed-off-by: Shuo A Liu --- hypervisor/arch/x86/cpu_caps.c | 5 ++++- hypervisor/arch/x86/guest/vlapic.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/cpu_caps.c b/hypervisor/arch/x86/cpu_caps.c index e239d4fdb..6e326fc47 100644 --- a/hypervisor/arch/x86/cpu_caps.c +++ b/hypervisor/arch/x86/cpu_caps.c @@ -357,7 +357,10 @@ static inline bool is_apicv_basic_feature_supported(void) bool is_apicv_advanced_feature_supported(void) { - return ((cpu_caps.apicv_features & APICV_ADVANCED_FEATURE) == APICV_ADVANCED_FEATURE); + /* + * To WA ACRN-6886 issue, force to disable apicv advanced feature. + */ + return false; } bool pcpu_has_vmx_ept_cap(uint32_t bit_mask) diff --git a/hypervisor/arch/x86/guest/vlapic.c b/hypervisor/arch/x86/guest/vlapic.c index 7f2436383..2684c7906 100644 --- a/hypervisor/arch/x86/guest/vlapic.c +++ b/hypervisor/arch/x86/guest/vlapic.c @@ -2644,8 +2644,10 @@ static const struct acrn_apicv_ops apicv_advanced_ops = { void vlapic_set_apicv_ops(void) { if (is_apicv_advanced_feature_supported()) { + pr_err("Advanced apicv ops is used!"); apicv_ops = &apicv_advanced_ops; } else { + pr_err("Basic apicv ops is used!"); apicv_ops = &apicv_basic_ops; } }