All of lore.kernel.org
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.vnet.ibm.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Amit Shah <amit.shah@redhat.com>,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 01/12] virtio: add VIRTIO_DEF_DEVICE_VMSD macro
Date: Thu, 6 Oct 2016 13:08:42 +0200	[thread overview]
Message-ID: <68c00a6d-b43c-0d4f-e79f-7c19fef33dc6@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161005190006.GF11921@work-vm>



On 10/05/2016 09:00 PM, Dr. David Alan Gilbert wrote:
> * Paolo Bonzini (pbonzini@redhat.com) wrote:
>>
>>
>> On 05/10/2016 16:29, Dr. David Alan Gilbert wrote:
>>> The virtio-input conversion especially is nice and simple.
>>> The only weird case is virtio-gpu, and well virtio-gpu is the one that's
>>> odd here (compared to the rest of virtio).
>>
>> Though virtio-gpu would be the one that could become nicer without the
>> macros. :)
> 
> Yes, it would.
> 
>> What I don't like about the macros is that they don't allow you to
>> extend the VMStateDescription.

[..]
 
>>  However, if you agree with Halil your
>> opinion counts more.
> 
> Well I think Halil's stuff moves it in the right direction;
> with everything in VIRTIO_DEF_DEVICE_VMSD it means we can move things
> out of virtio_load/save and into corresponding members in VIRTIO_DEF_DEVICE_VMSD's
>  .fields array (before or after VMSTATE_VIRTIO_FIELD) without having
> to change any of the devices. Eventually virtio_load/save disappear.
>

I think this would end up messy if we want to preserve the current
behavior of virtio_load/save, and more importantly compatibility. AFAIU
we would have a 'synthetic' field for the configuration/transport
migration first, then a field dealing with the state in VirtIODevice
excluding config_vector and subsections (the state of virtio-core), then
we would have a sequence of fields dealing with the device specific
state of the transport agnostic virtio device (e.g. virtio-net,
virtio-gpu) that is emulate load/save from VirtIODeviceClass, then we
would have to take care of the virtio core subsections and possibly
device specific subsections (or have yet another synthetic field for
device specific subsections). This is actually the first thing I wanted
to do in response to "[RFC 0/6] converting some of virtio to VMState"
but after some thinking, concluded for myself that it will end up too
messy and way less readable that what Dave did there, without any
real gain to make the increased complexity justified.

Or am I mistaken here?

Halil

 

  parent reply	other threads:[~2016-10-06 11:09 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 14:19 [Qemu-devel] [PATCH 00/11] virtio migration: simplify vmstate helper Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 01/12] virtio: add VIRTIO_DEF_DEVICE_VMSD macro Halil Pasic
2016-09-30 14:50   ` Paolo Bonzini
2016-10-03 10:36     ` Halil Pasic
2016-10-03 11:29       ` Paolo Bonzini
2016-10-03 13:34         ` Halil Pasic
2016-10-03 15:24           ` Paolo Bonzini
2016-10-04  8:00             ` Halil Pasic
2016-10-05 14:29             ` Dr. David Alan Gilbert
2016-10-05 15:52               ` Paolo Bonzini
2016-10-05 19:00                 ` Dr. David Alan Gilbert
2016-10-06  9:43                   ` Paolo Bonzini
2016-10-06 11:08                   ` Halil Pasic [this message]
2016-10-06 10:54                 ` Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 02/12] virtio-blk: convert to VIRTIO_DEF_DEVICE_VMSD Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 03/12] virtio-net: " Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 04/12] virtio-9p: " Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 05/12] virtio-serial: " Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 06/12] virtio-gpu: do not use VMSTATE_VIRTIO_DEVICE Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 07/12] virtio-input: convert to VIRTIO_DEF_DEVICE_VMSD Halil Pasic
2016-09-30 14:19 ` [Qemu-devel] [PATCH 08/12] virtio-scsi: " Halil Pasic
2016-09-30 14:20 ` [Qemu-devel] [PATCH 09/12] virtio-balloon: " Halil Pasic
2016-09-30 14:20 ` [Qemu-devel] [PATCH 10/12] virtio-rng: " Halil Pasic
2016-09-30 14:20 ` [Qemu-devel] [PATCH 11/12] vhost-vsock: " Halil Pasic
2016-09-30 14:20 ` [Qemu-devel] [PATCH 12/12] virtio: remove unused VMSTATE_VIRTIO_DEVICE Halil Pasic
2016-09-30 15:02 ` [Qemu-devel] [PATCH 00/11] virtio migration: simplify vmstate helper Paolo Bonzini
2016-09-30 15:51   ` Dr. David Alan Gilbert
2016-10-03 10:04   ` Halil Pasic
2016-10-03 10:06     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68c00a6d-b43c-0d4f-e79f-7c19fef33dc6@linux.vnet.ibm.com \
    --to=pasic@linux.vnet.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.