Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2154077lqo; Mon, 13 May 2024 09:14:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2j2927nvYGeJAx/EayI7DzXL6ELGx9CTa3DdgX3ixSyH6VnSVLYt5uz/c+XzEPDh6JCskL7A3768aCUXsSAGYFJWDZ+kRfF2CxNmSRg== X-Google-Smtp-Source: AGHT+IEGV8O8NjU/kuyRWys0Z3Ypd4jLJyk4ygu2+Ld5jF8qF7H/4YQBSA9IxvGWWoLs3pGPdQda X-Received: by 2002:a05:6358:4429:b0:18e:aca:fd7e with SMTP id e5c5f4694b2df-193bb4ff3b0mr1030660355d.7.1715616872234; Mon, 13 May 2024 09:14:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715616872; cv=pass; d=google.com; s=arc-20160816; b=DCRfwZBIouKASXkluc/MfNGAfGT+udiXyaU+wYrTb4LV+qo+Q/9xS4Vc+dnAYberOB WCff6wQWNJ/z5BcBxC+ABcZrDcV7pOOKUJ2G/Dh8mSIHo4pOmF2twyL3Olw/XNNd8Um5 jigwImcv8azdmr5Zgh0fcHFCPJb7MhMVvv2PO944H/46SPP1+mG0stGeTGXtHm7kGqyH KAX1fB5xvCSyJRGbxP13z290UHs3vD/J23DAGKNg9W+30Q60uoDry/qWyd3GZf0k9ty1 mhUNFuhTkOT8ymUCm0GJ9LOKU978ZsIOy9ir1JU4f/yG9Pl3Otj74zuoeTYDX4k7ebzd bJTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=4iGbtYCtJqmAUTYecuP8spEP3WHqPhtEjBBPsVXY8ko=; fh=pKn/293/ZKXIMcQJl9ZzFjLMVevdBzTVVGTle239r1w=; b=zBdtins2QtoihzIKWaxpqjf1DiaMKHItAcYl4LFXTT36vp9HEdXlioE95Dhf/TfLNz lncD9HxcnvqaH9QfkXvqcMHA5IAz68G6QrN7ysLEJP/dxpUx0RiuNNsA6d6QYMI+YDow GCn2qLIb9Ps+7uM8SVbL7oTE9H/EftW+sJ1LBXsWYF9YtrXV7RA438R7WumQycjahC5M aL0tgZ3Poyy5ajwiEkPUexuxF/t/Y/WiMFPsq9UJzp1SLcUvgi1AWyH8vjhwkOxLkOQU m/9CN9x//2cQgY+FkVoKQfiX7o/NPRd4OQHwrUjoWJ1aIcL4kSP7NzARbyNEdV355s+8 lV9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-177808-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63411346ee0si9249717a12.437.2024.05.13.09.14.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 09:14:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177808-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-177808-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177808-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CC3132868CD for ; Mon, 13 May 2024 16:14:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DFE1156978; Mon, 13 May 2024 16:14:11 +0000 (UTC) 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: linux-kernel@vger.kernel.org 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