From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6221BC5321D for ; Mon, 26 Aug 2024 10:32:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6DXUL0cmi7NMMtLS8ZDY+aCg2bXtcEQPddkd0cYvo5s=; b=ch9xabI0CL0KMjS05aWAgGOz4m ED/3XhH9/vwa/Ql+6oyiMSyBI49d8iF/qgQGHZvQjKPctMQvQ8vFCsbk03ZltOAp+hp1J/5XIR9tC ki3iHxlpk+SldGW/PZUvl6JDOsynXW64zZiXgBpfTjn772BB1xaE3LGauQ/NI94Udxy4SH1c5bWDT 7dLWBGtIbyY0syHS3/BbAHNCceTqiyK0A5p+AdeNq9pki9O5eNnWHxbYw8iz8cRdEXczmFRR4fm1Q 1LOmsR/x+r7YvOkPPxQI61GQe6xnsT3y1F+AE0woZKRKCvWWLPmRrYNHAMnPLFLW1wlKhkXvdOM7v XVl5ePbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siX1F-00000006wS5-2JVU; Mon, 26 Aug 2024 10:32:17 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siX0S-00000006wG1-2yan for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 10:31:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 1349BA401D9; Mon, 26 Aug 2024 10:31:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51794C51403; Mon, 26 Aug 2024 10:31:23 +0000 (UTC) Date: Mon, 26 Aug 2024 13:31:31 +0300 From: Catalin Marinas To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Marc Zyngier , Will Deacon , James Morse , Oliver Upton , Suzuki K Poulose , Zenghui Yu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joey Gouly , Alexandru Elisei , Christoffer Dall , Fuad Tabba , linux-coco@lists.linux.dev, Ganapatrao Kulkarni , Gavin Shan , Shanker Donthineni , Alper Gun Subject: Re: [PATCH v5 13/19] arm64: Make the PHYS_MASK_SHIFT dynamic Message-ID: References: <20240819131924.372366-1-steven.price@arm.com> <20240819131924.372366-14-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240819131924.372366-14-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_033128_830642_691BD1DD X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 19, 2024 at 02:19:18PM +0100, Steven Price wrote: > Make the PHYS_MASK_SHIFT dynamic for Realms. This is only is required > for masking the PFN from a pte entry. Unless my grep failed, pte_pfn() hasn't used PHYS_MASK for many years, since commit 75387b92635e ("arm64: handle 52-bit physical addresses in page table entries"). Can you check what pte_pfn() returns on a shared page? Unless we need this macro for other things, I'm more tempted to clear the bit in __pte_to_phys(). -- Catalin