diff options
author | Gleb Natapov <gleb@redhat.com> | 2013-01-30 09:45:01 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-02-04 20:24:28 -0500 |
commit | 9bb4f6b15ec038ab9afcf346aa6a590406ad6c17 (patch) | |
tree | 74a8548d8e1cc2f8cba4c42aa3a7f1f0b5d15276 /arch | |
parent | feb3eb704a86d97edb296502e95da42d622dac61 (diff) |
KVM: MMU: drop unneeded checks.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 2fa82b04f14e..40737b38da19 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -2328,9 +2328,8 @@ static int mmu_need_write_protect(struct kvm_vcpu *vcpu, gfn_t gfn, | |||
2328 | if (s->role.level != PT_PAGE_TABLE_LEVEL) | 2328 | if (s->role.level != PT_PAGE_TABLE_LEVEL) |
2329 | return 1; | 2329 | return 1; |
2330 | 2330 | ||
2331 | if (!need_unsync && !s->unsync) { | 2331 | if (!s->unsync) |
2332 | need_unsync = true; | 2332 | need_unsync = true; |
2333 | } | ||
2334 | } | 2333 | } |
2335 | if (need_unsync) | 2334 | if (need_unsync) |
2336 | kvm_unsync_pages(vcpu, gfn); | 2335 | kvm_unsync_pages(vcpu, gfn); |
@@ -4008,7 +4007,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa, | |||
4008 | !((sp->role.word ^ vcpu->arch.mmu.base_role.word) | 4007 | !((sp->role.word ^ vcpu->arch.mmu.base_role.word) |
4009 | & mask.word) && rmap_can_add(vcpu)) | 4008 | & mask.word) && rmap_can_add(vcpu)) |
4010 | mmu_pte_write_new_pte(vcpu, sp, spte, &gentry); | 4009 | mmu_pte_write_new_pte(vcpu, sp, spte, &gentry); |
4011 | if (!remote_flush && need_remote_flush(entry, *spte)) | 4010 | if (need_remote_flush(entry, *spte)) |
4012 | remote_flush = true; | 4011 | remote_flush = true; |
4013 | ++spte; | 4012 | ++spte; |
4014 | } | 4013 | } |