public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: MMU: Inform users of mmio generation wraparound
@ 2013-06-20  8:59 Takuya Yoshikawa
  2013-06-20 10:59 ` Paolo Bonzini
  0 siblings, 1 reply; 10+ messages in thread
From: Takuya Yoshikawa @ 2013-06-20  8:59 UTC (permalink / raw)
  To: gleb, pbonzini; +Cc: kvm, xiaoguangrong

Without this information, users will just see unexpected performance
problems and there is little chance we will get good reports from them:
note that mmio generation is increased even when we just start, or stop,
dirty logging for some memory slot, in which case users should never
expect all shadow pages to be zapped.

Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
---
 arch/x86/kvm/mmu.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index c60c5da..bc8302f 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -4385,8 +4385,10 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm)
 	 * The max value is MMIO_MAX_GEN - 1 since it is not called
 	 * when mark memslot invalid.
 	 */
-	if (unlikely(kvm_current_mmio_generation(kvm) >= (MMIO_MAX_GEN - 1)))
+	if (unlikely(kvm_current_mmio_generation(kvm) >= (MMIO_MAX_GEN - 1))) {
+		printk(KERN_INFO "kvm: zapping shadow pages for mmio generation wraparound");
 		kvm_mmu_invalidate_zap_all_pages(kvm);
+	}
 }
 
 static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-20 14:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20  8:59 [PATCH] KVM: MMU: Inform users of mmio generation wraparound Takuya Yoshikawa
2013-06-20 10:59 ` Paolo Bonzini
2013-06-20 11:45   ` Gleb Natapov
2013-06-20 12:28     ` Takuya Yoshikawa
2013-06-20 12:54       ` Gleb Natapov
2013-06-20 13:14         ` Paolo Bonzini
2013-06-20 14:26           ` Takuya Yoshikawa
2013-06-20 13:17         ` Takuya Yoshikawa
2013-06-20 12:35     ` Paolo Bonzini
2013-06-20 12:46       ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox