summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-input.h20
-rw-r--r--include/qemu/hbitmap.h8
-rw-r--r--include/qemu/iov.h2
-rw-r--r--include/sysemu/block-backend.h1
4 files changed, 23 insertions, 8 deletions
diff --git a/include/hw/virtio/virtio-input.h b/include/hw/virtio/virtio-input.h
index 8134178..fd5417d 100644
--- a/include/hw/virtio/virtio-input.h
+++ b/include/hw/virtio/virtio-input.h
@@ -50,17 +50,17 @@ typedef struct virtio_input_event virtio_input_event;
#define VIRTIO_INPUT_HID_GET_PARENT_CLASS(obj) \
OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT_HID)
-#define DEFINE_VIRTIO_INPUT_PROPERTIES(_state, _field) \
- DEFINE_PROP_STRING("serial", _state, _field.serial)
+#define TYPE_VIRTIO_INPUT_HOST "virtio-input-host-device"
+#define VIRTIO_INPUT_HOST(obj) \
+ OBJECT_CHECK(VirtIOInputHost, (obj), TYPE_VIRTIO_INPUT_HOST)
+#define VIRTIO_INPUT_HOST_GET_PARENT_CLASS(obj) \
+ OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT_HOST)
typedef struct VirtIOInput VirtIOInput;
typedef struct VirtIOInputClass VirtIOInputClass;
typedef struct VirtIOInputConfig VirtIOInputConfig;
typedef struct VirtIOInputHID VirtIOInputHID;
-
-struct virtio_input_conf {
- char *serial;
-};
+typedef struct VirtIOInputHost VirtIOInputHost;
struct VirtIOInputConfig {
virtio_input_config config;
@@ -74,7 +74,7 @@ struct VirtIOInput {
uint32_t cfg_size;
QTAILQ_HEAD(, VirtIOInputConfig) cfg_list;
VirtQueue *evt, *sts;
- virtio_input_conf input;
+ char *serial;
virtio_input_event *queue;
uint32_t qindex, qsize;
@@ -100,6 +100,12 @@ struct VirtIOInputHID {
int ledstate;
};
+struct VirtIOInputHost {
+ VirtIOInput parent_obj;
+ char *evdev;
+ int fd;
+};
+
void virtio_input_send(VirtIOInput *vinput, virtio_input_event *event);
void virtio_input_init_config(VirtIOInput *vinput,
virtio_input_config *config);
diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h
index f0a85f8..bb94a00 100644
--- a/include/qemu/hbitmap.h
+++ b/include/qemu/hbitmap.h
@@ -132,6 +132,14 @@ void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count);
void hbitmap_reset(HBitmap *hb, uint64_t start, uint64_t count);
/**
+ * hbitmap_reset_all:
+ * @hb: HBitmap to operate on.
+ *
+ * Reset all bits in an HBitmap.
+ */
+void hbitmap_reset_all(HBitmap *hb);
+
+/**
* hbitmap_get:
* @hb: HBitmap to operate on.
* @item: Bit to query (0-based).
diff --git a/include/qemu/iov.h b/include/qemu/iov.h
index 68d25f2..569b2c2 100644
--- a/include/qemu/iov.h
+++ b/include/qemu/iov.h
@@ -75,7 +75,7 @@ size_t iov_memset(const struct iovec *iov, const unsigned int iov_cnt,
* For iov_send_recv() _whole_ area being sent or received
* should be within the iovec, not only beginning of it.
*/
-ssize_t iov_send_recv(int sockfd, struct iovec *iov, unsigned iov_cnt,
+ssize_t iov_send_recv(int sockfd, const struct iovec *iov, unsigned iov_cnt,
size_t offset, size_t bytes, bool do_send);
#define iov_recv(sockfd, iov, iov_cnt, offset, bytes) \
iov_send_recv(sockfd, iov, iov_cnt, offset, bytes, false)
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index b4a4d5e..8fc960f 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -118,6 +118,7 @@ int blk_co_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors);
int blk_co_flush(BlockBackend *blk);
int blk_flush(BlockBackend *blk);
int blk_flush_all(void);
+void blk_drain(BlockBackend *blk);
void blk_drain_all(void);
BlockdevOnError blk_get_on_error(BlockBackend *blk, bool is_read);
BlockErrorAction blk_get_error_action(BlockBackend *blk, bool is_read,
OpenPOWER on IntegriCloud