From nobody Mon Feb 9 04:56:06 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; 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 Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 167030129679939.12971456759146; Mon, 5 Dec 2022 20:34:56 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.454334.711876 (Exim 4.92) (envelope-from ) id 1p2Pf3-0005t2-F8; Tue, 06 Dec 2022 04:34:29 +0000 Received: by outflank-mailman (output) from mailman id 454334.711876; Tue, 06 Dec 2022 04:34:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p2Pf3-0005sr-CK; Tue, 06 Dec 2022 04:34:29 +0000 Received: by outflank-mailman (input) for mailman id 454334; Tue, 06 Dec 2022 04:34:28 +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 1p2Pf1-0005MV-U1 for xen-devel@lists.xenproject.org; Tue, 06 Dec 2022 04:34:28 +0000 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 43c27aec-751f-11ed-91b6-6bf2151ebd3b; Tue, 06 Dec 2022 05:34:27 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BC38C32009F0; Mon, 5 Dec 2022 23:34:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 05 Dec 2022 23:34:25 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Dec 2022 23:34:23 -0500 (EST) 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: 43c27aec-751f-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1670301264; x=1670387664; bh=2DJbvlN3MtrCNxWUxmi7jS5GZRlwreYino7 nE2TrQ8A=; b=pX4tF4v1k1eZYNu5zbN0bvxHj78cjeFoXlJnqzBOx+W5Q07E8Aw T4FFv51qysrQCghks8QTRzO2exdFD/G2czKEcUwPXmtIW+CUXJeJ+dVFrBRFYiMy uhb7eGRs8/UUiLT/oGOWix1GyTtbZ/Qaj5wAjWdasrR0tFLu9MrhVDAchrjsYhW8 H9d0kh0/KNuS+zSFHzafTGuKQwFJlp1ISz4sXULk6oynyMeVgMRV9Yf9sZexP3I0 o4Q/CW2UCIXsLw2bb480oBkpdhU02Sk60z7nrz14EpeCUkfHyoFYuPDqd2UV7HKd z4QNV28QARiY3JABsIPF3M28Gi+QrB4hmaA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1670301264; x=1670387664; bh=2DJbvlN3MtrCN xWUxmi7jS5GZRlwreYino7nE2TrQ8A=; b=d7BWW/qi1soi+uBGNDBoALS9fwbuu 13EbDAx/H4mzrcP/FA6mtdd96ZWTqP+NrAlRb4IESvR9HEj1dOGu4SRb2GxJKwyk x+GbqiTy109XkCw74JT3fzmPZYAcY8edJdqqhlSTDggFLzVJxuknRzv05/toTIdp EAQiqeSgRDE1tAAqTyRw9P0GCTPLXSeNeMnVwraOPfW5ErPChSCb/lJItKL62hl2 qQDlZgEx9nIiRz7SxG2SUMNCG5zYAxobu+IMaiJrbZCg98pNWeUSfijMERwi1fQw 4KFgDhDkNSCXXOQ1XqVYlwNqv6FdSLn50Z0N8Iww7QZ/ZqXGKpzcenQaA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeffvghmihcu ofgrrhhivgcuqfgsvghnohhurhcuoeguvghmihesihhnvhhishhisghlvghthhhinhhgsh hlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeejffejgffgueegudevvdejkefghefg hffhffejteekleeufeffteffhfdtudehteenucevlhhushhtvghrufhiiigvpedvnecurf grrhgrmhepmhgrihhlfhhrohhmpeguvghmihesihhnvhhishhisghlvghthhhinhhgshhl rggsrdgtohhm X-ME-Proxy: Feedback-ID: iac594737:Fastmail From: Demi Marie Obenour To: xen-devel@lists.xenproject.org Cc: Demi Marie Obenour , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , George Dunlap , Tim Deegan Subject: [PATCH 3/8] x86/mm/shadow: avoid assuming a specific Xen PAT Date: Mon, 5 Dec 2022 23:33:32 -0500 Message-Id: <8fba8137ea2aa4fb5c61102342ad42ed8a9d0f66.1670300446.git.demi@invisiblethingslab.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1670301298577100015 Content-Type: text/plain; charset="utf-8" This makes the code easier to understand and more robust if Xen's PAT ever changes. Signed-off-by: Demi Marie Obenour Reviewed-by: Andrew Cooper --- xen/arch/x86/mm/shadow/multi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 2370b3060285fee895f335f2a82d3d22ca5d31ed..4e94fec3d50cde0e5a26ecb62ff= 4d00dd00f759d 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -629,8 +629,8 @@ _sh_propagate(struct vcpu *v, else if ( p2mt =3D=3D p2m_mmio_direct && rangeset_contains_singleton(mmio_ro_ranges, mfn_x(target_mfn= )) ) { - sflags &=3D ~(_PAGE_RW | _PAGE_PAT); - sflags |=3D _PAGE_PCD | _PAGE_PWT; + sflags &=3D ~(_PAGE_RW | PAGE_CACHE_ATTRS); + sflags |=3D _PAGE_UC; } =20 // protect guest page tables --=20 Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab