virtio: cleanup VMSTATE_VIRTIO_DEVICE

Now all the usages of the old version of VMSTATE_VIRTIO_DEVICE are gone,
so we can get rid of the conditionals, and the old macro.

Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Halil Pasic 2016-10-06 14:55:50 +02:00 committed by Michael S. Tsirkin
parent 81cc8a6566
commit 5705653ff8
12 changed files with 0 additions and 53 deletions

View File

@ -11,8 +11,6 @@
*
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "hw/virtio/virtio.h"
#include "qemu/sockets.h"

View File

@ -11,8 +11,6 @@
*
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"

View File

@ -18,8 +18,6 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/iov.h"

View File

@ -11,8 +11,6 @@
* See the COPYING file in the top-level directory.
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/iov.h"

View File

@ -4,8 +4,6 @@
* top-level directory.
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/iov.h"

View File

@ -11,8 +11,6 @@
*
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qemu/iov.h"
#include "hw/virtio/virtio.h"

View File

@ -13,8 +13,6 @@
*
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "standard-headers/linux/virtio_ids.h"

View File

@ -11,8 +11,6 @@
* top-level directory.
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include <sys/ioctl.h>
#include "qemu/osdep.h"
#include "standard-headers/linux/virtio_vsock.h"

View File

@ -13,8 +13,6 @@
*
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qemu/iov.h"
#include "qemu/timer.h"

View File

@ -9,8 +9,6 @@
* top-level directory.
*/
#define VMSTATE_VIRTIO_DEVICE_USE_NEW
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/iov.h"

View File

@ -1639,12 +1639,6 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f)
vmstate_save_state(f, &vmstate_virtio, vdev, NULL);
}
/* A wrapper for use as a VMState .put function */
void virtio_vmstate_save(QEMUFile *f, void *opaque, size_t size)
{
virtio_save(VIRTIO_DEVICE(opaque), f);
}
/* A wrapper for use as a VMState .put function */
static void virtio_device_put(QEMUFile *f, void *opaque, size_t size)
{

View File

@ -177,12 +177,9 @@ bool virtio_should_notify(VirtIODevice *vdev, VirtQueue *vq);
void virtio_notify(VirtIODevice *vdev, VirtQueue *vq);
void virtio_save(VirtIODevice *vdev, QEMUFile *f);
void virtio_vmstate_save(QEMUFile *f, void *opaque, size_t size);
extern const VMStateInfo virtio_vmstate_info;
#ifdef VMSTATE_VIRTIO_DEVICE_USE_NEW
#define VMSTATE_VIRTIO_DEVICE \
{ \
.name = "virtio", \
@ -190,30 +187,6 @@ extern const VMStateInfo virtio_vmstate_info;
.flags = VMS_SINGLE, \
}
#else
/* TODO remove conditional as soon as all users are converted */
#define VMSTATE_VIRTIO_DEVICE(devname, v, getf, putf) \
static const VMStateDescription vmstate_virtio_ ## devname = { \
.name = "virtio-" #devname , \
.minimum_version_id = v, \
.version_id = v, \
.fields = (VMStateField[]) { \
{ \
.name = "virtio", \
.info = &(const VMStateInfo) {\
.name = "virtio", \
.get = getf, \
.put = putf, \
}, \
.flags = VMS_SINGLE, \
}, \
VMSTATE_END_OF_LIST() \
} \
}
#endif
int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id);
void virtio_notify_config(VirtIODevice *vdev);