[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 00/12] virtio migration: simplify vmstate hel
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 00/12] virtio migration: simplify vmstate helper |
Date: |
Thu, 6 Oct 2016 17:30:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 06/10/2016 14:55, Halil Pasic wrote:
>
> Let us simplify a couple of things and get rid of some code duplication.
>
> NOTE: This series is exploring the suggestions of Paolo (I did my best
> to do everything as requested). I still think that we are better of with
> a macro that with spelling out the VMStateDescription for each device
> separately and redundantly. The LOC balance of the previous version was
> -41, this version is at +14 because of the expanded macros. IMHO the
> readability benefit of spelling out the vmsd definitions is questionabe
> (but it is beneficial if using ctags or grep). I hope for a good
> discussion, but I can live with this version too.
>
> v1 --> v2:
> * export VMStateInfo instead of helpers
> * change semantic of VMSTATE_VIRTIO_DEVICE
> * drop VIRTIO_DEF_DEVICE_VMSD macro, use its expansion instead
Yes, this is what I meant... I personally like that everything is
spelled out in
+static const VMStateDescription vmstate_virtio_blk = {
+ .name = "virtio-blk",
+ .minimum_version_id = 2,
+ .version_id = 2,
+ .fields = (VMStateField[]) {
+ VMSTATE_VIRTIO_DEVICE,
+ VMSTATE_END_OF_LIST()
+ },
+};
but I understand that other's mileages may vary...
Paolo
- [Qemu-devel] [PATCH v2 02/12] virtio-blk: convert VMSTATE_VIRTIO_DEVICE, (continued)
- [Qemu-devel] [PATCH v2 02/12] virtio-blk: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 06/12] virtio-gpu: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 04/12] virtio-9p: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 01/12] virtio: prepare change VMSTATE_VIRTIO_DEVICE macro, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 10/12] virtio-rng: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 07/12] virtio-input: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 08/12] virtio-scsi: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 11/12] vhost-vsock: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 12/12] virtio: cleanup VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- [Qemu-devel] [PATCH v2 09/12] virtio-balloon: convert VMSTATE_VIRTIO_DEVICE, Halil Pasic, 2016/10/06
- Re: [Qemu-devel] [PATCH v2 00/12] virtio migration: simplify vmstate helper,
Paolo Bonzini <=