From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud3Wb-0008Am-Tt for qemu-devel@nongnu.org; Thu, 16 May 2013 15:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ud3Wa-0002fK-Pu for qemu-devel@nongnu.org; Thu, 16 May 2013 15:07:37 -0400 Received: from mail-ie0-x22e.google.com ([2607:f8b0:4001:c03::22e]:54031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ud3Wa-0002fF-KZ for qemu-devel@nongnu.org; Thu, 16 May 2013 15:07:36 -0400 Received: by mail-ie0-f174.google.com with SMTP id 10so7144755ied.5 for ; Thu, 16 May 2013 12:07:36 -0700 (PDT) Sender: fluxion Date: Thu, 16 May 2013 14:07:24 -0500 From: mdroth Message-ID: <20130516190724.GC2441@vm> References: <1368723967-21050-1-git-send-email-fred.konrad@greensocs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1368723967-21050-1-git-send-email-fred.konrad@greensocs.com> Subject: Re: [Qemu-devel] [PATCH for-1.5] virtio: add virtio_bus_get_dev_path.' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fred.konrad@greensocs.com Cc: cornelia.huck@de.ibm.com, pbonzini@redhat.com, aliguori@us.ibm.com, mark.burton@greensocs.com, qemu-devel@nongnu.org On Thu, May 16, 2013 at 07:06:07PM +0200, fred.konrad@greensocs.com wrote: > From: KONRAD Frederic > > This adds virtio_bus_get_dev_path to fix migration id string which is wrong > since the virtio refactoring. > > Signed-off-by: KONRAD Frederic > Reviewed-by: Paolo Bonzini > Cc: mdroth Re-tested the failure scenario with this patch applied and this does seem to resolve the issue. For reference, the configuration was v1.4.0 <-> 1.5.0-rc2+fix using the following options: x86_64-softmmu/qemu-system-x86_64 -enable-kvm -L temp-bios -M pc-i440fx-1.4 -m 512M -kernel boot/vmlinuz-x86_64 -initrd boot/test-initramfs-x86_64.img.gz -vga std -append seed=1234 -drive file=disk1.img,if=virtio -drive file=disk2.img,if=virtio -device virtio-net-pci,netdev=net0 -netdev user,id=net0 Tested-by: Michael Roth > --- > hw/virtio/virtio-bus.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c > index aab72ff..ea2e11a 100644 > --- a/hw/virtio/virtio-bus.c > +++ b/hw/virtio/virtio-bus.c > @@ -154,12 +154,26 @@ void virtio_bus_set_vdev_config(VirtioBusState *bus, uint8_t *config) > } > } > > +static char *virtio_bus_get_dev_path(DeviceState *dev) > +{ > + BusState *bus = qdev_get_parent_bus(dev); > + DeviceState *proxy = DEVICE(bus->parent); > + return qdev_get_dev_path(proxy); > +} > + > +static void virtio_bus_class_init(ObjectClass *klass, void *data) > +{ > + BusClass *bus_class = BUS_CLASS(klass); > + bus_class->get_dev_path = virtio_bus_get_dev_path; > +} > + > static const TypeInfo virtio_bus_info = { > .name = TYPE_VIRTIO_BUS, > .parent = TYPE_BUS, > .instance_size = sizeof(VirtioBusState), > .abstract = true, > .class_size = sizeof(VirtioBusClass), > + .class_init = virtio_bus_class_init > }; > > static void virtio_register_types(void) > -- > 1.7.11.7 >