Skip to content

Commit 6a71392

Browse files
mzhang3579sean-jc
authored andcommitted
KVM: Documentation: Add the missing description for tdp_mmu_root_count into kvm_mmu_page
Add the description of tdp_mmu_root_count into kvm_mmu_page description and combine it with the description of root_count. tdp_mmu_root_count is an atomic counter used only in TDP MMU. Update the doc. Signed-off-by: Mingwei Zhang <[email protected]> Reviewed-by: Kai Huang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent b40a245 commit 6a71392

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Documentation/virt/kvm/x86/mmu.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,13 @@ Shadow pages contain the following information:
229229
can be calculated from the gfn field when used. In addition, when
230230
role.direct is set, KVM does not track access permission for each of the
231231
gfn. See role.direct and gfn.
232-
root_count:
233-
A counter keeping track of how many hardware registers (guest cr3 or
234-
pdptrs) are now pointing at the page. While this counter is nonzero, the
235-
page cannot be destroyed. See role.invalid.
232+
root_count / tdp_mmu_root_count:
233+
root_count is a reference counter for root shadow pages in Shadow MMU.
234+
vCPUs elevate the refcount when getting a shadow page that will be used as
235+
a root page, i.e. page that will be loaded into hardware directly (CR3,
236+
PDPTRs, nCR3 EPTP). Root pages cannot be destroyed while their refcount is
237+
non-zero. See role.invalid. tdp_mmu_root_count is similar but exclusively
238+
used in TDP MMU as an atomic refcount.
236239
parent_ptes:
237240
The reverse mapping for the pte/ptes pointing at this page's spt. If
238241
parent_ptes bit 0 is zero, only one spte points at this page and

0 commit comments

Comments
 (0)