aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/block/block.h3
-rw-r--r--include/block/block_int.h4
-rw-r--r--include/hw/qdev-core.h2
-rw-r--r--include/hw/virtio/virtio-balloon.h2
-rw-r--r--include/hw/virtio/virtio-blk.h2
-rw-r--r--include/hw/virtio/virtio-scsi.h2
-rw-r--r--include/hw/virtio/virtio-serial.h13
-rw-r--r--include/migration/qemu-file.h2
8 files changed, 20 insertions, 10 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 9dc6aada99..ebd95127a1 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -166,10 +166,12 @@ int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,
uint8_t *buf, int nb_sectors);
int bdrv_write(BlockDriverState *bs, int64_t sector_num,
const uint8_t *buf, int nb_sectors);
+int bdrv_writev(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov);
int bdrv_pread(BlockDriverState *bs, int64_t offset,
void *buf, int count);
int bdrv_pwrite(BlockDriverState *bs, int64_t offset,
const void *buf, int count);
+int bdrv_pwritev(BlockDriverState *bs, int64_t offset, QEMUIOVector *qiov);
int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset,
const void *buf, int count);
int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num,
@@ -348,6 +350,7 @@ void path_combine(char *dest, int dest_size,
const char *base_path,
const char *filename);
+int bdrv_writev_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos);
int bdrv_save_vmstate(BlockDriverState *bs, const uint8_t *buf,
int64_t pos, int size);
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 9aa98b5d12..458cde3766 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -164,8 +164,8 @@ struct BlockDriver {
const char *snapshot_name);
int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi);
- int (*bdrv_save_vmstate)(BlockDriverState *bs, const uint8_t *buf,
- int64_t pos, int size);
+ int (*bdrv_save_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov,
+ int64_t pos);
int (*bdrv_load_vmstate)(BlockDriverState *bs, uint8_t *buf,
int64_t pos, int size);
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 547fbc7e0d..cf83d5471a 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -96,7 +96,7 @@ typedef struct DeviceClass {
/* Private to qdev / bus. */
qdev_initfn init; /* TODO remove, once users are converted to realize */
qdev_event unplug;
- qdev_event exit;
+ qdev_event exit; /* TODO remove, once users are converted to unrealize */
const char *bus_type;
} DeviceClass;
diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h
index 3b459bbdd7..f863bfe27a 100644
--- a/include/hw/virtio/virtio-balloon.h
+++ b/include/hw/virtio/virtio-balloon.h
@@ -18,7 +18,7 @@
#include "hw/virtio/virtio.h"
#include "hw/pci/pci.h"
-#define TYPE_VIRTIO_BALLOON "virtio-balloon"
+#define TYPE_VIRTIO_BALLOON "virtio-balloon-device"
#define VIRTIO_BALLOON(obj) \
OBJECT_CHECK(VirtIOBalloon, (obj), TYPE_VIRTIO_BALLOON)
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index c10d069b25..fc71853eb4 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -17,7 +17,7 @@
#include "hw/virtio/virtio.h"
#include "hw/block/block.h"
-#define TYPE_VIRTIO_BLK "virtio-blk"
+#define TYPE_VIRTIO_BLK "virtio-blk-device"
#define VIRTIO_BLK(obj) \
OBJECT_CHECK(VirtIOBlock, (obj), TYPE_VIRTIO_BLK)
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index c9d92ca2e8..ccd7b0669c 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -18,7 +18,7 @@
#include "hw/pci/pci.h"
#include "hw/scsi/scsi.h"
-#define TYPE_VIRTIO_SCSI "virtio-scsi"
+#define TYPE_VIRTIO_SCSI "virtio-scsi-device"
#define VIRTIO_SCSI(obj) \
OBJECT_CHECK(VirtIOSCSI, (obj), TYPE_VIRTIO_SCSI)
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
index 098deeac4a..7c71304d10 100644
--- a/include/hw/virtio/virtio-serial.h
+++ b/include/hw/virtio/virtio-serial.h
@@ -192,7 +192,7 @@ typedef struct VirtIOSerialPostLoad {
} VirtIOSerialPostLoad;
struct VirtIOSerial {
- VirtIODevice vdev;
+ VirtIODevice parent_obj;
VirtQueue *c_ivq, *c_ovq;
/* Arrays of ivqs and ovqs: one per port */
@@ -200,8 +200,6 @@ struct VirtIOSerial {
VirtIOSerialBus bus;
- DeviceState *qdev;
-
QTAILQ_HEAD(, VirtIOSerialPort) ports;
/* bitmap for identifying active ports */
@@ -210,6 +208,8 @@ struct VirtIOSerial {
struct virtio_console_config config;
struct VirtIOSerialPostLoad *post_load;
+
+ virtio_serial_conf serial;
};
/* Interface to the virtio-serial bus */
@@ -244,4 +244,11 @@ size_t virtio_serial_guest_ready(VirtIOSerialPort *port);
*/
void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle);
+#define TYPE_VIRTIO_SERIAL "virtio-serial-device"
+#define VIRTIO_SERIAL(obj) \
+ OBJECT_CHECK(VirtIOSerial, (obj), TYPE_VIRTIO_SERIAL)
+
+#define DEFINE_VIRTIO_SERIAL_PROPERTIES(_state, _field) \
+ DEFINE_PROP_UINT32("max_ports", _state, _field.max_virtserial_ports, 31)
+
#endif
diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h
index 623c434b15..7519464192 100644
--- a/include/migration/qemu-file.h
+++ b/include/migration/qemu-file.h
@@ -55,7 +55,7 @@ typedef int (QEMUFileGetFD)(void *opaque);
* This function writes an iovec to file.
*/
typedef ssize_t (QEMUFileWritevBufferFunc)(void *opaque, struct iovec *iov,
- int iovcnt);
+ int iovcnt, int64_t pos);
typedef struct QEMUFileOps {
QEMUFilePutBufferFunc *put_buffer;