kvm: destroy emulated devices on VM exit
The hassle of getting refcounting right was greater than the hassle of keeping a list of devices to destroy on VM exit. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:

committed by
Alexander Graf

parent
22e64024fb
commit
07f0a7bdec
@@ -393,6 +393,7 @@ struct kvm {
|
||||
long mmu_notifier_count;
|
||||
#endif
|
||||
long tlbs_dirty;
|
||||
struct list_head devices;
|
||||
};
|
||||
|
||||
#define kvm_err(fmt, ...) \
|
||||
@@ -1069,8 +1070,8 @@ struct kvm_device_ops;
|
||||
struct kvm_device {
|
||||
struct kvm_device_ops *ops;
|
||||
struct kvm *kvm;
|
||||
atomic_t users;
|
||||
void *private;
|
||||
struct list_head vm_node;
|
||||
};
|
||||
|
||||
/* create, destroy, and name are mandatory */
|
||||
|
Reference in New Issue
Block a user