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
@@ -1781,7 +1781,6 @@ int kvmppc_mpic_connect_vcpu(struct kvm_device *dev, struct kvm_vcpu *vcpu,
|
||||
if (opp->mpic_mode_mask == GCR_MODE_PROXY)
|
||||
vcpu->arch.epr_flags |= KVMPPC_EPR_KERNEL;
|
||||
|
||||
kvm_device_get(dev);
|
||||
out:
|
||||
spin_unlock_irq(&opp->lock);
|
||||
return ret;
|
||||
@@ -1797,7 +1796,6 @@ void kvmppc_mpic_disconnect_vcpu(struct openpic *opp, struct kvm_vcpu *vcpu)
|
||||
BUG_ON(!opp->dst[vcpu->arch.irq_cpu_id].vcpu);
|
||||
|
||||
opp->dst[vcpu->arch.irq_cpu_id].vcpu = NULL;
|
||||
kvm_device_put(opp->dev);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user