qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken
Date: Tue, 22 Apr 2014 19:11:55 +0200

On Tue, 22 Apr 2014 12:16:07 +0200
Andreas Färber <address@hidden> 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                                     address@hidden
                                                 address@hidden
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

[Prev in Thread] Current Thread [Next in Thread]