[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [QEMU][PATCH v1 1/7] xen: when unplugging emulated devices skip virtio devices
On Tue, 2023-10-10 at 13:24 -0700, Vikram Garhwal wrote: > Hi Stefano, > On Mon, Oct 09, 2023 at 04:51:53PM -0700, Stefano Stabellini wrote: > > On Thu, 5 Oct 2023, Vikram Garhwal wrote: > > > From: Juergen Gross <jgross@xxxxxxxx> > > > > > > Virtio devices should never be unplugged at boot time, as they are > > > similar to pci passthrough devices. > > > > > > Signed-off-by: Juergen Gross <jgross@xxxxxxxx> > > > Signed-off-by: Vikram Garhwal <vikram.garhwal@xxxxxxx> > > > --- > > > hw/i386/xen/xen_platform.c | 8 +++++++- > > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > > > diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c > > > index 17457ff3de..3560eaf8c8 100644 > > > --- a/hw/i386/xen/xen_platform.c > > > +++ b/hw/i386/xen/xen_platform.c > > > @@ -28,6 +28,7 @@ > > > #include "hw/ide/pci.h" > > > #include "hw/pci/pci.h" > > > #include "migration/vmstate.h" > > > +#include "hw/virtio/virtio-bus.h" > > > #include "net/net.h" > > > #include "trace.h" > > > #include "sysemu/xen.h" > > > @@ -132,7 +133,8 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void > > > *o) > > > /* We have to ignore passthrough devices */ > > > if (pci_get_word(d->config + PCI_CLASS_DEVICE) == > > > PCI_CLASS_NETWORK_ETHERNET > > > - && !pci_device_is_passthrough(d)) { > > > + && !pci_device_is_passthrough(d) > > > + && !qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) { > > > > Please update the in-code comment above to say "ignore passthrough > > devices and virtio devices" > > Sounds good. Will update in the code comment in v2. Please could you also remove the note in docs/system/i386/xen.rst which mentions having to dissuade the guest kernel from unplugging VirtIO devices by adding 'xen_unplug_emul=never' to its command line? Attachment:
smime.p7s
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |