linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mingwei Zhang <mizhang@google.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kai Huang <kai.huang@intel.com>,
	Jim Mattson <jmattson@google.com>,
	David Matlack <dmatlack@google.com>,
	Ben Gardon <bgardon@google.com>, Xu Yilun <yilun.xu@intel.com>,
	Zhi Wang <zhi.wang.linux@gmail.com>
Subject: Re: [PATCH v2 2/6] KVM: Documentation: Update the field name gfns and its description in kvm_mmu_page
Date: Mon, 31 Jul 2023 17:54:22 +0000	[thread overview]
Message-ID: <ZMf1TkrUjP6+/VSC@google.com> (raw)
In-Reply-To: <ec65c77a-3499-6278-f352-9bbe25a44b96@infradead.org>

On Mon, Jun 26, 2023, Randy Dunlap wrote:
> Hi--
> 
> On 6/26/23 11:20, Mingwei Zhang wrote:
> > Update the field 'gfns' in kvm_mmu_page to 'shadowed_translation' to be
> > consistent with the code. Also update the corresponding 'gfns' in the
> > comments. The more detailed description of 'shadowed_translation' is
> > already inlined in the data structure definition, so no need to duplicate
> > the text but simply just update the names.
> > 
> > Signed-off-by: Mingwei Zhang <mizhang@google.com>
> > Reviewed-by: Kai Huang <kai.huang@intel.com>
> > ---
> >  Documentation/virt/kvm/x86/mmu.rst | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst
> > index 561efa8ec7d7..4c9044b4dc6c 100644
> > --- a/Documentation/virt/kvm/x86/mmu.rst
> > +++ b/Documentation/virt/kvm/x86/mmu.rst
> > @@ -221,11 +221,12 @@ Shadow pages contain the following information:
> >      at __pa(sp2->spt).  sp2 will point back at sp1 through parent_pte.
> >      The spt array forms a DAG structure with the shadow page as a node, and
> >      guest pages as leaves.
> > -  gfns:
> > -    An array of 512 guest frame numbers, one for each present pte.  Used to
> > -    perform a reverse map from a pte to a gfn. When role.direct is set, any
> > +  shadowed_translation:
> > +    An array of 512 shadow translation entries, one for each present pte. Used
> > +    to perform a reverse map from a pte to a gfn. When role.direct is set, any
> >      element of this array can be calculated from the gfn field when used, in
> > -    this case, the array of gfns is not allocated. See role.direct and gfn.
> > +    this case, the array of shadowed_translation is not allocated. See
> 
> I cannot parse the before version nor the after version of this sentence (new version):
> 
>                                                   When role.direct is set, any
>     element of this array can be calculated from the gfn field when used, in
>     this case, the array of shadowed_translation is not allocated.
> 
> 

Sorry for the late reply.  Why is it not parsed? It just means that when
role.direct is set, do not use gfns. The gfn can be calculated from the
base address + offset. The base address here is the 'gfn' field in
kvm_mmu_page.

> > +    role.direct and gfn.
> >    root_count:
> >      A counter keeping track of how many hardware registers (guest cr3 or
> >      pdptrs) are now pointing at the page.  While this counter is nonzero, the
> 
> -- 
> ~Randy

  reply	other threads:[~2023-07-31 17:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26 18:20 [PATCH v2 0/6] Update document description for kvm_mmu_page and kvm_mmu_page_role Mingwei Zhang
2023-06-26 18:20 ` [PATCH v2 1/6] KVM: Documentation: Add the missing description for guest_mode in kvm_mmu_page_role Mingwei Zhang
2023-06-26 18:20 ` [PATCH v2 2/6] KVM: Documentation: Update the field name gfns and its description in kvm_mmu_page Mingwei Zhang
2023-06-26 21:49   ` Randy Dunlap
2023-07-31 17:54     ` Mingwei Zhang [this message]
2023-07-31 18:24       ` Sean Christopherson
2023-07-31 18:59         ` Mingwei Zhang
2023-06-26 18:20 ` [PATCH v2 3/6] KVM: Documentation: Add the missing description for ptep " Mingwei Zhang
2023-06-26 21:44   ` Randy Dunlap
2023-06-26 22:20   ` Huang, Kai
2023-06-27 15:27   ` Sean Christopherson
2023-07-31 18:09     ` Mingwei Zhang
2023-06-26 18:20 ` [PATCH v2 4/6] KVM: Documentation: Add the missing description for tdp_mmu_root_count into kvm_mmu_page Mingwei Zhang
2023-06-26 22:21   ` Huang, Kai
2023-06-27 15:50   ` Sean Christopherson
2023-07-31 18:41     ` Mingwei Zhang
2023-06-26 18:20 ` [PATCH v2 5/6] KVM: Documentation: Add the missing description for mmu_valid_gen " Mingwei Zhang
2023-06-27 16:13   ` Sean Christopherson
2023-07-31 22:02     ` Mingwei Zhang
2023-06-26 18:20 ` [PATCH v2 6/6] KVM: Documentation: Add the missing description for tdp_mmu_page " Mingwei Zhang
2023-06-26 22:23   ` Huang, Kai
2023-06-27 16:16   ` Sean Christopherson
2023-07-31 22:28     ` Mingwei Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZMf1TkrUjP6+/VSC@google.com \
    --to=mizhang@google.com \
    --cc=bgardon@google.com \
    --cc=dmatlack@google.com \
    --cc=jmattson@google.com \
    --cc=kai.huang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=seanjc@google.com \
    --cc=yilun.xu@intel.com \
    --cc=zhi.wang.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).