diff mbox series

[6/6] KVM: Documentation: Add the missing tdp_mmu_page into kvm_mmu_page

Message ID 20230618000856.1714902-7-mizhang@google.com (mailing list archive)
State New, archived
Headers show
Series KVM: Documentation: Update document description for kvm_mmu_page and kvm_mmu_page_role | expand

Commit Message

Mingwei Zhang June 18, 2023, 12:08 a.m. UTC
Add tdp_mmu_page into kvm_mmu_page description. tdp_mmu_page is a field to
differentiate shadow pages from TDP MMU and non-TDP MMU. When TDP MMU is
enabled, sp->tdp_mmu_page=1 indicates a shadow page for L1, while
sp->tdp_mmu_page=0 indicates a shadow page for an L2. When TDP MMU is
disabled, sp->tdp_mmu_page is always 0. So update the doc to reflect the
information.

Signed-off-by: Mingwei Zhang <mizhang@google.com>
---
 Documentation/virt/kvm/x86/mmu.rst | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Huang, Kai June 22, 2023, 8:40 a.m. UTC | #1
On Sun, 2023-06-18 at 00:08 +0000, Mingwei Zhang wrote:
> Add tdp_mmu_page into kvm_mmu_page description. tdp_mmu_page is a field to
> differentiate shadow pages from TDP MMU and non-TDP MMU. When TDP MMU is
> enabled, sp->tdp_mmu_page=1 indicates a shadow page for L1, while
> sp->tdp_mmu_page=0 indicates a shadow page for an L2. When TDP MMU is
> disabled, sp->tdp_mmu_page is always 0. So update the doc to reflect the
> information.
> 
> Signed-off-by: Mingwei Zhang <mizhang@google.com>
> ---
>  Documentation/virt/kvm/x86/mmu.rst | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst
> index 0dbdb7fb8cc6..cbad49c37629 100644
> --- a/Documentation/virt/kvm/x86/mmu.rst
> +++ b/Documentation/virt/kvm/x86/mmu.rst
> @@ -277,6 +277,10 @@ Shadow pages contain the following information:
>      since the last time the page table was actually used; if emulation
>      is triggered too frequently on this page, KVM will unmap the page
>      to avoid emulation in the future.
> +  tdp_mmu_page:
> +    Is 1 if the shadow page is a TDP MMU page. When TDP MMU is disabled,
> +    this field is always 0.
> +
> 

Hmm.. Again I think "TDP MMU is disabled" is a little bit confusing, but maybe
it's only me having this impression.

I think you can just delete the second sentence.
Mingwei Zhang June 26, 2023, 5:59 p.m. UTC | #2
On Thu, Jun 22, 2023, Huang, Kai wrote:
> On Sun, 2023-06-18 at 00:08 +0000, Mingwei Zhang wrote:
> > Add tdp_mmu_page into kvm_mmu_page description. tdp_mmu_page is a field to
> > differentiate shadow pages from TDP MMU and non-TDP MMU. When TDP MMU is
> > enabled, sp->tdp_mmu_page=1 indicates a shadow page for L1, while
> > sp->tdp_mmu_page=0 indicates a shadow page for an L2. When TDP MMU is
> > disabled, sp->tdp_mmu_page is always 0. So update the doc to reflect the
> > information.
> > 
> > Signed-off-by: Mingwei Zhang <mizhang@google.com>
> > ---
> >  Documentation/virt/kvm/x86/mmu.rst | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst
> > index 0dbdb7fb8cc6..cbad49c37629 100644
> > --- a/Documentation/virt/kvm/x86/mmu.rst
> > +++ b/Documentation/virt/kvm/x86/mmu.rst
> > @@ -277,6 +277,10 @@ Shadow pages contain the following information:
> >      since the last time the page table was actually used; if emulation
> >      is triggered too frequently on this page, KVM will unmap the page
> >      to avoid emulation in the future.
> > +  tdp_mmu_page:
> > +    Is 1 if the shadow page is a TDP MMU page. When TDP MMU is disabled,
> > +    this field is always 0.
> > +
> > 
> 
> Hmm.. Again I think "TDP MMU is disabled" is a little bit confusing, but maybe
> it's only me having this impression.
> 
> I think you can just delete the second sentence.

It is not confusing but redundant in this case. I will delete it in next
version.
diff mbox series

Patch

diff --git a/Documentation/virt/kvm/x86/mmu.rst b/Documentation/virt/kvm/x86/mmu.rst
index 0dbdb7fb8cc6..cbad49c37629 100644
--- a/Documentation/virt/kvm/x86/mmu.rst
+++ b/Documentation/virt/kvm/x86/mmu.rst
@@ -277,6 +277,10 @@  Shadow pages contain the following information:
     since the last time the page table was actually used; if emulation
     is triggered too frequently on this page, KVM will unmap the page
     to avoid emulation in the future.
+  tdp_mmu_page:
+    Is 1 if the shadow page is a TDP MMU page. When TDP MMU is disabled,
+    this field is always 0.
+
 
 Reverse map
 ===========