From 8144a17ed953162abafae136e1c4228b67438408 Mon Sep 17 00:00:00 2001 From: Xiao Guangrong Date: Fri, 16 Dec 2011 18:18:10 +0800 Subject: [PATCH] --- yaml --- r: 297047 b: refs/heads/master c: a138fe7535c0ec778465c7b54b1aaaf4cfd885b7 h: refs/heads/master i: 297045: 3693fdcc3643f6d05e7327d10a2cbe01f55429cf 297043: b5cec82f1a6ec93c411f85ab90ccd8d8d1ced30f 297039: 6cf2440def098d9bc1e25ba8e01b352b32ea86e4 v: v3 --- [refs] | 2 +- trunk/arch/x86/kvm/mmu.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index a345f26d089c..7d7f4bfa6307 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6addd1aa2ca28c054820ef2966ad372f118c3f31 +refs/heads/master: a138fe7535c0ec778465c7b54b1aaaf4cfd885b7 diff --git a/trunk/arch/x86/kvm/mmu.c b/trunk/arch/x86/kvm/mmu.c index 9270e0d93c31..34da43086952 100644 --- a/trunk/arch/x86/kvm/mmu.c +++ b/trunk/arch/x86/kvm/mmu.c @@ -3551,7 +3551,7 @@ static u64 mmu_pte_write_fetch_gpte(struct kvm_vcpu *vcpu, gpa_t *gpa, * If we're seeing too many writes to a page, it may no longer be a page table, * or we may be forking, in which case it is better to unmap the page. */ -static bool detect_write_flooding(struct kvm_mmu_page *sp, u64 *spte) +static bool detect_write_flooding(struct kvm_mmu_page *sp) { /* * Skip write-flooding detected for the sp whose level is 1, because @@ -3660,10 +3660,8 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, mask.cr0_wp = mask.cr4_pae = mask.nxe = 1; for_each_gfn_indirect_valid_sp(vcpu->kvm, sp, gfn, node) { - spte = get_written_sptes(sp, gpa, &npte); - if (detect_write_misaligned(sp, gpa, bytes) || - detect_write_flooding(sp, spte)) { + detect_write_flooding(sp)) { zap_page |= !!kvm_mmu_prepare_zap_page(vcpu->kvm, sp, &invalid_list); ++vcpu->kvm->stat.mmu_flooded;