From patchwork Mon Dec 16 08:27:49 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: 11293559 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7EC42138D for ; Mon, 16 Dec 2019 08:40:45 +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 62A49206A5 for ; Mon, 16 Dec 2019 08:40:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62A49206A5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none 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 1igluj-00073i-8j; Mon, 16 Dec 2019 08:39:37 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iglui-00073d-6M for xen-devel@lists.xenproject.org; Mon, 16 Dec 2019 08:39:36 +0000 X-Inumbo-ID: 8869c3dc-1fdf-11ea-88e7-bc764e2007e4 Received: from m4a0073g.houston.softwaregrp.com (unknown [15.124.2.131]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8869c3dc-1fdf-11ea-88e7-bc764e2007e4; Mon, 16 Dec 2019 08:39:27 +0000 (UTC) Received: FROM m4a0073g.houston.softwaregrp.com (15.120.17.147) BY m4a0073g.houston.softwaregrp.com WITH ESMTP; Mon, 16 Dec 2019 08:37:07 +0000 Received: from M4W0334.microfocus.com (2002:f78:1192::f78:1192) by M4W0335.microfocus.com (2002:f78:1193::f78:1193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 16 Dec 2019 08:27:50 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (15.124.8.13) by M4W0334.microfocus.com (15.120.17.146) 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; Mon, 16 Dec 2019 08:27:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nY6GgskKXuCaBbIZeJvKags6pqPl5eraqBNu+gF0ylC03IC44TQliUPL4beqHm3Kq4Rz7qEWDXmwB+BhznlxfR87p83vOq7yONYolp398D8PMSFBZH0UcyD1d0M/DkD0NxXZdXN6FnLvAXLpcQnOnLYE/SBybFaSipaxF8Z4JhmIEuNNS6CED2ytHxSpAjtpjWBCyu9LHGv/ecZbEDfqAQ4pn1K31QvJiRLRbFnIR6RekOt9O2GBA7ocGoMpM4EOt2OX+cT70AnfKfVOlZ4KeZe0EAc1eoXLGs1rV15LyDhYZB8BD4S8zQ0TkwkWFisM/4FgQMGsdG5DJ6PmBDo/NA== 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=d6L2Vs7QlE03Iuu6nNF7hqyEvjJcuW9ObG/tc/v1x3g=; b=QVhMqwlPpGFQzqQxQ5bxWb6bGN+t3xKsZ5waAJ5RhhSN+OD9EC31q34n42yKfdSMjRZx8cP5IxK9IAiqLKluIdr9ukOS1GKx9+jzJUTVChYi4mgd3s0aJYcm8y8sGRy/wkn/aacs3ssNnQUBVH4Y/RK09hSJ+tiMOhV91NQU3Rl8Wj9+njyvEwfyne6lIFUfpnykUL5d+h7YHin/spTmPqH7iX9guHW+Ew31Bm5T07EsIqH0soenLJQOLw4KBw4rORBfWO2AiZsVnWCMGFHW4xtu8hhC+28PdvRD9iNnVW/GE5a857Prh8WQcYbEIMWy0QPTiRcn0ZfglGuaLDElfg== 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 BY5PR18MB3156.namprd18.prod.outlook.com (10.255.138.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.17; Mon, 16 Dec 2019 08:27:49 +0000 Received: from BY5PR18MB3170.namprd18.prod.outlook.com ([fe80::5967:dfe8:c14:808e]) by BY5PR18MB3170.namprd18.prod.outlook.com ([fe80::5967:dfe8:c14:808e%7]) with mapi id 15.20.2538.019; Mon, 16 Dec 2019 08:27:49 +0000 From: Jin Nan Wang To: "xen-devel@lists.xenproject.org" Thread-Topic: [PATCH v2] Xen missing prompt log when exec-sp=off Thread-Index: AQHVs+qzuwFrdBKM3kC0biftq9U4/g== Date: Mon, 16 Dec 2019 08:27:49 +0000 Message-ID: <20191216082718.20922-1-jnwang@suse.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) 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.24.0 x-originating-ip: [45.122.156.254] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 042207b5-8a0e-4400-1470-08d78201d5d6 x-ms-traffictypediagnostic: BY5PR18MB3156: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2150; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(39860400002)(366004)(136003)(396003)(346002)(376002)(189003)(199004)(66946007)(64756008)(66446008)(2906002)(66556008)(6916009)(66476007)(36756003)(316002)(54906003)(8676002)(71200400001)(81166006)(52116002)(6506007)(2616005)(86362001)(5660300002)(1076003)(186003)(478600001)(81156014)(6486002)(4326008)(8936002)(6512007)(26005); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3156; H:BY5PR18MB3170.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: thG1CIFdbEsuVxBX3x5VWAvUhDgdppnol6yL3roT1xXcmoetBD6e41hevtUdwF4+p1gPyAml/7NqGB1krI31nqHVfyAvBRK1sJzHYW0xwqYN+XnT0Gr7XCR97C4RMJv91vehAe4wP65psjXwDHNNmXOBSjotXUdKLaNUziHlExsQ+2Z9lNKRHmz3pr0CVd78itWYlDcW/4/6n1COnzv7/1V2mAB5qD7WrrmYko0KnFs4Vn8DX4srKevQOITdDNogUCA+OroVMVxMzCjla+eTDWb3716/pMOEnTJJiRJVNuRChWEQxgjbo52V+fl71PkVTzvnfntusJMMND/RXfgCF9tMr2jqarYofVo+afjesdk3qfcnk+t/9jZwtWMeJWHifNbDzlZC7Eswq1PvG3UY1+baoe6fCdG0dgA1mqJ80tr4n4prN2I651/C72Vb+fha MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 042207b5-8a0e-4400-1470-08d78201d5d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 08:27:49.4457 (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: US7bSNKo4TDljH/+tM3gXR2ZTOe/Wi8DDUd/mpg8ZhCjtArwn1faj9MgHumein3R X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3156 X-OriginatorOrg: suse.com Subject: [Xen-devel] [PATCH v2] Xen missing prompt log when exec-sp=off 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: Kevin Tian , Jun Nakajima , Wei Liu , Andrew Cooper , Jin Nan Wang , Jan Beulich , =?iso-8859-1?q?Roger_Pau_Monn=E9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Fix a issue when user disable ETP exec-sp, xen missed a prompt log in dmesg. Signed-off-by: James Wang --- xen/arch/x86/hvm/vmx/vmx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 7970ba93e1..5e86dd0782 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2495,14 +2495,14 @@ const struct hvm_function_table * __init start_vmx(void) { bool cpu_has_bug_pschange_mc = has_if_pschange_mc(); + /* Default to non-executable superpages on vulnerable hardware. */ if ( opt_ept_exec_sp == -1 ) - { - /* Default to non-executable superpages on vulnerable hardware. */ opt_ept_exec_sp = !cpu_has_bug_pschange_mc; - if ( cpu_has_bug_pschange_mc ) - printk("VMX: Disabling executable EPT superpages due to CVE-2018-12207\n"); - } + if (opt_ept_exec_sp) + printk("VMX: Enable executable EPT superpages.\n"); + else + printk("VMX: Disabling executable EPT superpages due to CVE-2018-12207\n"); vmx_function_table.hap_supported = 1; vmx_function_table.altp2m_supported = 1;