From patchwork Wed Jul 31 13:09:16 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: 11067883 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 A5B1314DB for ; Wed, 31 Jul 2019 13:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9196C2896A for ; Wed, 31 Jul 2019 13:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8557527DA4; Wed, 31 Jul 2019 13:13:54 +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 3E5FD27DA4 for ; Wed, 31 Jul 2019 13:13:53 +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 1hsoOR-0002xN-4r; Wed, 31 Jul 2019 13:11:47 +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 1hsoOQ-0002xH-3f for xen-devel@lists.xenproject.org; Wed, 31 Jul 2019 13:11:46 +0000 X-Inumbo-ID: ba1fb722-b394-11e9-aa5c-73bdc9029650 Received: from m9a0002g.houston.softwaregrp.com (unknown [15.124.64.67]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ba1fb722-b394-11e9-aa5c-73bdc9029650; Wed, 31 Jul 2019 13:11:43 +0000 (UTC) Received: FROM m9a0002g.houston.softwaregrp.com (15.121.0.191) BY m9a0002g.houston.softwaregrp.com WITH ESMTP; Wed, 31 Jul 2019 13:11:38 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M9W0068.microfocus.com (2002:f79:bf::f79:bf) 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:09:17 +0000 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (15.124.8.12) by M4W0335.microfocus.com (15.120.17.147) 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:09:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BUwL6npI9YT6rsHJdppIlk9lZ2R6Z4lb9lcVjTcOxTxqwnHq9sARWBlRLj4jOhWr9J9OgvyzTAFOQjb9CKisapzWjNXK4RYjpepxyjuA0G3dmY7vMAQvcAMsiSPiVaV458LEZ6ZoviGpMXaTYlpVigktYUZR1LWLEPPGjZ2BAsVMtDJGw81VWWyLusZ7Lu7Qvns2JbXy3SaS9VcLj//ssN4c/FOCH9ucQp1vPRCo9z3XCVkJax4Y4fWRXHgktEkb18SZlipLzjZMVrGpC7MSZksS2NlrKQT3zte9bNlP8aNA7VtdJpSdVoi10Rv3YvSPWKx37xcgiCKKmjV0xRcu4A== 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=k5d48RE+eBDSgYYId1hbOqdisqqsoQyANgilf6GSx3Q=; b=Tj1E8OEFexWDkEbajqBU2fkXwO3U/5g+8pxxDX+pTlR7iwQrxyOGnqNTFAGQ7O8gbjFVXokn9EuVZIGqoIDzpdUn7H3MFa8vX8FyWuHD7WfYYxSJH5pyCzaMhdxO5bQrlaAuniU8GmXnypEzVsk64Vc0Y++gKIQhOwJVZOb83f/ySbY6TflgOpQQZJlSV7XNw4kCX/KtcOLmpIkkG3+oz5XZEoNdhTpI0uslhqTPURmW7crAXKkWgzeHjWmFicYWjgvuDzS4NsQG3TieqnFcRVVHYUcx54Am1Z6DzcUGIeRQIHSAoHZ0wqkmkJIlqAmj8g7Hh2bsKNvSQV5xfAU9Zg== 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 BY5PR18MB3220.namprd18.prod.outlook.com (10.255.136.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.15; Wed, 31 Jul 2019 13:09:16 +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:09:16 +0000 From: Jin Nan Wang To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH] Speculative mitigation facilities report wrong status v2 Thread-Index: AQHVR6Eng6gyD2BBNUm+AkTjaw+Y7Q== Date: Wed, 31 Jul 2019 13:09:16 +0000 Message-ID: <20190731130853.18591-1-jnwang@suse.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0042.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::28) 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: 66d91374-569e-4591-17ee-08d715b84a3a x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BY5PR18MB3220; x-ms-traffictypediagnostic: BY5PR18MB3220: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:274; x-forefront-prvs: 011579F31F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(346002)(39860400002)(366004)(376002)(396003)(136003)(199004)(189003)(66446008)(66556008)(36756003)(5640700003)(64756008)(66476007)(6436002)(6486002)(66946007)(6512007)(1076003)(2501003)(305945005)(316002)(54906003)(25786009)(107886003)(5660300002)(4326008)(53936002)(71200400001)(2906002)(8676002)(66066001)(81166006)(68736007)(8936002)(386003)(26005)(6506007)(50226002)(14454004)(7736002)(52116002)(102836004)(2616005)(71190400001)(6116002)(86362001)(99286004)(81156014)(486006)(256004)(478600001)(3846002)(6916009)(2351001)(186003)(476003); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3220; 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: nzG9I4OLCSODnR/+IExXGYTMidXvTTbXSEt3iC3SULg9XEuiAv3CnUXs74BvhxTS2jcXl4KhxS5uRX/k51b443vtVSSIyr3+63CA9Wpx/k4MWSYFjYzIzv72H+uH/YG7kiBR9s9TcmQazzK26G3Z+gcA06f1QVSEL3rBv18CtxjwTM2sifhjIpW2FXycDmf+IwcfaUuyQIHrqbiMr/faYgF0QOrlmBbWHA38z0dcpFJrn1fmpgKujgTJwdJ/NoMEvK/iHWjWazkgOxNmwthCEzZcWWlSxYvasU7X4tUlv4VNIKU6oD4Vx9FsipohREETRKYeMwLaIhuyqHQ1cLTHPt5T2QaHWZPHwq+KYR4dYa8YLOYPcivVTw/9rxO30ZgJ7Rp9V/wKFfELwesZ7KH7tnP6majQ7+srU+f1EkWh87M= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 66d91374-569e-4591-17ee-08d715b84a3a X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2019 13:09:16.2739 (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: BY5PR18MB3220 X-OriginatorOrg: suse.com Subject: [Xen-devel] [PATCH] Speculative mitigation facilities report wrong status v2 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 Add a check about X86_FEATURE_MD_CLEAR to avoid to print "None". --- 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" : "",