Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754271AbbHaTVQ (ORCPT ); Mon, 31 Aug 2015 15:21:16 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:37421 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753917AbbHaTVP (ORCPT ); Mon, 31 Aug 2015 15:21:15 -0400 Message-ID: <55E4A8D7.4030308@oracle.com> Date: Mon, 31 Aug 2015 15:19:51 -0400 From: Boris Ostrovsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jan Beulich , xen-devel CC: David Vrabel , Konrad Rzeszutek Wilk , Alok Kataria , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List Subject: Re: [PATCH RFC Linux] x86/xen: allow using x2APIC under Xen without CONFIG_XEN enabled References: <55D5DE76020000780009C2B5@prv-mh.provo.novell.com> In-Reply-To: <55D5DE76020000780009C2B5@prv-mh.provo.novell.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1785 Lines: 51 On 08/20/2015 08:04 AM, Jan Beulich wrote: > While commit 4cca6ea04d31c claims to not have any functional effect on > Xen, this isn't the case: Before that change, kernels built without > CONFIG_XEN_PVHVM (a dependency which meanwhile became just CONFIG_XEN) > were able to run in x2APIC mode just fine. Restore that behavior. > > This, however, still doesn't fix the case where CONFIG_HYPERVISOR_GUEST > is not enabled, but I suppose this may be regarded as intentional. > > Signed-off-by: Jan Beulich > --- > The patch is RFC solely because the way the issue gets fixed doesn't > look very neat, but I couldn't figure out a better way. (+ x86 maintainers) Can we provide something like xen_stub.c (that will have its own x86_hyper ops, probably only x2apic_available and maybe detect) which is built when !CONFIG_XEN? Otherwise I see little reason to keep x2apic_available op and we should revert the portion of 4cca6ea04d31c that introduced it. -boris > --- > arch/x86/kernel/cpu/hypervisor.c | 4 ++++ > 1 file changed, 4 insertions(+) > > --- 4.2-rc7/arch/x86/kernel/cpu/hypervisor.c > +++ 4.2-rc7-x86-xen-x2apic-available/arch/x86/kernel/cpu/hypervisor.c > @@ -81,6 +81,10 @@ void __init init_hypervisor_platform(voi > > bool __init hypervisor_x2apic_available(void) > { > +#ifndef CONFIG_XEN > + if (xen_x2apic_para_available()) > + return true; > +#endif > return x86_hyper && > x86_hyper->x2apic_available && > x86_hyper->x2apic_available(); > > > -- 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/