diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/block/block.h | 2 | ||||
| -rw-r--r-- | include/block/block_int.h | 2 | ||||
| -rw-r--r-- | include/hw/devices.h | 1 | ||||
| -rw-r--r-- | include/hw/qdev-core.h | 13 | ||||
| -rw-r--r-- | include/migration/qemu-file-types.h | 2 | ||||
| -rw-r--r-- | include/qemu/module.h | 2 | ||||
| -rw-r--r-- | include/sysemu/iothread.h | 5 |
7 files changed, 22 insertions, 5 deletions
diff --git a/include/block/block.h b/include/block/block.h index 5b5cf868df..6a758a76f8 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -472,7 +472,7 @@ void bdrv_next_cleanup(BdrvNextIterator *it); BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs); bool bdrv_is_encrypted(BlockDriverState *bs); void bdrv_iterate_format(void (*it)(void *opaque, const char *name), - void *opaque); + void *opaque, bool read_only); const char *bdrv_get_node_name(const BlockDriverState *bs); const char *bdrv_get_device_name(const BlockDriverState *bs); const char *bdrv_get_device_or_node_name(const BlockDriverState *bs); diff --git a/include/block/block_int.h b/include/block/block_int.h index 836d67c1ae..a23cabaddd 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -56,6 +56,8 @@ #define BLOCK_OPT_NOCOW "nocow" #define BLOCK_OPT_OBJECT_SIZE "object_size" #define BLOCK_OPT_REFCOUNT_BITS "refcount_bits" +#define BLOCK_OPT_DATA_FILE "data_file" +#define BLOCK_OPT_DATA_FILE_RAW "data_file_raw" #define BLOCK_PROBE_BUF_SIZE 512 diff --git a/include/hw/devices.h b/include/hw/devices.h index b5f1662225..1ed5be3296 100644 --- a/include/hw/devices.h +++ b/include/hw/devices.h @@ -52,7 +52,6 @@ void retu_key_event(void *retu, int state); /* tc6393xb.c */ typedef struct TC6393xbState TC6393xbState; -#define TC6393XB_RAM 0x110000 /* amount of ram for Video and USB */ TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem, uint32_t base, qemu_irq irq); void tc6393xb_gpio_out_set(TC6393xbState *s, int line, diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index e70a4bfa49..17f09aac72 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -206,6 +206,7 @@ struct BusState { HotplugHandler *hotplug_handler; int max_index; bool realized; + int num_children; QTAILQ_HEAD(, BusChild) children; QLIST_ENTRY(BusState) sibling; }; @@ -280,7 +281,19 @@ DeviceState *qdev_try_create(BusState *bus, const char *name); void qdev_init_nofail(DeviceState *dev); void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id, int required_for_version); +HotplugHandler *qdev_get_bus_hotplug_handler(DeviceState *dev); HotplugHandler *qdev_get_machine_hotplug_handler(DeviceState *dev); +/** + * qdev_get_hotplug_handler: Get handler responsible for device wiring + * + * Find HOTPLUG_HANDLER for @dev that provides [pre|un]plug callbacks for it. + * + * Note: in case @dev has a parent bus, it will be returned as handler unless + * machine handler overrides it. + * + * Returns: pointer to object that implements TYPE_HOTPLUG_HANDLER interface + * or NULL if there aren't any. + */ HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev); void qdev_unplug(DeviceState *dev, Error **errp); void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev, diff --git a/include/migration/qemu-file-types.h b/include/migration/qemu-file-types.h index bd6d7dd7f9..bbe04d4484 100644 --- a/include/migration/qemu-file-types.h +++ b/include/migration/qemu-file-types.h @@ -25,6 +25,8 @@ #ifndef QEMU_FILE_H #define QEMU_FILE_H +int qemu_file_get_error(QEMUFile *f); + void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, size_t size); void qemu_put_byte(QEMUFile *f, int v); diff --git a/include/qemu/module.h b/include/qemu/module.h index 55dd2beea8..db3065381d 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -45,6 +45,7 @@ typedef enum { MODULE_INIT_QOM, MODULE_INIT_TRACE, MODULE_INIT_XEN_BACKEND, + MODULE_INIT_LIBQOS, MODULE_INIT_MAX } module_init_type; @@ -54,6 +55,7 @@ typedef enum { #define trace_init(function) module_init(function, MODULE_INIT_TRACE) #define xen_backend_init(function) module_init(function, \ MODULE_INIT_XEN_BACKEND) +#define libqos_init(function) module_init(function, MODULE_INIT_LIBQOS) #define block_module_load_one(lib) module_load_one("block-", lib) #define ui_module_load_one(lib) module_load_one("ui-", lib) diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index 8a7ac2c528..5f6240d5cb 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -24,11 +24,10 @@ typedef struct { QemuThread thread; AioContext *ctx; + bool run_gcontext; /* whether we should run gcontext */ GMainContext *worker_context; GMainLoop *main_loop; - GOnce once; - QemuMutex init_done_lock; - QemuCond init_done_cond; /* is thread initialization done? */ + QemuSemaphore init_done_sem; /* is thread init done? */ bool stopping; /* has iothread_stop() been called? */ bool running; /* should iothread_run() continue? */ int thread_id; |