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 A89FCC04FFE for ; Tue, 14 May 2024 10:22:01 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=clgxYfDQmPUDv9rqWVJGngOcsCy917aSglqg+gqH9CA=; b=PX3kMJiy3ecsiZ W5RIr0v3+c7ZlG6oPrNOtyseD1TFWdfPQdFCGIyqLsXze5L/Cg7zip3XEk+LOgDkHv8LvbN8u1sTc 4aNSwXDDS/e6SDOE6CuU2CxfcCZLHjA9feISKwna/ZXskGIkEbMe2s/Fp50wd5ZDSQI6N+bViCEUA U+q4aJCwH+hVhnJMoIanb9bDz1SSobwOQUpIQD+GeuD0X2TiGRCrfLkS10EUYVE6ucD5Yz1R+5OQn M99NylCqpTc5EMPlSmw1U1rMji47ulSOvhvH/TBoDMnX2YQ+Td83daO/lLV3mhb7GkilFM3CWpKZG F1F82bRiuGUdoUVX2K5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6pI5-0000000FYge-3j6S; Tue, 14 May 2024 10:21:49 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6pI1-0000000FYfA-3AR9 for linux-arm-kernel@lists.infradead.org; Tue, 14 May 2024 10:21:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4D3BD1007; Tue, 14 May 2024 03:22:09 -0700 (PDT) Received: from [10.57.81.220] (unknown [10.57.81.220]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1EA773F762; Tue, 14 May 2024 03:21:42 -0700 (PDT) Message-ID: <6ba1fd72-3bad-44ca-810d-572b70050772@arm.com> Date: Tue, 14 May 2024 11:21:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 06/14] arm64: Override set_fixmap_io Content-Language: en-GB To: Catalin Marinas , Steven Price Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, 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 References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-7-steven.price@arm.com> From: Suzuki K Poulose In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240514_032145_885712_812ADB69 X-CRM114-Status: GOOD ( 13.61 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 13/05/2024 17:14, Catalin Marinas wrote: > On Fri, Apr 12, 2024 at 09:42:05AM +0100, Steven Price wrote: >> Override the set_fixmap_io to set shared permission for the host >> in case of a CC guest. For now we mark it shared unconditionally. >> Future changes could filter the physical address and make the >> decision accordingly. > [...] >> +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); >> +} > > I looked through the patches and could not find any place where this > function does anything different as per the commit log suggestion. Can > we just update FIXMAP_PAGE_IO for now until you have a clear use-case? > This gets used by the earlycon mapping. The commit description could be made clear. We may have to revisit this code to optionally apply the PROT_NS_SHARED attribute, depending on whether this is a "protected MMIO" or not. Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel