From nobody Tue Feb 10 01:30:41 2026 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=1684161834; cv=none; d=zohomail.com; s=zohoarc; b=ZsRmPQiTsSKpmIeXj27IBLlfRxpDi/km1JNyL5DV100IPGlir0Mba6Sly3kXsyO7+c53wEObIpK6YXtAgdGbTaPVjmEgIVBx9kqT0vs7zT1HG80MvgN5MTGlaSPrI8YbZSDqLaz21G/An51OD7nHekOtPkCHQ81P8hgaLkLE3EA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684161834; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sFB68H2Tz7NvCeNQUmeQxB6juawOHZ2vHkcOGk+hiSQ=; b=moqNTPt/9YK+pbBGzC2froylLSPYLbb3f3N2Sqe8Oq6g9kMwv/KObfCD7bZMIRQsG7xV6eZvGplzfXZl0AZ6cnl4PQ55Frd/Zu53httyaiUOoGj+kmhgFeq/xAohiM7CMSehKCzCx4p2vYQxgIjCfMDNRa5SPftMv9TMsptsYQ8= 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 1684161834674121.14149488809744; Mon, 15 May 2023 07:43:54 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.534782.832170 (Exim 4.92) (envelope-from ) id 1pyZQB-00027Q-Qz; Mon, 15 May 2023 14:43:31 +0000 Received: by outflank-mailman (output) from mailman id 534782.832170; Mon, 15 May 2023 14:43:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pyZQB-00026n-LS; Mon, 15 May 2023 14:43:31 +0000 Received: by outflank-mailman (input) for mailman id 534782; Mon, 15 May 2023 14:43:30 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pyZQA-0000CT-AL for xen-devel@lists.xenproject.org; Mon, 15 May 2023 14:43:30 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id db620a99-f32e-11ed-b229-6b7b168915f2; Mon, 15 May 2023 16:43:29 +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: db620a99-f32e-11ed-b229-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1684161809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j2YW2cWonftkq/hMdpKaFZq5iF9LBLJDuv16HmF0O5k=; b=PVZzLs7enL9MtG4DB6ZOo7txhTIPdFr5pR/l5qkP6J3vmYjkyv3Ui0el iyYE+qGcd2IcxWcAs2vRBCTsTmXOnzXaLxEtuKhTvpEWT+Yk2V6UNBTdR cUWQqTArAmRK2TirO5N0QFiKQnOMEWNS2VuL9xkFWZsKV+3ks258Yau/3 A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 111537998 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:nZ2xyKM54Km6rIjvrR2ul8FynXyQoLVcMsEvi/4bfWQNrUoghjYEy WYeCm/XPa2JMGumcop0a43j8xxQsZ7Wx4VrTAto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvPrRC9H5qyo42tF5wFmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0uAvKzxS6 +cJESEUSSuZusW7xY+SFeY506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEN3w2Nk+ojx5nYz/7DLoXmuuyi2a5WDpfsF+P/oI84nTJzRw327/oWDbQUoXTHJgOwRfJ9 goq+UzfRTo+ZfuH9AOl71/81/X1zCPDY407QejQGvlC3wTImz175ActfUS/iem0jAi5Qd03A 1wZ/G8ioLY/8GSvT8LhRFuorXicpBkeVtFMVeog52ml6IDZ/gKYDWgsVSNaZZots8peeNAx/ gbXxZWzX2Up6eDLDyvHrd94sA9eJwATdUVfeTEfXDIU+v7YurwUgxfyZ4lsRfvdYsLOJRn8x DWDrS4bjroVjNIW26jTwW0rkw5AtbCSEFdru1y/snaNq1ogOdX7P9DABU3zt64oEWqPcrWWU JHoceC65ftGM5yCnTflrA4lTODwvKbt3NExbDdS83gdG9aFoSTLkWN4umsWyKJV3iEsJ1fUj Lf741852XOqFCLCgVVLS4ywEd826qPrCM7oUPvZBvIXPMgtLF/Wpn41NRXIt4wIrKTLufBXB HtmWZz0USZy5VpPllJauNvxIZd0n3tjlAs/tLjwzgi90Kr2WUN5vYwtaQPUBshgtfPsnekg2 4oHXyd840kFAbKWj+i+2dJ7EG3m2lBhWMGn9pINJ7LbSuekcUl4Y8LsLXoaU9QNt8xoei3go SnVtpNwoLYnuUD6FA== IronPort-HdrOrdr: A9a23:10NsPKtlO5DUIiL4lA5bpxNk7skDhtV00zEX/kB9WHVpm6yj+v xGUs566faUskd0ZJhEo7q90ca7Lk80maQa3WBzB8bGYOCFghrKEGgK1+KLrwEIcxeUygc379 YDT0ERMrzN5CNB/KHHCAnTKadd/DGEmprY+ts3GR1WPH9Xg6IL1XYJNu6CeHcGIjWvnfACZe ChDswsnUvYRV0nKv6VK1MiROb5q9jChPvdEGM7705O0nj3sduwgoSKaCSl4g== X-Talos-CUID: =?us-ascii?q?9a23=3AemMzwWgM4vLSbgSLVbvsnCMrYTJudCX3kWvOOF6?= =?us-ascii?q?BGH9Oc6eoblKVxYo7nJ87?= X-Talos-MUID: =?us-ascii?q?9a23=3AsAorpA0Ii0I3kkfVYHTIgsuKzjUjxeOFLBEqiag?= =?us-ascii?q?/m9SpZX1qAWadtA+4a9py?= X-IronPort-AV: E=Sophos;i="5.99,277,1677560400"; d="scan'208";a="111537998" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH 2/6] x86/boot: Adjust MSR_ARCH_CAPS handling for the Host policy Date: Mon, 15 May 2023 15:42:55 +0100 Message-ID: <20230515144259.1009245-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230515144259.1009245-1-andrew.cooper3@citrix.com> References: <20230515144259.1009245-1-andrew.cooper3@citrix.com> 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: 1684161836531100003 We are about to move MSR_ARCH_CAPS into featureset, but the order of operations (copy raw policy, then copy x86_capabilitiles[] in) will end up clobbering the ARCH_CAPS value currently visible in the Host policy. To avoid this transient breakage, read from raw_cpu_policy rather than modifying it in place. This logic will be removed entirely in due course. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu --- xen/arch/x86/cpu-policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu-policy.c b/xen/arch/x86/cpu-policy.c index 5e7e19fbcda8..49f5465ec445 100644 --- a/xen/arch/x86/cpu-policy.c +++ b/xen/arch/x86/cpu-policy.c @@ -411,7 +411,7 @@ static void __init calculate_host_policy(void) p->platform_info.cpuid_faulting =3D cpu_has_cpuid_faulting; =20 /* Temporary, until we have known_features[] for feature bits in MSRs.= */ - p->arch_caps.raw &=3D + p->arch_caps.raw =3D raw_cpu_policy.arch_caps.raw & (ARCH_CAPS_RDCL_NO | ARCH_CAPS_IBRS_ALL | ARCH_CAPS_RSBA | ARCH_CAPS_SKIP_L1DFL | ARCH_CAPS_SSB_NO | ARCH_CAPS_MDS_NO | ARCH_CAPS_IF_PSCHANGE_MC_NO | ARCH_CAPS_TSX_CTRL | ARCH_CAPS_TAA_= NO | --=20 2.30.2