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.

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]

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to