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 49581C27C5E for ; Mon, 10 Jun 2024 17:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/DECLzZY0mnN19sZ8UkWYHrPdZk+V8kGdaLWOll+aWA=; b=nU2znfair2BETn Wg4LQTtlNR5LSiCHD8+YRQ2TDct8Fbh1UzeySwisx4UF5K1wj07/1Mouaa579FnGgBaPet7AhF8JA og8XMwaZU2el6byXlJA8T6ZFShs4Cmw9tdjz1XfiwOhznw/o80vfe/M4/WJoh3p5KzVTUZrwuZNOA 8ZQ0Cn9iigPU5DmQmCby2HKX4VxkjUgGD4uaGGTWHzP4iSEXpAa+tKGTkw6xdnE6tjVkmYKNK9zBZ ZeluGFRSI2U2zu/ahWn02DVEIagmtREFFNgoaS0k+/Zfg/54Or+0s1SMfpGSEsFiTkwwsLcCOGwS/ rZdrMA7x0nILloTDb7RA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGj9k-0000000629s-2QON; Mon, 10 Jun 2024 17:50:08 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGj9i-0000000628O-0I9L for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2024 17:50:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A479160B8F; Mon, 10 Jun 2024 17:50:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FA17C4AF1A; Mon, 10 Jun 2024 17:50:01 +0000 (UTC) Date: Mon, 10 Jun 2024 18:49:59 +0100 From: Catalin Marinas To: Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, Suzuki K Poulose , Marc Zyngier , Will Deacon , James Morse , Oliver Upton , 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 Subject: Re: [PATCH v3 06/14] arm64: Override set_fixmap_io Message-ID: References: <20240605093006.145492-1-steven.price@arm.com> <20240605093006.145492-7-steven.price@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240605093006.145492-7-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240610_105006_210855_4C4E2A7E X-CRM114-Status: GOOD ( 12.47 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 05, 2024 at 10:29:58AM +0100, Steven Price wrote: > +void set_fixmap_io(enum fixed_addresses idx, phys_addr_t phys) > +{ > + pgprot_t prot = FIXMAP_PAGE_IO; > + > + /* > + * For now we consider all I/O as non-secure. For future > + * filter the I/O base for setting appropriate permissions. > + */ > + prot = __pgprot(pgprot_val(prot) | PROT_NS_SHARED); > + > + return __set_fixmap(idx, phys, prot); > +} In v2, Suzuki said that we want to keep this as a function rather than just adding PROT_NS_SHARED to FIXMAP_PAGE_IO in case we want to change this function in the future to allow protected MMIO. https://lore.kernel.org/linux-arm-kernel/6ba1fd72-3bad-44ca-810d-572b70050772@arm.com/ What I don't understand is that all the other MMIO cases just statically assume unprotected/shard MMIO. Should we drop this patch here as well, adjust FIXMAP_PAGE_IO and think about protected MMIO later when we actually have to do device assignment? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel