qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 15/41] virtio: remove save/load_queue for virtio


From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH 15/41] virtio: remove save/load_queue for virtio
Date: Wed, 02 Dec 2009 19:22:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

"Michael S. Tsirkin" <address@hidden> wrote:
> On Wed, Dec 02, 2009 at 01:04:13PM +0100, Juan Quintela wrote:
>> diff --git a/hw/virtio.c b/hw/virtio.c
>> index c136005..b565bf9 100644
>> --- a/hw/virtio.c
>> +++ b/hw/virtio.c
>> @@ -643,8 +643,10 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f)
>>          qemu_put_be32(f, vdev->vq[i].vring.num);
>>          qemu_put_be64(f, vdev->vq[i].pa);
>>          qemu_put_be16s(f, &vdev->vq[i].last_avail_idx);
>> -        if (vdev->binding->save_queue)
>> -            vdev->binding->save_queue(vdev->binding_opaque, i, f);
>> +        if (vdev->type == VIRTIO_PCI &&
>> +            virtio_pci_msix_present(vdev->binding_opaque)) {
>> +            qemu_put_be16s(f, &vdev->vq[i].vector);
>> +        }
>>      }
>>  }
>> 
>
> I think this will break build on systems without PCI
> because virtio_pci.c is not linked in there.
> Correct?

It compiles for syborg (it has pci).  There are no other users.

> Making generic virtio.c depend on virtio_pci.c looks
> wrong in any case. We have bindings to
> resolve exactly this dependency problem.

There is no way that you throw "this" blob to vmstate and it will know
what to do there.  if it is needed, we can create an empty
virtio_pci_msix_present() function for !CONFIG_PCI.

Later, Juan.




reply via email to

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