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 56A58C5321E for ; Mon, 26 Aug 2024 10:47:12 +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=x95ncplF11MrViIQAYvjzKD1/clqUAHPKECBmDkks7M=; b=CBb40rGjkxgvBy1Rb/OI6qMSw8 mEYhAye1QovAGBMjO0J2c8OnKBAmX9nxtkEUA3mQgNloLGPe6lMdfl6khRKkWPtNdcSQh51lVH114 DKXqUGPvkH5lxSVIpsLneDaZEPPH1sSQ+HRh/yPz9M2cX9TdKX3rTjZV5V+00kyTSH3beLaPSnpxr ICBSby51eyEa8Ec4q1L5xAlrX3+wKD0c9vajHfxDCLf5M10WrSN/bEr1IWocBNQ/C7/Pj6UoqKuPX wRMK+ubJT8J1Sh0mMMmsQ0osuzMzUxxgQV0MdyPZvJch7aQqrp4P8XPwlAyZMEmzeAeViv/ceZxwE yFqd9Aug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siXFY-00000006zXV-19GT; Mon, 26 Aug 2024 10:47:04 +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 1siXEm-00000006zRA-2ibY for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 10:46:17 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id DF912A4214F; Mon, 26 Aug 2024 10:46:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D9AFC51404; Mon, 26 Aug 2024 10:46:10 +0000 (UTC) Date: Mon, 26 Aug 2024 13:46:19 +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 16/19] arm64: Enable memory encrypt for Realms Message-ID: References: <20240819131924.372366-1-steven.price@arm.com> <20240819131924.372366-17-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240819131924.372366-17-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_034616_766624_7F8111BE X-CRM114-Status: UNSURE ( 9.34 ) 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:21PM +0100, Steven Price wrote: > From: Suzuki K Poulose > > Use the memory encryption APIs to trigger a RSI call to request a > transition between protected memory and shared memory (or vice versa) > and updating the kernel's linear map of modified pages to flip the top > bit of the IPA. This requires that block mappings are not used in the > direct map for realm guests. > > Signed-off-by: Suzuki K Poulose > Co-developed-by: Steven Price > Signed-off-by: Steven Price Reviewed-by: Catalin Marinas