[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1565922356-4488-2-git-send-email-yakui.zhao@intel.com>
Date: Fri, 16 Aug 2019 10:25:42 +0800
From: Zhao Yakui <yakui.zhao@...el.com>
To: x86@...nel.org, linux-kernel@...r.kernel.org,
devel@...verdev.osuosl.org
Cc: Zhao Yakui <yakui.zhao@...el.com>,
Jason Chen CJ <jason.cj.chen@...el.com>
Subject: [RFC PATCH 01/15] x86/acrn: Report X2APIC for ACRN guest
After lapic is switched from xapic to x2apic mode, it can use the APIC
MSR register to access local apic register in ACRN guest. This will
help to remove some traps of lapic access in ACRN guest.
Report the X2APIC so that the ACRN guest can be switched to x2apic mode.
Co-developed-by: Jason Chen CJ <jason.cj.chen@...el.com>
Signed-off-by: Jason Chen CJ <jason.cj.chen@...el.com>
Signed-off-by: Zhao Yakui <yakui.zhao@...el.com>
---
arch/x86/kernel/cpu/acrn.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/acrn.c b/arch/x86/kernel/cpu/acrn.c
index 676022e..95db5c4 100644
--- a/arch/x86/kernel/cpu/acrn.c
+++ b/arch/x86/kernel/cpu/acrn.c
@@ -12,6 +12,7 @@
#include <linux/interrupt.h>
#include <asm/acrn.h>
#include <asm/apic.h>
+#include <asm/cpufeatures.h>
#include <asm/desc.h>
#include <asm/hypervisor.h>
#include <asm/irq_regs.h>
@@ -29,12 +30,7 @@ static void __init acrn_init_platform(void)
static bool acrn_x2apic_available(void)
{
- /*
- * x2apic is not supported for now. Future enablement will have to check
- * X86_FEATURE_X2APIC to determine whether x2apic is supported in the
- * guest.
- */
- return false;
+ return boot_cpu_has(X86_FEATURE_X2APIC);
}
static void (*acrn_intr_handler)(void);
--
2.7.4
Powered by blists - more mailing lists