mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
22e64024fb
commit
07f0a7bdec
3 changed files with 18 additions and 16 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue