summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-01-06 05:03:02 +0300
committerAvi Kivity <avi@redhat.com>2009-02-15 03:47:36 +0300
commitad8ba2cd44d4d39fb3fe55d5dcc565b19fc3a7fb (patch)
tree74dfd501fc541b7d55eecec7b9469f1db8225507 /virt/kvm
parent85db06e514422ae429b5f85742d8111b70bd56f3 (diff)
downloadlinux-ad8ba2cd44d4d39fb3fe55d5dcc565b19fc3a7fb.tar.xz
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/kvm')
-rw-r--r--virt/kvm/kvm_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 0b6f2f71271f..68e3f1ec1674 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -891,6 +891,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);