Re: [PATCH v5 01/14] KVM: arm64: Combine visitor arguments into a context structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 09, 2022 at 02:23:08PM -0800, Ben Gardon wrote:
> On Mon, Nov 7, 2022 at 1:57 PM Oliver Upton <oliver.upton@xxxxxxxxx> wrote:
> >
> > Passing new arguments by value to the visitor callbacks is extremely
> > inflexible for stuffing new parameters used by only some of the
> > visitors. Use a context structure instead and pass the pointer through
> > to the visitor callback.
> >
> > While at it, redefine the 'flags' parameter to the visitor to contain
> > the bit indicating the phase of the walk. Pass the entire set of flags
> > through the context structure such that the walker can communicate
> > additional state to the visitor callback.
> >
> > No functional change intended.
> >
> > Signed-off-by: Oliver Upton <oliver.upton@xxxxxxxxx>
> 
> This looks good to me. It's all fairly mechanical and I don't see any
> problems. I was a little confused by the walk context flags passed via
> visit, because they seem somewhat redundant if the leaf-ness can be
> determined by looking at the PTE, but perhaps that's not always
> possible.

Some explanation is probably owed here. I think you caught the detail
later on in the series, but I'm overloading flags to describe both the
requested visits and some properties about the walk (i.e. a SHARED
walk).

I tried to leave it sufficiently generic as there will be other
configuration bits we will want to stuff into a walker later on (such as
TLBI and CMO elision).

> Reviewed-by: Ben Gardon <bgardon@xxxxxxxxxx>

Thanks!

--
Best,
Oliver
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux