KVM: protect kvm_usage_count with its own spinlock
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Sep 2013 10:58:35 +0000 (12:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 30 Sep 2013 07:21:46 +0000 (09:21 +0200)
commit4a937f96f3a29c58b7edd349d2e4dfac371efdf2
tree67471522814264ea197e724a1ca09a424bdbba6c
parent4fa92fb25ae5a2d79d872ab54df511c831b1f363
KVM: protect kvm_usage_count with its own spinlock

The VM list need not be protected by a raw spinlock.  Separate the
two so that kvm_lock can be made non-raw.

Cc: kvm@vger.kernel.org
Cc: gleb@redhat.com
Cc: jan.kiszka@siemens.com
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virtual/kvm/locking.txt
virt/kvm/kvm_main.c