From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF8D8156863; Mon, 13 May 2024 16:14:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715616851; cv=none; b=BJ/S2XkLQ4P/oi8LRnd8bStrUwowu8VkdDUHEBz91BWQGfut85goQdaiBx2JKRL3yHaKUx62g5uFNqKwc2k9hgDpSxes5KmNPYu7IZG62HkJVgI7K+U+zVfXn6Z1BjOH25J+UbymHgiTPl5R/5/Pvi7gjhg3U7kj5AotjuFdjAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715616851; c=relaxed/simple; bh=tId/JdnTjdfMk77QxFfO67QzK/Kx7mUwVft12OXxf1o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gVNk5W7+raqH0eKWJ0l+q+ALlBGtDu/7x8KhSk9qRvXDtoK5uLMJeXQwn0A7rs7MYR++WxeJ1oc9mtQLsye38H4F5heg1cUvVQYn8q/wQkkg4LheKRugIcSDA1b+LQV6K3I6cb3ZCu4GFRNoXXj91I8KB/Mg2F0bJv6oTZTlNp4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3765C2BD11; Mon, 13 May 2024 16:14:07 +0000 (UTC) Date: Mon, 13 May 2024 17:14:05 +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 v2 06/14] arm64: Override set_fixmap_io Message-ID: References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-7-steven.price@arm.com> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240412084213.1733764-7-steven.price@arm.com> 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? -- Catalin 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 C42A9C25B10 for ; Mon, 13 May 2024 16:38:57 +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=mhcyN5CbY3jyA00e6BwGggFYUHyElWfmKOG0AcDwVKY=; b=JTaugXDoezV5LK S+D3fVDzbi9FMmiuYHYd9Sy1R3bN9hwp2RVy9TQ4iWOlL3k8qIkKpLeq8l3V4vMVi1Qsy2st7bKbE 1Ncp05iNCZHVncX6K74y4SQgipJOjb+k7ZRdqBSu5sLP7verrFsQOI+FQQvWINw3Ena47VGn5eff9 c5OSqrGEmzDKaZ+apH8+0C6Ij7qIEzD+N+72/QTnbajNJmGgZ32KxumLZ7/6DqYMgaJi8xMtuK0r8 Kyd2qGXH6pOcOiM3f+F2PVoqw8GZJLMCdsvGrl8nTWVZbt4dTJdLQlxM9vBwj6MAxA3N835skVLsz RqgoNTAYwArNEf8s4H/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6YhJ-0000000DZpo-3zTh; Mon, 13 May 2024 16:38:45 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6YhI-0000000DZou-42Nk for linux-arm-kernel@bombadil.infradead.org; Mon, 13 May 2024 16:38:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4iGbtYCtJqmAUTYecuP8spEP3WHqPhtEjBBPsVXY8ko=; b=cj/ws5AfW32GuzVwM/Q+JyFP/r xEpmc2Q742swxXiO+NmlWSixsx07k9HT86FPl+Gb9oEuxQy7hMRn1RrnAmWId7LdPI/q9BAkqD5cj JBe0DwK32QlBzbRvK9H8s104eCAgyY7ujuYy+00Iw/efbcJvyx9KJUdI4D7wrBg4iJZhedoPee68E rGpAaCFZRXBHTiFzyr6Bhjzo3co6AB9pPk7MfEq0T8zbTscf4XfoUGgBn7vQy7zhFio94ML5jYKYL WfG55kOV0kvsAwyB3b3LcRbPd/VUwScDlrgWqsLerFCl/419cxZfbHUoSXTJs5TEj4yvPq+Qi5UCM E/UW6bww==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s6YJb-000000089dL-1U4O for linux-arm-kernel@lists.infradead.org; Mon, 13 May 2024 16:14:19 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2C8F260E65; Mon, 13 May 2024 16:14:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3765C2BD11; Mon, 13 May 2024 16:14:07 +0000 (UTC) Date: Mon, 13 May 2024 17:14:05 +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 v2 06/14] arm64: Override set_fixmap_io Message-ID: References: <20240412084213.1733764-1-steven.price@arm.com> <20240412084213.1733764-7-steven.price@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240412084213.1733764-7-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240513_171415_656225_F0FBAE07 X-CRM114-Status: GOOD ( 12.10 ) 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 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? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel