aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>2013-06-19 05:09:21 -0400
committerGleb Natapov <gleb@redhat.com>2013-06-27 07:20:43 -0400
commit0cbf8e437b60b8b12d97589509d3e5a581731d36 (patch)
tree9990c3958c06c8737d19f510f90ee453c2b14350
parentaccaefe07ddbeb12c0de4cec1d62dba6a0ea1605 (diff)
KVM: MMU: document write_flooding_count
Document write_flooding_count to Documentation/virtual/kvm/mmu.txt Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--Documentation/virtual/kvm/mmu.txt9
-rw-r--r--arch/x86/include/asm/kvm_host.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index f514a3fad9b9..0db7743c55e1 100644
--- a/Documentation/virtual/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -215,6 +215,15 @@ Shadow pages contain the following information:
215 atomically. The reader uses this while running out of the MMU lock 215 atomically. The reader uses this while running out of the MMU lock
216 to detect in-progress updates and retry them until the writer has 216 to detect in-progress updates and retry them until the writer has
217 finished the write. 217 finished the write.
218 write_flooding_count:
219 A guest may write to a page table many times, causing a lot of
220 emulations if the page needs to be write-protected (see "Synchronized
221 and unsynchronized pages" below). Leaf pages can be unsynchronized
222 so that they do not trigger frequent emulation, but this is not
223 possible for non-leafs. This field counts the number of emulations
224 since the last time the page table was actually used; if emulation
225 is triggered too frequently on this page, KVM will unmap the page
226 to avoid emulation in the future.
218 227
219Reverse map 228Reverse map
220=========== 229===========
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 5d28c11d5e21..6b636fd8582f 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -233,6 +233,7 @@ struct kvm_mmu_page {
233 int clear_spte_count; 233 int clear_spte_count;
234#endif 234#endif
235 235
236 /* Number of writes since the last time traversal visited this page. */
236 int write_flooding_count; 237 int write_flooding_count;
237}; 238};
238 239