From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753719AbbBMRr2 (ORCPT ); Fri, 13 Feb 2015 12:47:28 -0500 Received: from mga14.intel.com ([192.55.52.115]:55200 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753439AbbBMRr1 (ORCPT ); Fri, 13 Feb 2015 12:47:27 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,572,1418112000"; d="scan'208";a="685403162" Message-ID: <54DE38AB.50507@linux.intel.com> Date: Sat, 14 Feb 2015 01:47:23 +0800 From: Jiang Liu Organization: Intel User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Linus Torvalds , Joerg Roedel CC: "Rafael J. Wysocki" , Ingo Molnar , Linux Kernel Mailing List , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton Subject: Re: [GIT PULL] x86/apic updates for v3.20 References: <20150209091544.GA4177@gmail.com> <2495969.f1SBuodJtC@vostro.rjw.lan> <20150213154716.GG29106@8bytes.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/2/14 1:00, Linus Torvalds wrote: > On Fri, Feb 13, 2015 at 7:47 AM, Joerg Roedel wrote: >> >> So the condition should rather look like this to keep x2apic disabled >> like before: > > Yes, this works for me too. > >> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c >> index b665d24..770a0bb 100644 >> --- a/arch/x86/kernel/apic/apic.c >> +++ b/arch/x86/kernel/apic/apic.c >> @@ -1580,8 +1580,8 @@ static __init void try_to_enable_x2apic(int remap_mode) >> * under KVM >> */ >> if (max_physical_apicid > 255 || >> - (IS_ENABLED(CONFIG_HYPERVISOR_GUEST) && >> - !hypervisor_x2apic_available())) { >> + !(IS_ENABLED(CONFIG_HYPERVISOR_GUEST) && >> + hypervisor_x2apic_available())) { >> pr_info("x2apic: IRQ remapping doesn't support X2APIC mode\n"); >> x2apic_disable(); >> return; >> >> Another solution would be to just revert 5fcee53ce705. This code is not >> in any fast-path, so we can live well without that optimization. > > Jiang, preferences? Revert, or fix like the above? Hi Linus, I think reverting is better. The IS_ENABLED(CONFIG_HYPERVISOR_GUEST) optimization doesn't give us much, but it makes the code a little complex. Regards! Gerry > > Linus > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >