diff options
author | Sheng Yang <sheng@linux.intel.com> | 2009-01-06 10:03:02 +0800 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-01-06 11:21:11 +0200 |
commit | 8158903885be6d833b8e27da740a2c981793ba31 (patch) | |
tree | f2cb94c2de1dc3a697a632e3701e0868a1d64a6a /virt | |
parent | 254a357ce4f89f52c0866fbd432b848136b8eac9 (diff) |
KVM: Add kvm_arch_sync_events to sync with asynchronize events
kvm_arch_sync_events is introduced to quiet down all other events may happen
contemporary with VM destroy process, like IRQ handler and work struct for
assigned device.
For kvm_arch_sync_events is called at the very beginning of kvm_destroy_vm(), so
the state of KVM here is legal and can provide a environment to quiet down other
events.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 57035579457c..b1f5dfe4a7d3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -883,6 +883,7 @@ static void kvm_destroy_vm(struct kvm *kvm) { struct mm_struct *mm = kvm->mm; + kvm_arch_sync_events(kvm); spin_lock(&kvm_lock); list_del(&kvm->vm_list); spin_unlock(&kvm_lock); |