lkml.org 
[lkml]   [2022]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/18] KVM: x86/mmu: use struct kvm_mmu_root_info for mmu->root
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.

\
 
 \ /
  Last update: 2022-02-23 16:43    [W:0.515 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site