Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B325C2BA2B for ; Thu, 9 Apr 2020 12:24:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B71C20857 for ; Thu, 9 Apr 2020 12:24:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B71C20857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMWEB-0001vx-LD; Thu, 09 Apr 2020 12:24:15 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMWEA-0001vs-Bs for xen-devel@lists.xenproject.org; Thu, 09 Apr 2020 12:24:14 +0000 X-Inumbo-ID: 04c5b153-7a5d-11ea-82b6-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 04c5b153-7a5d-11ea-82b6-12813bfff9fa; Thu, 09 Apr 2020 12:24:13 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 69218AE38; Thu, 9 Apr 2020 12:24:11 +0000 (UTC) Subject: Re: [PATCH v5 03/10] x86: determine HAVE_AS_* just once To: Andrew Cooper References: <6fa81b4d-528d-5c33-50c5-a18396b4383a@suse.com> <2c83b876-6fd8-1315-3b28-b45e877187aa@suse.com> <7147e3a1-b237-7a2b-d623-b364704d0096@citrix.com> From: Jan Beulich Message-ID: Date: Thu, 9 Apr 2020 14:24:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <7147e3a1-b237-7a2b-d623-b364704d0096@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Ian Jackson , George Dunlap , Anthony PERARD , "xen-devel@lists.xenproject.org" , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 25.03.2020 22:12, Andrew Cooper wrote: > On 24/03/2020 12:33, Jan Beulich wrote: >> With the exception of HAVE_AS_QUOTED_SYM, populate the results into a >> generated header instead of (at least once per [sub]directory) into >> CFLAGS. This results in proper rebuilds (via make dependencies) in case >> the compiler used changes between builds. It additionally eases >> inspection of which assembler features were actually found usable. >> >> Some trickery is needed to avoid header generation itself to try to >> include the to-be/not-yet-generated header. >> >> Since the definitions in generated/config.h, previously having been >> command line options, might even affect xen/config.h or its descendants, >> move adding of the -include option for the latter after inclusion of the >> per-arch Rules.mk. Use the occasion to also move the most general -I >> option to the common Rules.mk. >> >> Signed-off-by: Jan Beulich > > Given the work of Anthony's which is already committed in staging, I'd > really prefer this patch to look something like > https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=WIP.x86/asm&id=95ef9f80ed6359e89f988121521c421b7e9528de > > That avoids all fragile games with includes, and is the position we want > to be in, longterm. I've thought about this some more, and not just because of the issue with tool chain updates (or downgrades) I'm not convinced this is the way to go, irrespective of whether Linux does. I've gone through Linux'es Kconfig documentation again, and I couldn't find a hint that this is supposed to cover other than user choices. Determining tool chain capabilities at build (rather than configure) time seems quite a bit more reliable to me. IOW there ought to be a clear distinction between "what kind of kernel [or hypervisor] do I want" and "how does the kernel [hypervisor] get built". When it comes to certain user choices requiring certain tool chain capabilities, then the help text should point this out and the build should probably be made fail if the prereqs aren't met (alternatively behavior like that of our xen.efi building could be chosen, with a warning issued during the build process). If we (and perhaps also they) clearly stated that the intention is to also latch system properties (like userland ./configure would do), and if the intended behavior was clearly spelled out when it comes to any of those latched properties changing, then I might change my opinion. Jan