[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH 1/4] Introduce a new hotplug state: Force eject.
On Wed, May 16, 2012 at 11:32 AM, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> wrote: > On Tue, 15 May 2012, Michael S. Tsirkin wrote: >> On Tue, May 15, 2012 at 04:26:36PM +0100, Anthony PERARD wrote: >> > This hotplug state will be used to remove a device without the guest >> > cooperation. >> > >> > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> >> >> This can crash guest, can't it? If you are fine with crashing guest, >> we already let you do this: >> - delete device >> - reset guest >> no need for new flags. > > Given that the guest is not going to crash (if it knows what it is > doing), we could just: > > > diff --git a/hw/xen_platform.c b/hw/xen_platform.c > index a9c52a6..a1e1a33 100644 > --- a/hw/xen_platform.c > +++ b/hw/xen_platform.c > @@ -88,6 +88,7 @@ static void unplug_nic(PCIBus *b, PCIDevice *d) > Â Â if (pci_get_word(d->config + PCI_CLASS_DEVICE) == > Â Â Â Â Â Â PCI_CLASS_NETWORK_ETHERNET) { > Â Â Â Â qdev_unplug(&(d->qdev), NULL); > + Â Â Â Âqdev_free(&(d->qdev)); > Â Â } > Â} > > > Anthony, can you confirm that this solves the problem for you? This work until I try to hotplug a new device to the guest at wish point I have this: ERROR:/local/home/anthony/work/qemu/qom/object.c:389:object_delete: assertion failed: (obj->ref == 0) This is because there is still a pending request of the hotunplug in the acpi piix4. If I call qdev_free without qdev_unplug, I hit the same assert, but rigth away. This is way something new. -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |