[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420615903-28253-12-git-send-email-jiang.liu@linux.intel.com>
Date: Wed, 7 Jan 2015 15:31:38 +0800
From: Jiang Liu <jiang.liu@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Joerg Roedel <joro@...tes.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Yinghai Lu <yinghai@...nel.org>,
Borislav Petkov <bp@...en8.de>, x86@...nel.org,
Jiang Liu <jiang.liu@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
HATAYAMA Daisuke <d.hatayama@...fujitsu.com>,
Jan Beulich <JBeulich@...e.com>,
Richard Weinberger <richard@....at>,
Oren Twaig <oren@...lemp.com>
Cc: Tony Luck <tony.luck@...el.com>, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org,
"H. Peter Anvin" <hpa@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>
Subject: [Patch v2 11/16] x86/apic: Only disable CPU x2apic mode when necessary
When interrupt remapping hardware is not in X2APIC, CPU X2APIC mode
will be disabled if:
1) Maximum CPU APIC ID is bigger than 255
2) hypervisior doesn't support x2apic mode.
But we should only check whether hypervisor supports X2APIC mode when
hypervisor(CONFIG_HYPERVISOR_GUEST) is enabled, otherwise X2APIC will
always be disabled when CONFIG_HYPERVISOR_GUEST is disabled and IR
doesn't work in X2APIC mode.
Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
---
arch/x86/kernel/apic/apic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 09ac1e4ef86b..d714e72ed6d5 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1601,7 +1601,8 @@ static __init void try_to_enable_x2apic(int ir_stat)
* under KVM
*/
if (max_physical_apicid > 255 ||
- !hypervisor_x2apic_available()) {
+ (IS_ENABLED(CONFIG_HYPERVISOR_GUEST) &&
+ !hypervisor_x2apic_available())) {
pr_info("IRQ remapping doesn't support X2APIC mode, disable x2apic.\n");
if (x2apic_preenabled)
disable_x2apic();
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists