diff options
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/accel.h | 2 | ||||
-rw-r--r-- | include/sysemu/arch_init.h | 1 | ||||
-rw-r--r-- | include/sysemu/balloon.h | 4 | ||||
-rw-r--r-- | include/sysemu/block-backend.h | 88 | ||||
-rw-r--r-- | include/sysemu/bt.h | 4 | ||||
-rw-r--r-- | include/sysemu/char.h | 39 | ||||
-rw-r--r-- | include/sysemu/cpus.h | 13 | ||||
-rw-r--r-- | include/sysemu/device_tree.h | 6 | ||||
-rw-r--r-- | include/sysemu/dma.h | 23 | ||||
-rw-r--r-- | include/sysemu/hostmem.h | 10 | ||||
-rw-r--r-- | include/sysemu/kvm.h | 26 | ||||
-rw-r--r-- | include/sysemu/os-posix.h | 1 | ||||
-rw-r--r-- | include/sysemu/rng-random.h | 4 | ||||
-rw-r--r-- | include/sysemu/sysemu.h | 16 | ||||
-rw-r--r-- | include/sysemu/tpm_backend.h | 4 | ||||
-rw-r--r-- | include/sysemu/tpm_backend_int.h | 8 | ||||
-rw-r--r-- | include/sysemu/xen-mapcache.h | 3 |
17 files changed, 85 insertions, 167 deletions
diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index 15944c152..a74b2faf5 100644 --- a/include/sysemu/accel.h +++ b/include/sysemu/accel.h @@ -56,6 +56,6 @@ typedef struct AccelClass { extern int tcg_tb_size; -void configure_accelerator(MachineState *ms); +int configure_accelerator(MachineState *ms); #endif diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index d690dfabd..c38892fec 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -30,6 +30,7 @@ extern const uint32_t arch_type; void select_soundhw(const char *optarg); void do_acpitable_option(const QemuOpts *opts); void do_smbios_option(QemuOpts *opts); +void cpudef_init(void); void audio_init(void); int kvm_available(void); int xen_available(void); diff --git a/include/sysemu/balloon.h b/include/sysemu/balloon.h index af49e19c7..3f976b49e 100644 --- a/include/sysemu/balloon.h +++ b/include/sysemu/balloon.h @@ -11,8 +11,8 @@ * */ -#ifndef QEMU_BALLOON_H -#define QEMU_BALLOON_H +#ifndef _QEMU_BALLOON_H +#define _QEMU_BALLOON_H #include "qapi-types.h" diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 2da4905d1..c62b6fe96 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -1,7 +1,7 @@ /* * QEMU Block backends * - * Copyright (C) 2014-2016 Red Hat, Inc. + * Copyright (C) 2014 Red Hat, Inc. * * Authors: * Markus Armbruster <armbru@redhat.com>, @@ -14,7 +14,6 @@ #define BLOCK_BACKEND_H #include "qemu/iov.h" -#include "block/throttle-groups.h" /* * TODO Have to include block/block.h for a bunch of block layer @@ -60,25 +59,8 @@ typedef struct BlockDevOps { void (*resize_cb)(void *opaque); } BlockDevOps; -/* This struct is embedded in (the private) BlockBackend struct and contains - * fields that must be public. This is in particular for QLIST_ENTRY() and - * friends so that BlockBackends can be kept in lists outside block-backend.c */ -typedef struct BlockBackendPublic { - /* I/O throttling. - * throttle_state tells us if this BlockBackend has I/O limits configured. - * io_limits_disabled tells us if they are currently being enforced */ - CoQueue throttled_reqs[2]; - unsigned int io_limits_disabled; - - /* The following fields are protected by the ThrottleGroup lock. - * See the ThrottleGroup documentation for details. */ - ThrottleState *throttle_state; - ThrottleTimers throttle_timers; - unsigned pending_reqs[2]; - QLIST_ENTRY(BlockBackendPublic) round_robin; -} BlockBackendPublic; - -BlockBackend *blk_new(void); +BlockBackend *blk_new(Error **errp); +BlockBackend *blk_new_with_bs(Error **errp); BlockBackend *blk_new_open(const char *filename, const char *reference, QDict *options, int flags, Error **errp); int blk_get_refcnt(BlockBackend *blk); @@ -88,16 +70,13 @@ void blk_remove_all_bs(void); const char *blk_name(BlockBackend *blk); BlockBackend *blk_by_name(const char *name); BlockBackend *blk_next(BlockBackend *blk); +BlockDriverState *blk_next_root_bs(BlockDriverState *bs); bool monitor_add_blk(BlockBackend *blk, const char *name, Error **errp); void monitor_remove_blk(BlockBackend *blk); -BlockBackendPublic *blk_get_public(BlockBackend *blk); -BlockBackend *blk_by_public(BlockBackendPublic *public); - BlockDriverState *blk_bs(BlockBackend *blk); void blk_remove_bs(BlockBackend *blk); void blk_insert_bs(BlockBackend *blk, BlockDriverState *bs); -bool bdrv_has_blk(BlockDriverState *bs); void blk_set_allow_write_beyond_eof(BlockBackend *blk, bool allow); void blk_iostatus_enable(BlockBackend *blk); @@ -111,42 +90,40 @@ void blk_attach_dev_nofail(BlockBackend *blk, void *dev); void blk_detach_dev(BlockBackend *blk, void *dev); void *blk_get_attached_dev(BlockBackend *blk); void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque); -int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf, - int count); -int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset, - unsigned int bytes, QEMUIOVector *qiov, - BdrvRequestFlags flags); -int coroutine_fn blk_co_pwritev(BlockBackend *blk, int64_t offset, - unsigned int bytes, QEMUIOVector *qiov, - BdrvRequestFlags flags); -int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags); -BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags, - BlockCompletionFunc *cb, void *opaque); -int blk_make_zero(BlockBackend *blk, BdrvRequestFlags flags); +int blk_read(BlockBackend *blk, int64_t sector_num, uint8_t *buf, + int nb_sectors); +int blk_read_unthrottled(BlockBackend *blk, int64_t sector_num, uint8_t *buf, + int nb_sectors); +int blk_write(BlockBackend *blk, int64_t sector_num, const uint8_t *buf, + int nb_sectors); +int blk_write_zeroes(BlockBackend *blk, int64_t sector_num, + int nb_sectors, BdrvRequestFlags flags); +BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t sector_num, + int nb_sectors, BdrvRequestFlags flags, + BlockCompletionFunc *cb, void *opaque); int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count); -int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count, - BdrvRequestFlags flags); +int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count); int64_t blk_getlength(BlockBackend *blk); void blk_get_geometry(BlockBackend *blk, uint64_t *nb_sectors_ptr); int64_t blk_nb_sectors(BlockBackend *blk); -BlockAIOCB *blk_aio_preadv(BlockBackend *blk, int64_t offset, - QEMUIOVector *qiov, BdrvRequestFlags flags, +BlockAIOCB *blk_aio_readv(BlockBackend *blk, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, + BlockCompletionFunc *cb, void *opaque); +BlockAIOCB *blk_aio_writev(BlockBackend *blk, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, BlockCompletionFunc *cb, void *opaque); -BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_t offset, - QEMUIOVector *qiov, BdrvRequestFlags flags, - BlockCompletionFunc *cb, void *opaque); BlockAIOCB *blk_aio_flush(BlockBackend *blk, BlockCompletionFunc *cb, void *opaque); -BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk, int64_t offset, int count, - BlockCompletionFunc *cb, void *opaque); +BlockAIOCB *blk_aio_discard(BlockBackend *blk, + int64_t sector_num, int nb_sectors, + BlockCompletionFunc *cb, void *opaque); void blk_aio_cancel(BlockAIOCB *acb); void blk_aio_cancel_async(BlockAIOCB *acb); +int blk_aio_multiwrite(BlockBackend *blk, BlockRequest *reqs, int num_reqs); int blk_ioctl(BlockBackend *blk, unsigned long int req, void *buf); BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque); -int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int count); +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); @@ -170,7 +147,7 @@ bool blk_is_available(BlockBackend *blk); void blk_lock_medium(BlockBackend *blk, bool locked); void blk_eject(BlockBackend *blk, bool eject_flag); int blk_get_flags(BlockBackend *blk); -uint32_t blk_get_max_transfer(BlockBackend *blk); +int blk_get_max_transfer_length(BlockBackend *blk); int blk_get_max_iov(BlockBackend *blk); void blk_set_guest_block_size(BlockBackend *blk, int align); void *blk_try_blockalign(BlockBackend *blk, size_t size); @@ -201,12 +178,12 @@ int blk_get_open_flags_from_root_state(BlockBackend *blk); void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk, BlockCompletionFunc *cb, void *opaque); -int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags); +int coroutine_fn blk_co_write_zeroes(BlockBackend *blk, int64_t sector_num, + int nb_sectors, BdrvRequestFlags flags); int blk_write_compressed(BlockBackend *blk, int64_t sector_num, const uint8_t *buf, int nb_sectors); int blk_truncate(BlockBackend *blk, int64_t offset); -int blk_pdiscard(BlockBackend *blk, int64_t offset, int count); +int blk_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors); int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, int64_t pos, int size); int blk_load_vmstate(BlockBackend *blk, uint8_t *buf, int64_t pos, int size); @@ -216,9 +193,4 @@ BlockAIOCB *blk_abort_aio_request(BlockBackend *blk, BlockCompletionFunc *cb, void *opaque, int ret); -void blk_set_io_limits(BlockBackend *blk, ThrottleConfig *cfg); -void blk_io_limits_disable(BlockBackend *blk); -void blk_io_limits_enable(BlockBackend *blk, const char *group); -void blk_io_limits_update_group(BlockBackend *blk, const char *group); - #endif diff --git a/include/sysemu/bt.h b/include/sysemu/bt.h index ddb05cd10..2bc6d53cc 100644 --- a/include/sysemu/bt.h +++ b/include/sysemu/bt.h @@ -1,5 +1,5 @@ -#ifndef SYSEMU_BT_H -#define SYSEMU_BT_H +#ifndef BT_HOST_H +#define BT_HOST_H /* BT HCI info */ diff --git a/include/sysemu/char.h b/include/sysemu/char.h index ee7e55468..307fd8fde 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -70,13 +70,11 @@ struct CharDriverState { int (*get_msgfds)(struct CharDriverState *s, int* fds, int num); int (*set_msgfds)(struct CharDriverState *s, int *fds, int num); int (*chr_add_client)(struct CharDriverState *chr, int fd); - int (*chr_wait_connected)(struct CharDriverState *chr, Error **errp); IOEventHandler *chr_event; IOCanReadHandler *chr_can_read; IOReadHandler *chr_read; void *handler_opaque; void (*chr_close)(struct CharDriverState *chr); - void (*chr_disconnect)(struct CharDriverState *chr); void (*chr_accept_input)(struct CharDriverState *chr); void (*chr_set_echo)(struct CharDriverState *chr, bool echo); void (*chr_set_fe_open)(struct CharDriverState *chr, int fe_open); @@ -145,26 +143,6 @@ void qemu_chr_parse_common(QemuOpts *opts, ChardevCommon *backend); */ CharDriverState *qemu_chr_new(const char *label, const char *filename, void (*init)(struct CharDriverState *s)); -/** - * @qemu_chr_disconnect: - * - * Close a fd accpeted by character backend. - */ -void qemu_chr_disconnect(CharDriverState *chr); - -/** - * @qemu_chr_cleanup: - * - * Delete all chardevs (when leaving qemu) - */ -void qemu_chr_cleanup(void); - -/** - * @qemu_chr_wait_connected: - * - * Wait for characted backend to be connected. - */ -int qemu_chr_wait_connected(CharDriverState *chr, Error **errp); /** * @qemu_chr_new_noreplay: @@ -236,20 +214,8 @@ void qemu_chr_fe_event(CharDriverState *s, int event); void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...) GCC_FMT_ATTR(2, 3); -/** - * @qemu_chr_fe_add_watch: - * - * If the backend is connected, create and add a #GSource that fires - * when the given condition (typically G_IO_OUT|G_IO_HUP or G_IO_HUP) - * is active; return the #GSource's tag. If it is disconnected, - * return 0. - * - * @cond the condition to poll for - * @func the function to call when the condition happens - * @user_data the opaque pointer to pass to @func - */ -guint qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond, - GIOFunc func, void *user_data); +int qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond, + GIOFunc func, void *user_data); /** * @qemu_chr_fe_write: @@ -437,6 +403,7 @@ void register_char_driver(const char *name, ChardevBackendKind kind, extern int term_escape_char; +CharDriverState *qemu_char_get_next_serial(void); /* console.c */ typedef CharDriverState *(VcHandler)(ChardevVC *vc, Error **errp); diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h index fe992a894..3d1e5ba1e 100644 --- a/include/sysemu/cpus.h +++ b/include/sysemu/cpus.h @@ -7,19 +7,6 @@ void qemu_init_cpu_loop(void); void resume_all_vcpus(void); void pause_all_vcpus(void); void cpu_stop_current(void); -void cpu_ticks_init(void); - -void configure_icount(QemuOpts *opts, Error **errp); -extern int use_icount; -extern int icount_align_option; - -/* drift information for info jit command */ -extern int64_t max_delay; -extern int64_t max_advance; -void dump_drift_info(FILE *f, fprintf_function cpu_fprintf); - -/* Unblock cpu */ -void qemu_cpu_kick_self(void); void cpu_synchronize_all_states(void); void cpu_synchronize_all_post_reset(void); diff --git a/include/sysemu/device_tree.h b/include/sysemu/device_tree.h index e22e5bec9..705650aad 100644 --- a/include/sysemu/device_tree.h +++ b/include/sysemu/device_tree.h @@ -11,8 +11,8 @@ * */ -#ifndef DEVICE_TREE_H -#define DEVICE_TREE_H +#ifndef __DEVICE_TREE_H__ +#define __DEVICE_TREE_H__ void *create_device_tree(int *sizep); void *load_device_tree(const char *filename_path, int *sizep); @@ -168,4 +168,4 @@ int qemu_fdt_setprop_sized_cells_from_array(void *fdt, #define FDT_PCI_RANGE_IOPORT 0x01000000 #define FDT_PCI_RANGE_CONFIG 0x00000000 -#endif /* DEVICE_TREE_H */ +#endif /* __DEVICE_TREE_H__ */ diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index 34c8eaf64..b0fbb9bb3 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -15,6 +15,7 @@ #include "hw/hw.h" #include "block/block.h" #include "block/accounting.h" +#include "sysemu/kvm.h" typedef struct ScatterGatherEntry ScatterGatherEntry; @@ -66,7 +67,9 @@ static inline void dma_barrier(AddressSpace *as, DMADirection dir) * use lighter barriers based on the direction of the * transfer, the DMA context, etc... */ - smp_mb(); + if (kvm_enabled()) { + smp_mb(); + } } /* Checks that the given range of addresses is valid for DMA. This is @@ -194,19 +197,19 @@ void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len); void qemu_sglist_destroy(QEMUSGList *qsg); #endif -typedef BlockAIOCB *DMAIOFunc(int64_t offset, QEMUIOVector *iov, - BlockCompletionFunc *cb, void *cb_opaque, - void *opaque); +typedef BlockAIOCB *DMAIOFunc(BlockBackend *blk, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, + BlockCompletionFunc *cb, void *opaque); -BlockAIOCB *dma_blk_io(AioContext *ctx, - QEMUSGList *sg, uint64_t offset, - DMAIOFunc *io_func, void *io_func_opaque, - BlockCompletionFunc *cb, void *opaque, DMADirection dir); +BlockAIOCB *dma_blk_io(BlockBackend *blk, + QEMUSGList *sg, uint64_t sector_num, + DMAIOFunc *io_func, BlockCompletionFunc *cb, + void *opaque, DMADirection dir); BlockAIOCB *dma_blk_read(BlockBackend *blk, - QEMUSGList *sg, uint64_t offset, + QEMUSGList *sg, uint64_t sector, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *dma_blk_write(BlockBackend *blk, - QEMUSGList *sg, uint64_t offset, + QEMUSGList *sg, uint64_t sector, BlockCompletionFunc *cb, void *opaque); uint64_t dma_buf_read(uint8_t *ptr, int32_t len, QEMUSGList *sg); uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg); diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index 678232af4..a19801d20 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -9,9 +9,8 @@ * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ - -#ifndef SYSEMU_HOSTMEM_H -#define SYSEMU_HOSTMEM_H +#ifndef QEMU_RAM_H +#define QEMU_RAM_H #include "sysemu/sysemu.h" /* for MAX_NODES */ #include "qom/object.h" @@ -45,6 +44,7 @@ struct HostMemoryBackendClass { * * @parent: opaque parent object container * @size: amount of memory backend provides + * @id: unique identification string in memdev namespace * @mr: MemoryRegion representing host memory belonging to backend */ struct HostMemoryBackend { @@ -54,7 +54,7 @@ struct HostMemoryBackend { /* protected */ uint64_t size; bool merge, dump; - bool prealloc, force_prealloc, is_mapped; + bool prealloc, force_prealloc; DECLARE_BITMAP(host_nodes, MAX_NODES + 1); HostMemPolicy policy; @@ -64,6 +64,4 @@ struct HostMemoryBackend { MemoryRegion *host_memory_backend_get_memory(HostMemoryBackend *backend, Error **errp); -void host_memory_backend_set_mapped(HostMemoryBackend *backend, bool mapped); -bool host_memory_backend_is_mapped(HostMemoryBackend *backend); #endif diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index c9c243631..0e18f15c9 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -216,10 +216,8 @@ int kvm_has_intx_set_mask(void); int kvm_init_vcpu(CPUState *cpu); int kvm_cpu_exec(CPUState *cpu); -int kvm_destroy_vcpu(CPUState *cpu); #ifdef NEED_CPU_H -#include "cpu.h" void kvm_setup_guest_memory(void *start, size_t size); void kvm_flush_coalesced_mmio_buffer(void); @@ -346,8 +344,6 @@ int kvm_arch_init(MachineState *ms, KVMState *s); int kvm_arch_init_vcpu(CPUState *cpu); -bool kvm_vcpu_id_is_valid(int vcpu_id); - /* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */ unsigned long kvm_arch_vcpu_id(CPUState *cpu); @@ -359,18 +355,13 @@ void kvm_arch_init_irq_routing(KVMState *s); int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route, uint64_t address, uint32_t data, PCIDevice *dev); -/* Notify arch about newly added MSI routes */ -int kvm_arch_add_msi_route_post(struct kvm_irq_routing_entry *route, - int vector, PCIDevice *dev); -/* Notify arch about released MSI routes */ -int kvm_arch_release_virq_post(int virq); - int kvm_arch_msi_data_to_gsi(uint32_t data); int kvm_set_irq(KVMState *s, int irq, int level); int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg); void kvm_irqchip_add_irq_route(KVMState *s, int gsi, int irqchip, int pin); +void kvm_irqchip_commit_routes(KVMState *s); void kvm_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic); @@ -479,21 +470,9 @@ static inline void cpu_synchronize_post_init(CPUState *cpu) } } -/** - * kvm_irqchip_add_msi_route - Add MSI route for specific vector - * @s: KVM state - * @vector: which vector to add. This can be either MSI/MSIX - * vector. The function will automatically detect whether - * MSI/MSIX is enabled, and fetch corresponding MSI - * message. - * @dev: Owner PCI device to add the route. If @dev is specified - * as @NULL, an empty MSI message will be inited. - * @return: virq (>=0) when success, errno (<0) when failed. - */ -int kvm_irqchip_add_msi_route(KVMState *s, int vector, PCIDevice *dev); +int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg, PCIDevice *dev); int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg, PCIDevice *dev); -void kvm_irqchip_commit_routes(KVMState *s); void kvm_irqchip_release_virq(KVMState *s, int virq); int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter); @@ -544,5 +523,4 @@ int kvm_set_one_reg(CPUState *cs, uint64_t id, void *source); * Returns: 0 on success, or a negative errno on failure. */ int kvm_get_one_reg(CPUState *cs, uint64_t id, void *target); -int kvm_get_max_memslots(void); #endif diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h index 9c7dfdfbe..07e3e5ae9 100644 --- a/include/sysemu/os-posix.h +++ b/include/sysemu/os-posix.h @@ -26,7 +26,6 @@ #ifndef QEMU_OS_POSIX_H #define QEMU_OS_POSIX_H -#include <sys/mman.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> diff --git a/include/sysemu/rng-random.h b/include/sysemu/rng-random.h index 38186fe83..4332772a2 100644 --- a/include/sysemu/rng-random.h +++ b/include/sysemu/rng-random.h @@ -15,8 +15,8 @@ #include "qom/object.h" #define TYPE_RNG_RANDOM "rng-random" -#define RNG_RANDOM(obj) OBJECT_CHECK(RngRandom, (obj), TYPE_RNG_RANDOM) +#define RNG_RANDOM(obj) OBJECT_CHECK(RndRandom, (obj), TYPE_RNG_RANDOM) -typedef struct RngRandom RngRandom; +typedef struct RndRandom RndRandom; #endif diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index ee7c7608e..38fb3cad3 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -75,7 +75,6 @@ void qemu_add_exit_notifier(Notifier *notify); void qemu_remove_exit_notifier(Notifier *notify); void qemu_add_machine_init_done_notifier(Notifier *notify); -void qemu_remove_machine_init_done_notifier(Notifier *notify); void hmp_savevm(Monitor *mon, const QDict *qdict); int load_vmstate(const char *name); @@ -120,7 +119,7 @@ void qemu_savevm_command_send(QEMUFile *f, enum qemu_vm_cmd command, uint16_t len, uint8_t *data); void qemu_savevm_send_ping(QEMUFile *f, uint32_t value); void qemu_savevm_send_open_return_path(QEMUFile *f); -int qemu_savevm_send_packaged(QEMUFile *f, const uint8_t *buf, size_t len); +int qemu_savevm_send_packaged(QEMUFile *f, const QEMUSizedBuffer *qsb); void qemu_savevm_send_postcopy_advise(QEMUFile *f); void qemu_savevm_send_postcopy_listen(QEMUFile *f); void qemu_savevm_send_postcopy_run(QEMUFile *f); @@ -132,12 +131,21 @@ void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, const char *name, int qemu_loadvm_state(QEMUFile *f); +typedef enum DisplayType +{ + DT_DEFAULT, + DT_CURSES, + DT_SDL, + DT_GTK, + DT_NOGRAPHIC, + DT_NONE, +} DisplayType; + extern int autostart; typedef enum { VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL, VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO, - VGA_TYPE_MAX, } VGAInterfaceType; extern int vga_interface_type; @@ -146,6 +154,7 @@ extern int vga_interface_type; extern int graphic_width; extern int graphic_height; extern int graphic_depth; +extern DisplayType display_type; extern int display_opengl; extern const char *keyboard_layout; extern int win2k_install_hack; @@ -234,6 +243,7 @@ void qemu_boot_set(const char *boot_order, Error **errp); QemuOpts *qemu_get_machine_opts(void); bool defaults_enabled(void); +bool usb_enabled(void); extern QemuOptsList qemu_legacy_drive_opts; extern QemuOptsList qemu_common_drive_opts; diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h index b58f52d39..e3ec80020 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -10,8 +10,8 @@ * See the COPYING file in the top-level directory. */ -#ifndef TPM_BACKEND_H -#define TPM_BACKEND_H +#ifndef _QEMU_TPM_H +#define _QEMU_TPM_H #include "qom/object.h" #include "qemu-common.h" diff --git a/include/sysemu/tpm_backend_int.h b/include/sysemu/tpm_backend_int.h index 00639dd7d..40f693a0c 100644 --- a/include/sysemu/tpm_backend_int.h +++ b/include/sysemu/tpm_backend_int.h @@ -19,8 +19,10 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/> */ -#ifndef TPM_BACKEND_INT_H -#define TPM_BACKEND_INT_H +#ifndef TPM_TPM_BACKEND_H +#define TPM_TPM_BACKEND_H + +#include <glib.h> typedef struct TPMBackendThread { GThreadPool *pool; @@ -38,4 +40,4 @@ typedef enum TPMBackendCmd { TPM_BACKEND_CMD_TPM_RESET, } TPMBackendCmd; -#endif /* TPM_BACKEND_INT_H */ +#endif /* TPM_TPM_BACKEND_H */ diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h index b8c93b9bc..c849489fb 100644 --- a/include/sysemu/xen-mapcache.h +++ b/include/sysemu/xen-mapcache.h @@ -9,6 +9,7 @@ #ifndef XEN_MAPCACHE_H #define XEN_MAPCACHE_H + typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr start_addr, ram_addr_t size, void *opaque); @@ -51,4 +52,4 @@ static inline void xen_invalidate_map_cache(void) #endif -#endif /* XEN_MAPCACHE_H */ +#endif /* !XEN_MAPCACHE_H */ |