[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2 4/8] virtio-pci: fix 1.0 virtqueue migration
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH V2 4/8] virtio-pci: fix 1.0 virtqueue migration |
Date: |
Mon, 7 Sep 2015 10:21:11 +0200 |
On Mon, 7 Sep 2015 15:39:59 +0800
Jason Wang <address@hidden> wrote:
> On 09/02/2015 07:06 PM, Cornelia Huck wrote:
> > On Wed, 2 Sep 2015 11:25:21 +0800
> > Jason Wang <address@hidden> wrote:
> >> +static int get_extra_state(QEMUFile *f, void *pv, size_t size)
> >> +{
> >> + VirtIODevice *vdev = pv;
> >> + BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
> >> + VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
> >> + int ret = 0;
> >> +
> >> + ret = k->load_extra_state(qbus->parent, f);
> > Should we check for ->load_extra_state() and return failure if it does
> > not exist?
>
> I think checking the existence of has_extra_state() in
> virtio_extra_state_needed() is enough for this? Or is there anything I miss?
The has_extra_state() callback is called by the sender, not by the
receiver.
If the other side sent the extra state but we can't handle it, I think
it would be better to fail the migration than to crash. Still broken
code, but probably easier to debug :)
[Qemu-devel] [PATCH V2 5/8] memory: don't try to adjust endianness for zero length eventfd, Jason Wang, 2015/09/01
[Qemu-devel] [PATCH V2 6/8] virtio-pci: use wildcard mmio eventfd for 1.0 notification cap, Jason Wang, 2015/09/01
[Qemu-devel] [PATCH V2 7/8] virtio-pci: introduce pio notification capability for modern device, Jason Wang, 2015/09/01
[Qemu-devel] [PATCH V2 8/8] virtio-pci: unbreak queue_enable read, Jason Wang, 2015/09/01
Re: [Qemu-devel] [PATCH V2 0/8] virtio 1.0 pci optimizations and fixes, Michael S. Tsirkin, 2015/09/10
Re: [Qemu-devel] [PATCH V2 0/8] virtio 1.0 pci optimizations and fixes, Michael S. Tsirkin, 2015/09/24