qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

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