From nobody Mon May 13 08:42:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1687283275; cv=none; d=zohomail.com; s=zohoarc; b=UhB4jAhWoY1wZ3YyVY6tWvhB2uLnyKo6ofO4z0iuo4iWk0Dv1UFW/v/HjrRMr79J7a1YFCBEwS3ZeIbJaIYjE5FwOpuvIbnnEBNNM9AbcSVr2hvgYefyDfNfSSMyUuEwLez1Nalaip5J9FchfSlledLfCLrlLxXZ3ExOkE4ZF6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687283275; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=WxborAmyxxXR1jU1QUd79Tbhfb2aPJOfntuP6kTKlfQ=; b=YNNr8zaKi0mIYqh0xvf2MVHYvjaWEPdqvXiu/GU9uwoqhmRhuV0RxFUkIAfnXVxzs881sGblGN1YWa3JWh/zpRF9k7Y2AuTacAU7VM/oE7MsvbXZaPEJaSPXe0i533XIS2b2s7G9BdnkuJX25lMcHeVkR92xvX+JHb3qNSflwF4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1687283275489914.55501316211; Tue, 20 Jun 2023 10:47:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.552167.862086 (Exim 4.92) (envelope-from ) id 1qBfRv-0000LG-On; Tue, 20 Jun 2023 17:47:27 +0000 Received: by outflank-mailman (output) from mailman id 552167.862086; Tue, 20 Jun 2023 17:47:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBfRv-0000L9-MI; Tue, 20 Jun 2023 17:47:27 +0000 Received: by outflank-mailman (input) for mailman id 552167; Tue, 20 Jun 2023 17:47:26 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qBfRu-0000Ki-OH for xen-devel@lists.xenproject.org; Tue, 20 Jun 2023 17:47:26 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 81a9881c-0f92-11ee-8611-37d641c3527e; Tue, 20 Jun 2023 19:47:22 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 81a9881c-0f92-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687283242; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=S9OCrltF7kAE9VaLowAPv00GEEs/amWFwY5c9PbQ2OY=; b=IkE7noqPtBn9Rr54BYCJjIex29DwrnBTL4mZKo3wB6lkUwI+94qWZGEg vetbJ40Y17eiG7Nm83orzq2ZEBSJEPSyMyko8xivslGAlKLGWwh1G7eOZ GgGlkrlN6Y7U9Z4AFZy2N+vUN0DCAsIvd0lCjoDPT4gWsrWIBtcIp2ad2 c=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112250688 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:LfxGjKu2T/XwUQgJ8mwHdYM4PefnVEpeMUV32f8akzHdYApBsoF/q tZmKW6PO6ncNzb0c9gjaIS/9ENSupHUmIQ1TlduqXs9FXgS+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiffHg3HVQ+IMsYoUoLs/YjhYJ1isSODQqIu Nfjy+XSI1bg0DNvWo4uw/vrRChH4rKq4Fv0gnRkPaoQ5AGEzyFPZH4iDfrZw0XQE9E88tGSH 44v/JnhlkvF8hEkDM+Sk7qTWiXmlZaLYGBiIlIPM0STqkAqSh4ai87XB9JFAatjsB2bnsgZ9 Tl4ncfYpTHFnEH7sL91vxFwS0mSNEDdkVPNCSDXXce7lyUqf5ZwqhnH4Y5f0YAwo45K7W9yG fMwGhofNE6GvfiMmPG2bdRVxZkKCfTqBdZK0p1g5Wmx4fcORJnCR+PB5MNC3Sd2jcdLdRrcT 5NHM3w1Nk2GOkARfA5NU/rSn8/x7pX7WxRepEiYuuwc5G/LwRYq+LPsLMDUapqBQsA9ckOw/ zucpTmhXEFKXDCZ4SjdyCiL3tXyoS/YB9lVKP7jr/VP21LGkwT/DzVJDADm8JFVkHWWS99Zb kAZ5Ccqhawz71CwCMnwWQWip3yJtQJaXMBfe8UYwgyQzqvf4y6CG3MJCDVGbbQOq8seVTEsk FiTkLvBJTFpqqzTdnub+Z+dtzb0Mi8QRVLufgddE1FDuYO65thu0FSWFI0L/LOJYsPdKxvim W6PljIE3/YeqvMylPiS2G3Gumf5znTWdTLZ9jk7T0r8sFMmPt7/PdXzgbTIxa0eddjEFzFtq FBBwpHDt75WUPlhgQTXGI0w8KeVC+Fp2dE2qXpmBNEf+juk4BZPlqgAsWgldC+F3ivpEAIFg XM/WisLvve/xFPwMcdKj3uZUqzGN5TIG9X/TezzZdFTeJV3fwLv1HgwNRHJjjGwwBhxzf9X1 XKnnSCEVyty5UNPlmDeegvg+eVzmnBWKZ37GPgXMChLIZLBPSXIGN/pwXOFb/wj7bPsnekm2 483Cid+8D0GCLeWSnCOoeYuwaUicSBT6Wbe95YGKYZu42NORAkcNhMm6elwJ9Y5z/oLx48lP BiVAydl9bY2vlWfQS3iV5ypQOm1NXqjhRrX5RARAGs= IronPort-HdrOrdr: A9a23:Kwy3A6hlVOPL3u6FwZ7IjBYlh3BQXuAji2hC6mlwRA09TyX4ra yTdZEgviMc5wx/ZJhNo7690dC7MBXhHPxOgbX5TI3CYOCOggLBRuxfBODZsl7d8kPFh4pg/J YlX69iCMDhSXhW5PyKhzVQyuxQouVvJprY4Nvj8w== X-Talos-CUID: =?us-ascii?q?9a23=3AfxIhp2jFjrie1hqonVJsEJFj3zJuQFfPlinVGVW?= =?us-ascii?q?CUSVkb4CsCgK53Z5lqp87?= X-Talos-MUID: 9a23:NSgBYgblz+O6M+BTpWfW3hY6DvpU74fxUwcx0s5fsOzfOnkl X-IronPort-AV: E=Sophos;i="6.00,257,1681185600"; d="scan'208";a="112250688" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Henry Wang Subject: [PATCH] x86: Drop opt_pku entirely Date: Tue, 20 Jun 2023 18:47:04 +0100 Message-ID: <20230620174704.3907275-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1687283277738100001 This option is particularly dubious as Xen does not use Protection Keys, ow= ing to the sharing of pagetables with PV guests. All this option does is hide = PKU by default from HVM guests, and is therefore redundant with the more generic cpuid=3Dno-pku. The variable ought to be in __initdata given it's single user, but deleting= it entirely looks to be a better course of action. Signed-off-by: Andrew Cooper Acked-by: Henry Wang #CHANGELOG Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Henry Wang --- CHANGELOG.md | 3 +++ docs/misc/xen-command-line.pandoc | 10 ---------- xen/arch/x86/cpu/common.c | 7 ------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d7e0590f8c6..43f15dc34cbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ The format is based on [Keep a Changelog](https://keepach= angelog.com/en/1.0.0/) - Add support for AVX512-FP16 on x86. - On Arm, Xen supports guests running SVE/SVE2 instructions. (Tech Previe= w) =20 +### Removed + - On x86, the "pku" command line option has been removed. It has never + behaved precisely as described, and redundant with "cpuid=3Dno-pku". =20 ## [4.17.0](https://xenbits.xen.org/gitweb/?p=3Dxen.git;a=3Dshortlog;h=3DR= ELEASE-4.17.0) - 2022-12-12 =20 diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index 4060ebdc5d76..9d66688bd1ff 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1950,16 +1950,6 @@ for all of them (`true`), only for those subject to = XPTI (`xpti`) or for those not subject to XPTI (`no-xpti`). The feature is used only in case INVPCID is supported and not disabled via `invpcid=3Dfalse`. =20 -### pku (x86) -> `=3D ` - -> Default: `true` - -Flag to enable Memory Protection Keys. - -The protection-key feature provides an additional mechanism by which IA-32e -paging controls access to usermode addresses. - ### ple_gap > `=3D ` =20 diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index cfcdaace125b..14021ffc66d8 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -29,10 +29,6 @@ bool __read_mostly opt_dom0_cpuid_faulting =3D true; bool_t opt_arat =3D 1; boolean_param("arat", opt_arat); =20 -/* pku: Flag to enable Memory Protection Keys (default on). */ -static bool_t opt_pku =3D 1; -boolean_param("pku", opt_pku); - unsigned int opt_cpuid_mask_ecx =3D ~0u; integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx); unsigned int opt_cpuid_mask_edx =3D ~0u; @@ -522,9 +518,6 @@ void identify_cpu(struct cpuinfo_x86 *c) this_cpu->c_init(c); =20 =20 - if (c =3D=3D &boot_cpu_data && !opt_pku) - setup_clear_cpu_cap(X86_FEATURE_PKU); - /* * The vendor-specific functions might have changed features. Now * we do "generic changes." --=20 2.30.2