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 9D9AFBD33 for ; Tue, 7 Feb 2023 14:56:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4056BC4339B; Tue, 7 Feb 2023 14:56:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675781812; bh=fk+5VsNRPv8WZZS1NH04wxVwjAGJtruHmvu1fbvRLSQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i3t5Cw8mdHW1zAVBWvpSBLbDIeVSzDt5XTsX8n7CgwfD0pYQ3vzvnBNgzS27QEuG3 qZdvS+c97/hQvHupN6EH05Z9yYe9x3pBnayWdRyCfctVReeydoHPL71nZ154t8Ccce zLDaXfG7HVfylnFplvR5bSdWQ+rPO/BEP+WeJfeku+IeyUFJxa1Rm1FhYpLoHqUHgP ZjUvw9OW2JNz0JENKGhQ530bcvis889jN7rNwhuCEvxr2Rfpzulfn4acM1phkHfZEU NeRlf+/vi82NeJq6G3X9OVocaFLHCATHNhjohvyflJci/gF4mgyo6xGy9DdPuj1RJx dKrr1W3D4xoQw== 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 1pPPOr-008OSf-Sd; Tue, 07 Feb 2023 14:56:49 +0000 Date: Tue, 07 Feb 2023 14:56:49 +0000 Message-ID: <86r0v1zfpq.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: James Morse , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Quentin Perret , Will Deacon , Reiji Watanabe , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH 3/5] KVM: arm64: Only return attributes from stage2_update_leaf_attrs() In-Reply-To: References: <20230111000300.2034799-1-oliver.upton@linux.dev> <20230111000300.2034799-4-oliver.upton@linux.dev> <87ilhde9me.wl-maz@kernel.org> 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/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev 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: oliver.upton@linux.dev, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, qperret@google.com, will@kernel.org, reijiw@google.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 Thu, 02 Feb 2023 22:08:37 +0000, Oliver Upton wrote: > > On Wed, Jan 11, 2023 at 05:21:13PM +0000, Oliver Upton wrote: > > Hey Marc, > > > > On Wed, Jan 11, 2023 at 08:52:25AM +0000, Marc Zyngier wrote: > > > [+ Suzuki and Zenghui who are missing from the Cc list] > > > > Doh! Just switched over to working out of a new git tree and didn't move > > over my cc-cmd. Apologies to you two. > > > > > On Wed, 11 Jan 2023 00:02:58 +0000, > > > Oliver Upton wrote: > > > > > > > > Returning a single PTE from stage2_update_leaf_attrs() doesn't make a > > > > great deal of sense given that the function could be used to apply a > > > > change to a range of PTEs. Instead, return a bitwise OR of attributes > > > > from all the visited PTEs. > > > > > > I find this amalgamation of attributes quite confusing, and I have a > > > hard time attaching semantics to the resulting collection of bits. > > > > > > It also means that you cannot reason about a particular attribute > > > being 0 if any of the neighbour PTEs has this bit set. > > > > Very true. What I had really wanted to do was make a walker that allows > > software to check the state of specific attribute bit(s) within a range > > of memory instead of returning all of them. I decided against it because > > it would put more churn on other callers or require a new walker > > entirely. > > > > Anyway, I can go about that change to make this a bit easier to reason > > about. Thoughts? > > LOL, I thought I hadn't replied which is why I didn't hear anything > back. Ball is in your court, Marc, any thoughts? Huh, I clearly missed that email. Sorry about the delay. Having a separate walker doesn't strike me as unreasonable. This clearly is something different from the existing walkers, and it is bound to be very little code anyway. Thanks, M. -- Without deviation from the norm, progress is not possible.