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 BC0B4CD5BC9 for ; Thu, 5 Sep 2024 14:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CTcQS6GBU2GYSjH5CNTpj+WDnjChjmc4Fqy8vn1Q/XE=; b=J+BLIzot0EQTtTlk6pDMJkANHN tz1Mp69FWL22y7ekiFQeOFhFKiHKuUnIgjh7CdJ5MR0c5OMqDuS7yF+1Y+ml5UPlpa+R3slot+3yG Dp5bq7qy090SddLDENIB0H9E9raPxb6rzG75xrXidIGPmohAARyhmdJwfuljC+z4OUITuCsDPBQu6 1TnqOVOKzv8EFU40P+5VhsBNkVvLGTJ9sLlfC3qpudLHD39ihKSyzo1TqxjEu00Bq46RkhflBEg+v Wd2mXW+PRVC2wgqnSO/q4EbE9SUzpNJ31afqVqaat/JLfni/kOHiTBk56wBHUke3ZrfLkqxriaM1f yYirUqjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smDwE-00000008po5-1oNl; Thu, 05 Sep 2024 14:58:22 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smDvD-00000008pRO-402V for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 14:57:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id A3B6BA443B3; Thu, 5 Sep 2024 14:57:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C0A3C4CECB; Thu, 5 Sep 2024 14:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725548238; bh=KAHi3umxUR4oy96Bn7I3kG7qlY5Uqzhzj0ufsrwwPRA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MdMAbHlumLZf52D59lasIUksNWhnyWNNT3REL5qMUhs4Nn30USb1tTXrki98khANW suzL5zOptzsWiEul+DcEFVNwPZREgLSBNoGhYjpWtdb08YEQc2444oQ/BYA3wCG4Uj AftAJzNUu0vli8PVoPp81kBHkDsIMF0bVUZHQkGiu3iTmJAG+ssxjcK40Q4EMRW6rq oUcaVSoCN8Rc7KxG/iokcR8OaIXYyEo+erAbYrJlYgMy1M4mfywMsR9/RzjqecbsLu m63CyWq7NBmkeiux+/abXF5HX6OLeqHFXachfWMqzf+qg2UllC8JRfjT6zDek3/Ara yA5PtnwBX58Dg== 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 1smDv8-009zQN-DJ; Thu, 05 Sep 2024 15:57:15 +0100 Date: Thu, 05 Sep 2024 15:57:13 +0100 Message-ID: <86ikvaup12.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Alexandru Elisei , Mark Brown Subject: Re: [PATCH v2 12/16] KVM: arm64: Implement AT S1PIE support In-Reply-To: <20240905135820.GA4142389@e124191.cambridge.arm.com> References: <20240903153834.1909472-1-maz@kernel.org> <20240903153834.1909472-13-maz@kernel.org> <20240905135820.GA4142389@e124191.cambridge.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.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, alexandru.elisei@arm.com, broonie@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_075720_142600_691726F1 X-CRM114-Status: GOOD ( 16.64 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Joey, Thanks for having a look. On Thu, 05 Sep 2024 14:58:20 +0100, Joey Gouly wrote: > > Hello Marc! > > > static void compute_s1_permissions(struct kvm_vcpu *vcpu, u32 op, > > struct s1_walk_info *wi, > > struct s1_walk_result *wr, > > struct s1_perms *s1p) > > { > > - compute_s1_direct_permissions(vcpu, wi, wr, s1p); > > + if (!s1pie_enabled(vcpu, wi->regime)) > > + compute_s1_direct_permissions(vcpu, wi, wr, s1p); > > + else > > + compute_s1_indirect_permissions(vcpu, wi, wr, s1p); > > + > > compute_s1_hierarchical_permissions(vcpu, wi, wr, s1p); > > Is this (and the previous patch to split this up) right? > > Looking at this from the ARM ARM (ARM DDI 0487K.a): > > R JHSVW If Indirect permissions are used, then hierarchical > permissions are disabled and TCR_ELx.HPDn are RES 1. Odd. I was convinced that it was when S1POE is enabled that HPs were disabled. But you are absolutely right, and it is once more proven that I can't read. Oh well. Not to worry, I've since found other issues with this series. I have forgotten the patch dealing with the fast path on another branch, and since decided that TCR2_EL2 needed extra care to cope with individual features being disabled. The rework is still useful, as I'm looking at POE as well, but I need to hoist the HP stuff up a notch. I'll repost things once I've sorted these things up. Thanks again, M. -- Without deviation from the norm, progress is not possible.