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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 5EC94C38A2A for ; Fri, 8 May 2020 08:10:35 +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 2FF51207DD for ; Fri, 8 May 2020 08:10:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FF51207DD 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.92) (envelope-from ) id 1jWy5Q-0005am-Vr; Fri, 08 May 2020 08:10:24 +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.92) (envelope-from ) id 1jWy5P-0005ad-8Y for xen-devel@lists.xenproject.org; Fri, 08 May 2020 08:10:23 +0000 X-Inumbo-ID: 5ca8c028-9103-11ea-9fcd-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 5ca8c028-9103-11ea-9fcd-12813bfff9fa; Fri, 08 May 2020 08:10:21 +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 89D70AAC7; Fri, 8 May 2020 08:10:23 +0000 (UTC) Subject: Re: [PATCH v8 01/12] x86emul: disable FPU/MMX/SIMD insn emulation when !HVM To: Andrew Cooper References: <60cc730f-2a1c-d7a6-74fe-64f3c9308831@suse.com> <6110ec4d-36a7-efa7-fb86-069ec5b83ac2@suse.com> From: Jan Beulich Message-ID: <62c1b64a-5ddb-d6d0-26e7-519eb2695d84@suse.com> Date: Fri, 8 May 2020 10:10:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "xen-devel@lists.xenproject.org" , Wei Liu , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 07.05.2020 20:11, Andrew Cooper wrote: > On 05/05/2020 09:12, Jan Beulich wrote: >> In a pure PV environment (the PV shim in particular) we don't really >> need emulation of all these. To limit #ifdef-ary utilize some of the >> CASE_*() macros we have, by providing variants expanding to >> (effectively) nothing (really a label, which in turn requires passing >> -Wno-unused-label to the compiler when build such configurations). >> >> Due to the mixture of macro and #ifdef use, the placement of some of >> the #ifdef-s is a little arbitrary. >> >> The resulting object file's .text is less than half the size of the >> original, and looks to also be compiling a little more quickly. >> >> This is meant as a first step; more parts can likely be disabled down >> the road. >> >> Suggested-by: Andrew Cooper >> Signed-off-by: Jan Beulich >> --- >> v7: Integrate into this series. Re-base. >> --- >> I'll be happy to take suggestions allowing to avoid -Wno-unused-label. > > I already gave you one, along with a far less invasive change. > > It is not interesting to be able to conditionally compile these things > separately.  A build of Xen will either need everything, or just the > integer group. And I had replied to that, indicating my (at least partial) disagreement as well as asking for clarification on an apparently incomplete sentence in your response. Note that in an initial (3 months earlier) reply you did say "On that subject, it would be very helpful to at least be able to configure reduced builds from these utilities." which I responded to "Yes, I too have been thinking this way. I may get there eventually." I specifically meant FPU-less, MMX-less, and SIMD-less each on their own. I'm also not at all convinced of, as you say, "a build of Xen will either need everything, or just the integer group". Yes, for now I unilaterally disable all three for !HVM here, but that's just because we know of no PV guests trying to update their page tables in "interesting" ways. Long term I think this would better be a separate Kconfig option (or multiple ones, if we stick to keeping the three groups here to have separate controls), merely defaulting to !HVM. I could of course switch to such an approach right away. Jan