From patchwork Wed Jul 31 13:33:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jin Nan Wang X-Patchwork-Id: 11067935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E98BF912 for ; Wed, 31 Jul 2019 13:46:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7CB828986 for ; Wed, 31 Jul 2019 13:46:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB79F28991; Wed, 31 Jul 2019 13:46:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7CE1528995 for ; Wed, 31 Jul 2019 13:46:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hsouB-0005iT-M7; Wed, 31 Jul 2019 13:44:35 +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 1hsouA-0005iH-7t for xen-devel@lists.xenproject.org; Wed, 31 Jul 2019 13:44:34 +0000 X-Inumbo-ID: 4ddc3f0e-b399-11e9-b1a5-eff95a14a863 Received: from m4a0040g.houston.softwaregrp.com (unknown [15.124.2.86]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4ddc3f0e-b399-11e9-b1a5-eff95a14a863; Wed, 31 Jul 2019 13:44:30 +0000 (UTC) Received: FROM m4a0040g.houston.softwaregrp.com (15.120.17.146) BY m4a0040g.houston.softwaregrp.com WITH ESMTP; Wed, 31 Jul 2019 13:44:20 +0000 Received: from M9W0067.microfocus.com (2002:f79:be::f79:be) by M4W0334.microfocus.com (2002:f78:1192::f78:1192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Wed, 31 Jul 2019 13:33:46 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.124.72.12) by M9W0067.microfocus.com (15.121.0.190) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Wed, 31 Jul 2019 13:33:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZt2hIfetv3QNt1TtZrC+Y9kx0WUeLz36u5DvknRaidh+zDW3fedLRmDcPu6pzyeopx1chLBv16+TEkdoUpuUmmZVBRTqbEoDpk+OgJm25nE8M2zaxP/gXzoSJxvsGOTFAVorrovoeeB3nQAlgsM30E0pxTQlAEjINzYxvfjtBSY6f2s7nC+jHzw8dSxFSQxIhybnngeHBPzZEXD3Nutx4RtLwvN00NuuWu7f4Rg145HpsMbnSNG0H+yJQEc8BJESPXyXfXRrZw0NU0jsBf8qODZBFjRBaTf2GME3V/at6nxQN6Z1EyuzH6BcXMXvwyBlru01WqHR0iu+U4HH9TelQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7/xSTADiD07/l/fosXubD9Scd+qOTl7yjuMAGXPREaU=; b=n632iQIoIyD+e398gLof4avfu0CPOSIDM0LsFa/BAZ10+i5h0NQ+BW8oq5o7khywLSIRolfPCHVCObUlE1U/7C+QYk60M1qIkgSIFrVSFRZq8cPZ/zLeX7/K2Yoy8ZmiVloGjuTiby6sWr+cqlvXirNn4Ij92+qWnD5LYHGfQb8YNY1BX9nf+CE8cuKnVO5+shf73U6Xg7+k2jAOKy9j+DQfPUy8LOAUuAd/bgse6GFaLrMdoXRhwxbbrJxtaLwdcwLjQNyMyCLu2eKzb1NjET1CJHM6SwQLLT3BaO5RklQfyteu/NPZqBrbQVHEzKQZU9NWFvLEAzPky05UmB0n1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none Received: from BY5PR18MB3170.namprd18.prod.outlook.com (10.255.137.144) by BY5PR18MB3266.namprd18.prod.outlook.com (10.255.163.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.14; Wed, 31 Jul 2019 13:33:44 +0000 Received: from BY5PR18MB3170.namprd18.prod.outlook.com ([fe80::ad30:31ad:5576:bb56]) by BY5PR18MB3170.namprd18.prod.outlook.com ([fe80::ad30:31ad:5576:bb56%7]) with mapi id 15.20.2136.010; Wed, 31 Jul 2019 13:33:44 +0000 From: Jin Nan Wang To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH v5] Speculative mitigation facilities report wrong status Thread-Index: AQHVR6SSmciFJgGM2k+zd1smgklw4w== Date: Wed, 31 Jul 2019 13:33:44 +0000 Message-ID: <20190731133325.23052-1-jnwang@suse.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SGBP274CA0012.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::24) To BY5PR18MB3170.namprd18.prod.outlook.com (2603:10b6:a03:1a9::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jnwang@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.22.0 x-originating-ip: [45.122.156.254] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c0db9fc4-e764-4f77-1e36-08d715bbb54b x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BY5PR18MB3266; x-ms-traffictypediagnostic: BY5PR18MB3266: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:214; x-forefront-prvs: 011579F31F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(376002)(346002)(39860400002)(396003)(366004)(136003)(199004)(189003)(2906002)(6512007)(14454004)(4326008)(476003)(2616005)(3846002)(6116002)(25786009)(86362001)(66446008)(66476007)(64756008)(107886003)(68736007)(66556008)(386003)(36756003)(478600001)(486006)(2501003)(66946007)(6506007)(50226002)(316002)(1076003)(6436002)(5640700003)(6486002)(26005)(66066001)(54906003)(99286004)(305945005)(8936002)(5660300002)(256004)(81166006)(7736002)(6916009)(71200400001)(71190400001)(186003)(8676002)(2351001)(53936002)(52116002)(102836004)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3266; H:BY5PR18MB3170.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 5U7oVRNt5OqnMDErERzg+r9W7xoHE8TGoZ/0QO+yy4vPSmmBvZMciiBq/Sr1d/YE4Y75mS6eiOxeBzgnYfXw9Z9c3YI9OLNOI4xLPJSFjQg89J3Ss+hpEiP6HuNdz5Jdu3a8aZS2f2SluFnCAnGpf9+Jw2E3lN4afh0CXSRIUVYuBtrYvWxXi0zReofKKaFELJ0dNARJN7Ilyl8DV9bO1HOctpuuNoUXYGb/B+6yhHB3e/vjIZBOK8X4NQnf5h4EpIBpRu8WikkK0gXU1iAd5LVzsKKUL0PFkskvve7F+79ENXXJ9ZsIPsbKeBiimAgEwYcxoPVUD0FnY7QqnsXZWV/qbY5887iTzm8pxZjgOJ/oPlHto7zOuIMyFrLfUMN0EJfUNkAUHomleYPb7qOhEgXKbAUw1348ENskKTzoOow= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c0db9fc4-e764-4f77-1e36-08d715bbb54b X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2019 13:33:44.3279 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jnwang@suse.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3266 X-OriginatorOrg: suse.com Subject: [Xen-devel] [PATCH v5] Speculative mitigation facilities report wrong status 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: "andrew.cooper3@citrix.com" , Jin Nan Wang , "wl@xen.org" , Jan Beulich , "roger.pau@citrix.com" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Booting with spec-ctrl=0 results in Xen printing "None MD_CLEAR". (XEN) Support for HVM VMs: None MD_CLEAR (XEN) Support for PV VMs: None MD_CLEAR Add a check about X86_FEATURE_MD_CLEAR to avoid to print "None". Signed-off-by: James Wang Reviewed-by: Andrew Cooper --- xen/arch/x86/spec_ctrl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c index cada9a058e..468a847598 100644 --- a/xen/arch/x86/spec_ctrl.c +++ b/xen/arch/x86/spec_ctrl.c @@ -366,6 +366,7 @@ static void __init print_details(enum ind_thunk thunk, uint64_t caps) printk(" Support for HVM VMs:%s%s%s%s%s\n", (boot_cpu_has(X86_FEATURE_SC_MSR_HVM) || boot_cpu_has(X86_FEATURE_SC_RSB_HVM) || + boot_cpu_has(X86_FEATURE_MD_CLEAR) || opt_eager_fpu) ? "" : " None", boot_cpu_has(X86_FEATURE_SC_MSR_HVM) ? " MSR_SPEC_CTRL" : "", boot_cpu_has(X86_FEATURE_SC_RSB_HVM) ? " RSB" : "", @@ -377,6 +378,7 @@ static void __init print_details(enum ind_thunk thunk, uint64_t caps) printk(" Support for PV VMs:%s%s%s%s%s\n", (boot_cpu_has(X86_FEATURE_SC_MSR_PV) || boot_cpu_has(X86_FEATURE_SC_RSB_PV) || + boot_cpu_has(X86_FEATURE_MD_CLEAR) || opt_eager_fpu) ? "" : " None", boot_cpu_has(X86_FEATURE_SC_MSR_PV) ? " MSR_SPEC_CTRL" : "", boot_cpu_has(X86_FEATURE_SC_RSB_PV) ? " RSB" : "",