Re: [PATCH v2 05/18] KVM: x86/mmu: use struct kvm_mmu_root_info for mmu->root

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

 



On Wed, Feb 23, 2022, Maxim Levitsky wrote:
> On Thu, 2022-02-17 at 16:03 -0500, Paolo Bonzini wrote:
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index b912eef5dc1a..c0d7256e3a78 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -762,7 +762,7 @@ bool kvm_inject_emulated_page_fault(struct kvm_vcpu *vcpu,
> >  	if ((fault->error_code & PFERR_PRESENT_MASK) &&
> >  	    !(fault->error_code & PFERR_RSVD_MASK))
> >  		kvm_mmu_invalidate_gva(vcpu, fault_mmu, fault->address,
> > -				       fault_mmu->root_hpa);
> > +				       fault_mmu->root.hpa);
> >  
> >  	fault_mmu->inject_page_fault(vcpu, fault);
> >  	return fault->nested_page_fault;
> 
> 
> As a follow up to this patch I suggest that we should also rename pgd to just 'gpa'.

Hmm, I prefer 'pgd' over 'gpa' because it provides a hint/reminder that the field
is unused for TDP.  It also pairs with e.g. kvm_mmu_new_pgd(), though I suppose we
could rename those to something else too.

> This also brings a question, what pgd acronym actually means? 
> I guess paging guest directory?

Page Global Directory, borrowed from the kernel's arch-agnostic paging terminology.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux