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 BD017C5321E for ; Mon, 26 Aug 2024 11:15:32 +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=UdcRbnLBtGchSyYn7dQrnB9QNrCmr2FqWOwuYeQMA24=; b=nZ8Ep7qSUjcP4nUcQ+iK6u6mpS 2fIOBExraD7vDgePD7uKlvp1Zmfb24YMXJjEf3nbkx0DeiCJnTT4WTc0PJNcCwjJSM+MtkvZTazP0 Hwy1kGpX3cwOujKfRL3NILFyH/DZF69gdQjew/rbZ78cqUI46Vu6YOI7oQq8oFUXd/dlHzjuuehAg ouyw2m04PtoRSVLXxH5ARhkEx8s/4Xxoz//przDpT960bIR0jvtH6xCqZASVMQ/MI47w83YvEbE9/ OLomC3Wr7b0pHaknQ4Bz+R5QgO+dkykusQTO/6R3Sz2jqFRvaqd9EKxjlb81RVtw0EUevThxqxM1A IVgVi5vQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siXgv-000000076KW-0aY4; Mon, 26 Aug 2024 11:15:21 +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 1siWbg-00000006qIh-480e for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 10:05:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 55995A42152; Mon, 26 Aug 2024 10:05:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5BDEC51407; Mon, 26 Aug 2024 10:05:47 +0000 (UTC) Date: Mon, 26 Aug 2024 13:05:56 +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 09/19] fixmap: Pass down the full phys address for set_fixmap_io Message-ID: References: <20240819131924.372366-1-steven.price@arm.com> <20240819131924.372366-10-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240819131924.372366-10-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_030553_111656_79158AC8 X-CRM114-Status: GOOD ( 14.73 ) 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:14PM +0100, Steven Price wrote: > From: Suzuki K Poulose > > For early I/O mapping using fixmap, we mask the address by PAGE_MASK > base and then map it to the FIXMAP slot. However, with confidential > computing, the granularity at which "protections" (encrypted vs > decrypted) are applied may be finer than the PAGE_SIZE. e.g., for Arm > CCA it is 4K while an arm64 kernel could be using 64K pagesize. However > we need to know the exact address being mapped in. > > Thus in-order to calculate the accurate protection, pass down the exact > phys address to the helpers. This would be later used by arm64 to detect > if the MMIO address is shared vs protected. The users of such drivers > already cope with running the same code with "4K" page size, thus > mapping a PAGE_SIZE covering the address range is considered acceptable. > > Signed-off-by: Suzuki K Poulose > Signed-off-by: Steven Price Will was keen (and I'd prefer it as well) to get rid of the early fixmap code, at least for the time being. Have you tried without these and the early RSI probing? Apart from the earlycon I recall you mentioned EFI early maps. These would be more problematic. -- Catalin