Re: [PATCH v2 18/24] KVM: arm64: Instantiate guest stage-2 page-tables at EL2

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

 



On Tue, Jul 19, 2022 at 02:32:18PM +0100, Vincent Donnefort wrote:
> [...]
> 
> >  }
> >  
> >  void reclaim_guest_pages(struct kvm_shadow_vm *vm)
> >  {
> > -	unsigned long nr_pages;
> > +	unsigned long nr_pages, pfn;
> >  
> >  	nr_pages = kvm_pgtable_stage2_pgd_size(vm->kvm.arch.vtcr) >> PAGE_SHIFT;
> > -	WARN_ON(__pkvm_hyp_donate_host(hyp_virt_to_pfn(vm->pgt.pgd), nr_pages));
> > +	pfn = hyp_virt_to_pfn(vm->pgt.pgd);
> > +
> > +	guest_lock_component(vm);
> > +	kvm_pgtable_stage2_destroy(&vm->pgt);
> > +	vm->kvm.arch.mmu.pgd_phys = 0ULL;
> > +	guest_unlock_component(vm);
> > +
> > +	WARN_ON(__pkvm_hyp_donate_host(pfn, nr_pages));
> >  }
> 
> The pfn introduction being removed in a subsequent patch, this is probably
> unecessary noise.

Quite right, that should be left as-is. Will fix.

Will
_______________________________________________
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