Re: [PATCH v5 04/14] KVM: arm64: Don't pass kvm_pgtable through kvm_pgtable_walk_data

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

 



On Thu, Nov 10, 2022 at 01:30:08PM +0800, Gavin Shan wrote:
> Hi Oliver,
> 
> On 11/8/22 5:56 AM, Oliver Upton wrote:
> > In order to tear down page tables from outside the context of
> > kvm_pgtable (such as an RCU callback), stop passing a pointer through
> > kvm_pgtable_walk_data.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Oliver Upton <oliver.upton@xxxxxxxxx>
> > ---
> >   arch/arm64/kvm/hyp/pgtable.c | 18 +++++-------------
> >   1 file changed, 5 insertions(+), 13 deletions(-)
> > 
> 
> Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx>

Appreciated :)

> > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
> > index db25e81a9890..93989b750a26 100644
> > --- a/arch/arm64/kvm/hyp/pgtable.c
> > +++ b/arch/arm64/kvm/hyp/pgtable.c
> > @@ -50,7 +50,6 @@
> >   #define KVM_MAX_OWNER_ID		1
> >   struct kvm_pgtable_walk_data {
> > -	struct kvm_pgtable		*pgt;
> >   	struct kvm_pgtable_walker	*walker;
> >   	u64				addr;
> 
> Ok. Here is the answer why data->pgt->mm_ops isn't reachable in the walker
> and visitor, and @mm_ops needs to be passed down.

Yup, the reason for unhitching all of this from kvm_pgtable is explained
in the cover letter as well:

  Patches 1-4 clean up the context associated with a page table walk / PTE
  visit. This is helpful for:
   - Extending the context passed through for a visit
   - Building page table walkers that operate outside of a kvm_pgtable
     context (e.g. RCU callback)

--
Thanks,
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