KVM: MMU: reduce KVM_REQ_MMU_RELOAD when root page is zapped
authorGleb Natapov <gleb@redhat.com>
Fri, 31 May 2013 00:36:30 +0000 (08:36 +0800)
committerGleb Natapov <gleb@redhat.com>
Wed, 5 Jun 2013 09:34:02 +0000 (12:34 +0300)
commit05988d728dcd962d50374e4e63171324163005b6
treed9839cdbd1514e367d5d6e073d8b80c25f87fc0c
parent365c886860c4ba670d245e762b23987c912c129a
KVM: MMU: reduce KVM_REQ_MMU_RELOAD when root page is zapped

Quote Gleb's mail:
| why don't we check for sp->role.invalid in
| kvm_mmu_prepare_zap_page before calling kvm_reload_remote_mmus()?

and

| Actually we can add check for is_obsolete_sp() there too since
| kvm_mmu_invalidate_all_pages() already calls kvm_reload_remote_mmus()
| after incrementing mmu_valid_gen.

[ Xiao: add some comments and the check of is_obsolete_sp() ]

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/mmu.c