[PATCH 3/5] KVM: arm64: Only return attributes from stage2_update_leaf_attrs()
Oliver Upton
oliver.upton at linux.dev
Thu Feb 2 14:08:37 PST 2023
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 <oliver.upton at linux.dev> 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?
--
Thanks,
Oliver
More information about the linux-arm-kernel
mailing list