kvm: x86: Avoid taking MMU lock in kvm_mmu_sync_roots if no sync is needed
authorJunaid Shahid <junaids@google.com>
Wed, 27 Jun 2018 21:59:05 +0000 (14:59 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:58:50 +0000 (17:58 +0200)
commit578e1c4db22135d91bad6c79585c4d19252b8d81
tree9ecfac93fdad0322008ee780897363928751fd04
parent5ce4786f75d16504223c7a65a42b200c2550fa29
kvm: x86: Avoid taking MMU lock in kvm_mmu_sync_roots if no sync is needed

kvm_mmu_sync_roots() can locklessly check whether a sync is needed and just
bail out if it isn't.

Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu.c