On Tue, 22 Apr 2014 12:16:07 +0200
Andreas Färber <afaer...@suse.de> wrote:
> Am 22.04.2014 12:12, schrieb Fam Zheng:
> > On Tue, 04/22 17:58, Jason Wang wrote:
> >> On 04/22/2014 04:55 PM, Fam Zheng wrote:
> >>> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> >>> index aeabf3a..222bb73 100644
> >>> --- a/hw/virtio/virtio.c
> >>> +++ b/hw/virtio/virtio.c
> [...]
> >>> @@ -995,6 +1006,7 @@ void virtio_init(VirtIODevice *vdev, const char 
> >>> *name,
> >>>      vdev->status = 0;
> >>>      vdev->isr = 0;
> >>>      vdev->queue_sel = 0;
> >>> +    vdev->broken = 0;
> >>
> >> Should we also save and load this during migration?
> > 
> > Yes, we need that. Will add in next revision.
> 
> Please coordinate that with Greg then, who needed to add a field for
> endianness state. Problem is that virtio does not yet use VMState.
> 

Yeah... Cc'ing vmstate guru Juan for some insights.

> Cheers,
> Andreas
> 
> >>>      vdev->config_vector = VIRTIO_NO_VECTOR;
> >>>      vdev->vq = g_malloc0(sizeof(VirtQueue) * VIRTIO_PCI_QUEUE_MAX);
> >>>      vdev->vm_running = runstate_is_running();
> >>> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> >>> index 3e54e90..5b16faa 100644
> >>> --- a/include/hw/virtio/virtio.h
> >>> +++ b/include/hw/virtio/virtio.h
> >>> @@ -121,6 +121,7 @@ struct VirtIODevice
> >>>      bool vm_running;
> >>>      VMChangeStateEntry *vmstate;
> >>>      char *bus_name;
> >>> +    bool broken;
> >>>  };
> >>>  
> >>>  typedef struct VirtioDeviceClass {
> [snip]
> 



-- 
Gregory Kurz                                     kurzg...@fr.ibm.com
                                                 gk...@linux.vnet.ibm.com
Software Engineer @ IBM/Meiosys                  http://www.ibm.com
Tel +33 (0)562 165 496

"Anarchy is about taking complete responsibility for yourself."
        Alan Moore.


Reply via email to