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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 3541FC433E1 for ; Mon, 15 Jun 2020 14:16:11 +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 13CD620644 for ; Mon, 15 Jun 2020 14:16:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13CD620644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.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 1jkptz-0007qj-L6; Mon, 15 Jun 2020 14:15:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jkpty-0007qe-9F for xen-devel@lists.xenproject.org; Mon, 15 Jun 2020 14:15:54 +0000 X-Inumbo-ID: b8871778-af12-11ea-bca7-bc764e2007e4 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b8871778-af12-11ea-bca7-bc764e2007e4; Mon, 15 Jun 2020 14:15:53 +0000 (UTC) Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: VXRaQHLY4k7JjwaoxKNDHqKX0pr/aBzrF1Bbk363BgZ0pD1EnDAEaIUav89syhYzpOix2wEk6T fbU6En0io1tAXmylQSQ1n1Z/dSlK5n3ib3bJC1WrvAXEk5HMhUXXPrQnqrOQjEHLfcZ1JceZf3 ivBl5mCl4VuS5CVq+yoJ6j/iurALy7wXY9Yg13AqRvJPkDO+7A6Q15dkywCGG52h96VIhJXoWd r8I/n+eQT9C380AaKmhNNHTKMBa/TU5+FSxvGuADahUtSZoovtv4aEwA/kFkqo1lu1sNkL4WRM YAg= X-SBRS: 2.7 X-MesageID: 20064836 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,514,1583211600"; d="scan'208";a="20064836" From: Andrew Cooper To: Xen-devel Subject: [PATCH 6/9] x86/gen-cpuid: Distinguish default vs max in feature annotations Date: Mon, 15 Jun 2020 15:15:29 +0100 Message-ID: <20200615141532.1927-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200615141532.1927-1-andrew.cooper3@citrix.com> References: <20200615141532.1927-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" 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: Wei Liu , Paul Durrant , Andrew Cooper , Jan Beulich , Ian Jackson , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The toolstack logic can now correctly distinguish a clean boot from a migrate/restore. Allow lowercase a/s/h to be used to annotate a non-default feature. Due to the emulator work prepared earlier in 4.14, this now allows VMs to explicity opt in to the TSXLDTRK, MOVDIR{I,64B} and SERIALIZE instructions via their xl.cfg file, rather than getting them as a matter of default. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné CC: Ian Jackson CC: Wei Liu CC: Paul Durrant --- xen/tools/gen-cpuid.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py index 037954cfb8..ffd9529fdf 100755 --- a/xen/tools/gen-cpuid.py +++ b/xen/tools/gen-cpuid.py @@ -130,17 +130,13 @@ def crunch_numbers(state): MTRR, PGE, MCA, CMOV, PAT, PSE36, MMX, FXSR) state.common_1d = common_1d - state.pv_def = state.raw['A'] - state.hvm_shadow_def = state.pv_def | state.raw['S'] - state.hvm_hap_def = state.hvm_shadow_def | state.raw['H'] - - # TODO: Ignore def/max split until the toolstack migration logic is fixed - state.pv_max = state.pv_def - state.hvm_shadow_max = state.hvm_shadow_def - state.hvm_hap_max = state.hvm_hap_def - # state.pv_max = state.raw['A'] | state.raw['a'] - # state.hvm_shadow_max = state.pv_max | state.raw['S'] | state.raw['s'] - # state.hvm_hap_max = state.hvm_shadow_max | state.raw['H'] | state.raw['h'] + state.pv_def = state.raw['A'] + state.hvm_shadow_def = state.pv_def | state.raw['S'] + state.hvm_hap_def = state.hvm_shadow_def | state.raw['H'] + + state.pv_max = state.raw['A'] | state.raw['a'] + state.hvm_shadow_max = state.pv_max | state.raw['S'] | state.raw['s'] + state.hvm_hap_max = state.hvm_shadow_max | state.raw['H'] | state.raw['h'] # # Feature dependency information. -- 2.11.0