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 BFE08495FD; Thu, 30 Nov 2023 15:51:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GviJu+aq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30322C433C7; Thu, 30 Nov 2023 15:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701359506; bh=8E9/vTx9o6GaP1uXrlutaPjQ7icCEGqhFquEYUs3ewY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GviJu+aqYlfOyzM8qE1UeR+XYNLAMlutaEqCSJqhigGB/R3bWtl4Otr6eQJQAkwNz b4Jr4nVUOArCI8D2ylbTK/Dz9jPBOBkI0gnCCTC+hoO0M7wuQ0BPRzfHu1GmADZGCC NiNJf6vyh24WP4F9o7aUiro2Rjlg/9TzqdEVYLroHPZpzO7jivFhggAhTZgbm7i7v+ eiDYPlg5aFsX/UNg/lmYUSJPtIav5kO7H+sBREN8mPstH4yCGcpn7Knq8fC6cDu5VJ 9T50hg0ek+U3Icz3Z8SW0WtO8KlDKnCiMPTaT/Iy/RSXBImpdTJI5w5BetDd+fXvv0 clZ4jkOVhiEHQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r8jKJ-000Hdh-HL; Thu, 30 Nov 2023 15:51:43 +0000 Date: Thu, 30 Nov 2023 15:51:43 +0000 Message-ID: <86zfyvb5o0.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, broonie@kernel.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, oliver.upton@linux.dev, shuah@kernel.org, will@kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, James Morse , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH v3 06/25] KVM: arm64: Save/restore POE registers In-Reply-To: <20231124163510.1835740-7-joey.gouly@arm.com> References: <20231124163510.1835740-1-joey.gouly@arm.com> <20231124163510.1835740-7-joey.gouly@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, aneesh.kumar@linux.ibm.com, broonie@kernel.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, oliver.upton@linux.dev, shuah@kernel.org, will@kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 24 Nov 2023 16:34:51 +0000, Joey Gouly wrote: > > Define the new system registers that POE introduces and context switch them. Thinking about it some more, I don't think this is enough. One fundamental thing that POE changes is that read permissions can now be removed from S1 by the guest. Which means that if we take a (for example) a permission fault at S2 and perform (as we do today) a "AT S1E1R" to obtain the faulting IPA, we can end-up with a failing translation because POE, under control of the guest, has removed the read permission. Which is why FEAT_ATS1A exists, and ignores permission overlays so that we can get to the IPA. I think this means we need to teach __translate_far_to_hpfar() about AT S1E1A Thanks, M. -- Without deviation from the norm, progress is not possible.