#endif
#include "config.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/bitops.h"
#include "qemu/bitmap.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
#include "audio/audio.h"
#include "hw/pc.h"
#include "hw/pci/pci.h"
#include "hw/audiodev.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "migration/migration.h"
#include "exec/gdbstub.h"
#include "hw/smbios.h"
+++ /dev/null
-#ifndef QEMU_ARCH_INIT_H
-#define QEMU_ARCH_INIT_H
-
-#include "qmp-commands.h"
-
-enum {
- QEMU_ARCH_ALL = -1,
- QEMU_ARCH_ALPHA = 1,
- QEMU_ARCH_ARM = 2,
- QEMU_ARCH_CRIS = 4,
- QEMU_ARCH_I386 = 8,
- QEMU_ARCH_M68K = 16,
- QEMU_ARCH_LM32 = 32,
- QEMU_ARCH_MICROBLAZE = 64,
- QEMU_ARCH_MIPS = 128,
- QEMU_ARCH_PPC = 256,
- QEMU_ARCH_S390X = 512,
- QEMU_ARCH_SH4 = 1024,
- QEMU_ARCH_SPARC = 2048,
- QEMU_ARCH_XTENSA = 4096,
- QEMU_ARCH_OPENRISC = 8192,
- QEMU_ARCH_UNICORE32 = 0x4000,
-};
-
-extern const uint32_t arch_type;
-
-void select_soundhw(const char *optarg);
-void do_acpitable_option(const char *optarg);
-void do_smbios_option(const char *optarg);
-void cpudef_init(void);
-int audio_available(void);
-void audio_init(ISABus *isa_bus, PCIBus *pci_bus);
-int tcg_available(void);
-int kvm_available(void);
-int xen_available(void);
-
-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp);
-
-#endif
#include "audio.h"
#include "monitor/monitor.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define AUDIO_CAP "audio"
#include "audio_int.h"
/* public domain */
#include "qemu-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "audio.h"
#define AUDIO_CAP "winwave"
#include "monitor/monitor.h"
#include "exec/cpu-common.h"
-#include "kvm.h"
-#include "balloon.h"
+#include "sysemu/kvm.h"
+#include "sysemu/balloon.h"
#include "trace.h"
#include "qmp-commands.h"
#include "qapi/qmp/qjson.h"
+++ /dev/null
-/*
- * Balloon
- *
- * Copyright IBM, Corp. 2008
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2. See
- * the COPYING file in the top-level directory.
- *
- */
-
-#ifndef _QEMU_BALLOON_H
-#define _QEMU_BALLOON_H
-
-#include "monitor/monitor.h"
-#include "qapi-types.h"
-
-typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target);
-typedef void (QEMUBalloonStatus)(void *opaque, BalloonInfo *info);
-
-int qemu_add_balloon_handler(QEMUBalloonEvent *event_func,
- QEMUBalloonStatus *stat_func, void *opaque);
-void qemu_remove_balloon_handler(void *opaque);
-
-void qemu_balloon_changed(int64_t actual);
-
-#endif
#include "qemu/timer.h"
#include "migration/block.h"
#include "migration/migration.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include <assert.h>
#define BLOCK_SIZE (BDRV_SECTORS_PER_DIRTY_CHUNK << BDRV_SECTOR_BITS)
#include "block/blockjob.h"
#include "qemu/module.h"
#include "qapi/qmp/qjson.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/notify.h"
#include "block/coroutine.h"
#include "qmp-commands.h"
#include <uuid/uuid.h>
#else
/* TODO: move uuid emulation to some central place in QEMU. */
-#include "sysemu.h" /* UUID_FMT */
+#include "sysemu/sysemu.h" /* UUID_FMT */
typedef unsigned char uuid_t[16];
#endif
* later. See the COPYING file in the top-level directory.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
#include "monitor/monitor.h"
#include "qapi/qmp/qerror.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qmp-commands.h"
#include "trace.h"
#include "block/nbd.h"
* later. See the COPYING file in the top-level directory.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
#include "block/blockjob.h"
#include "monitor/monitor.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/qmp/types.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "block/block_int.h"
#include "qmp-commands.h"
#include "trace.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
static QTAILQ_HEAD(drivelist, DriveInfo) drives = QTAILQ_HEAD_INITIALIZER(drives);
+++ /dev/null
-/*
- * QEMU host block devices
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- *
- * 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 BLOCKDEV_H
-#define BLOCKDEV_H
-
-#include "block/block.h"
-#include "qapi/error.h"
-#include "qemu/queue.h"
-
-void blockdev_mark_auto_del(BlockDriverState *bs);
-void blockdev_auto_del(BlockDriverState *bs);
-
-typedef enum {
- IF_DEFAULT = -1, /* for use with drive_add() only */
- /*
- * IF_IDE must be zero, because we want QEMUMachine member
- * block_default_type to default-initialize to IF_IDE
- */
- IF_IDE = 0,
- IF_NONE,
- IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
- IF_COUNT
-} BlockInterfaceType;
-
-struct DriveInfo {
- BlockDriverState *bdrv;
- char *id;
- const char *devaddr;
- BlockInterfaceType type;
- int bus;
- int unit;
- int auto_del; /* see blockdev_mark_auto_del() */
- int media_cd;
- int cyls, heads, secs, trans;
- QemuOpts *opts;
- const char *serial;
- QTAILQ_ENTRY(DriveInfo) next;
- int refcount;
-};
-
-DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
-DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
-int drive_get_max_bus(BlockInterfaceType type);
-DriveInfo *drive_get_next(BlockInterfaceType type);
-void drive_get_ref(DriveInfo *dinfo);
-void drive_put_ref(DriveInfo *dinfo);
-DriveInfo *drive_get_by_blockdev(BlockDriverState *bs);
-
-QemuOpts *drive_def(const char *optstr);
-QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
- const char *optstr);
-DriveInfo *drive_init(QemuOpts *arg, BlockInterfaceType block_default_type);
-
-/* device-hotplug */
-
-DriveInfo *add_init_drive(const char *opts);
-
-void qmp_change_blockdev(const char *device, const char *filename,
- bool has_format, const char *format, Error **errp);
-void do_commit(Monitor *mon, const QDict *qdict);
-int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
-#endif
#include "disas/disas.h"
#include "tcg.h"
#include "qemu/atomic.h"
-#include "qtest.h"
+#include "sysemu/qtest.h"
int tb_invalidated_flag;
#include "config-host.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/gdbstub.h"
-#include "dma.h"
-#include "kvm.h"
+#include "sysemu/dma.h"
+#include "sysemu/kvm.h"
#include "qmp-commands.h"
#include "qemu/thread.h"
-#include "cpus.h"
-#include "qtest.h"
+#include "sysemu/cpus.h"
+#include "sysemu/qtest.h"
#include "qemu/main-loop.h"
#include "qemu/bitmap.h"
+++ /dev/null
-#ifndef QEMU_CPUS_H
-#define QEMU_CPUS_H
-
-/* cpus.c */
-void qemu_init_cpu_loop(void);
-void resume_all_vcpus(void);
-void pause_all_vcpus(void);
-void cpu_stop_current(void);
-
-void cpu_synchronize_all_states(void);
-void cpu_synchronize_all_post_reset(void);
-void cpu_synchronize_all_post_init(void);
-
-void qtest_clock_warp(int64_t dest);
-
-/* vl.c */
-extern int smp_cores;
-extern int smp_threads;
-void set_numa_modes(void);
-void set_cpu_log(const char *optarg);
-void set_cpu_log_filename(const char *optarg);
-void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
-
-#endif
#include "config.h"
#include "qemu-common.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "hw/loader.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
+++ /dev/null
-/*
- * Header with function prototypes to help device tree manipulation using
- * libfdt. It also provides functions to read entries from device tree proc
- * interface.
- *
- * Copyright 2008 IBM Corporation.
- * Authors: Jerone Young <jyoung5@us.ibm.com>
- * Hollis Blanchard <hollisb@us.ibm.com>
- *
- * This work is licensed under the GNU GPL license version 2 or later.
- *
- */
-
-#ifndef __DEVICE_TREE_H__
-#define __DEVICE_TREE_H__
-
-void *create_device_tree(int *sizep);
-void *load_device_tree(const char *filename_path, int *sizep);
-
-int qemu_devtree_setprop(void *fdt, const char *node_path,
- const char *property, const void *val_array, int size);
-int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
- const char *property, uint32_t val);
-int qemu_devtree_setprop_u64(void *fdt, const char *node_path,
- const char *property, uint64_t val);
-int qemu_devtree_setprop_string(void *fdt, const char *node_path,
- const char *property, const char *string);
-int qemu_devtree_setprop_phandle(void *fdt, const char *node_path,
- const char *property,
- const char *target_node_path);
-const void *qemu_devtree_getprop(void *fdt, const char *node_path,
- const char *property, int *lenp);
-uint32_t qemu_devtree_getprop_cell(void *fdt, const char *node_path,
- const char *property);
-uint32_t qemu_devtree_get_phandle(void *fdt, const char *path);
-uint32_t qemu_devtree_alloc_phandle(void *fdt);
-int qemu_devtree_nop_node(void *fdt, const char *node_path);
-int qemu_devtree_add_subnode(void *fdt, const char *name);
-
-#define qemu_devtree_setprop_cells(fdt, node_path, property, ...) \
- do { \
- uint32_t qdt_tmp[] = { __VA_ARGS__ }; \
- int i; \
- \
- for (i = 0; i < ARRAY_SIZE(qdt_tmp); i++) { \
- qdt_tmp[i] = cpu_to_be32(qdt_tmp[i]); \
- } \
- qemu_devtree_setprop(fdt, node_path, property, qdt_tmp, \
- sizeof(qdt_tmp)); \
- } while (0)
-
-void qemu_devtree_dumpdtb(void *fdt, int size);
-
-#endif /* __DEVICE_TREE_H__ */
* (GNU GPL), version 2 or later.
*/
-#include "dma.h"
+#include "sysemu/dma.h"
#include "trace.h"
#include "qemu/range.h"
#include "qemu/thread.h"
+++ /dev/null
-/*
- * DMA helper functions
- *
- * Copyright (c) 2009 Red Hat
- *
- * This work is licensed under the terms of the GNU General Public License
- * (GNU GPL), version 2 or later.
- */
-
-#ifndef DMA_H
-#define DMA_H
-
-#include <stdio.h>
-#include "exec/memory.h"
-#include "hw/hw.h"
-#include "block/block.h"
-#include "kvm.h"
-
-typedef struct DMAContext DMAContext;
-typedef struct ScatterGatherEntry ScatterGatherEntry;
-
-typedef enum {
- DMA_DIRECTION_TO_DEVICE = 0,
- DMA_DIRECTION_FROM_DEVICE = 1,
-} DMADirection;
-
-struct QEMUSGList {
- ScatterGatherEntry *sg;
- int nsg;
- int nalloc;
- size_t size;
- DMAContext *dma;
-};
-
-#ifndef CONFIG_USER_ONLY
-
-/*
- * When an IOMMU is present, bus addresses become distinct from
- * CPU/memory physical addresses and may be a different size. Because
- * the IOVA size depends more on the bus than on the platform, we more
- * or less have to treat these as 64-bit always to cover all (or at
- * least most) cases.
- */
-typedef uint64_t dma_addr_t;
-
-#define DMA_ADDR_BITS 64
-#define DMA_ADDR_FMT "%" PRIx64
-
-typedef int DMATranslateFunc(DMAContext *dma,
- dma_addr_t addr,
- hwaddr *paddr,
- hwaddr *len,
- DMADirection dir);
-typedef void* DMAMapFunc(DMAContext *dma,
- dma_addr_t addr,
- dma_addr_t *len,
- DMADirection dir);
-typedef void DMAUnmapFunc(DMAContext *dma,
- void *buffer,
- dma_addr_t len,
- DMADirection dir,
- dma_addr_t access_len);
-
-struct DMAContext {
- AddressSpace *as;
- DMATranslateFunc *translate;
- DMAMapFunc *map;
- DMAUnmapFunc *unmap;
-};
-
-/* A global DMA context corresponding to the address_space_memory
- * AddressSpace, for sysbus devices which do DMA.
- */
-extern DMAContext dma_context_memory;
-
-static inline void dma_barrier(DMAContext *dma, DMADirection dir)
-{
- /*
- * This is called before DMA read and write operations
- * unless the _relaxed form is used and is responsible
- * for providing some sane ordering of accesses vs
- * concurrently running VCPUs.
- *
- * Users of map(), unmap() or lower level st/ld_*
- * operations are responsible for providing their own
- * ordering via barriers.
- *
- * This primitive implementation does a simple smp_mb()
- * before each operation which provides pretty much full
- * ordering.
- *
- * A smarter implementation can be devised if needed to
- * use lighter barriers based on the direction of the
- * transfer, the DMA context, etc...
- */
- if (kvm_enabled()) {
- smp_mb();
- }
-}
-
-static inline bool dma_has_iommu(DMAContext *dma)
-{
- return dma && dma->translate;
-}
-
-/* Checks that the given range of addresses is valid for DMA. This is
- * useful for certain cases, but usually you should just use
- * dma_memory_{read,write}() and check for errors */
-bool iommu_dma_memory_valid(DMAContext *dma, dma_addr_t addr, dma_addr_t len,
- DMADirection dir);
-static inline bool dma_memory_valid(DMAContext *dma,
- dma_addr_t addr, dma_addr_t len,
- DMADirection dir)
-{
- if (!dma_has_iommu(dma)) {
- return true;
- } else {
- return iommu_dma_memory_valid(dma, addr, len, dir);
- }
-}
-
-int iommu_dma_memory_rw(DMAContext *dma, dma_addr_t addr,
- void *buf, dma_addr_t len, DMADirection dir);
-static inline int dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr,
- void *buf, dma_addr_t len,
- DMADirection dir)
-{
- if (!dma_has_iommu(dma)) {
- /* Fast-path for no IOMMU */
- address_space_rw(dma->as, addr, buf, len, dir == DMA_DIRECTION_FROM_DEVICE);
- return 0;
- } else {
- return iommu_dma_memory_rw(dma, addr, buf, len, dir);
- }
-}
-
-static inline int dma_memory_read_relaxed(DMAContext *dma, dma_addr_t addr,
- void *buf, dma_addr_t len)
-{
- return dma_memory_rw_relaxed(dma, addr, buf, len, DMA_DIRECTION_TO_DEVICE);
-}
-
-static inline int dma_memory_write_relaxed(DMAContext *dma, dma_addr_t addr,
- const void *buf, dma_addr_t len)
-{
- return dma_memory_rw_relaxed(dma, addr, (void *)buf, len,
- DMA_DIRECTION_FROM_DEVICE);
-}
-
-static inline int dma_memory_rw(DMAContext *dma, dma_addr_t addr,
- void *buf, dma_addr_t len,
- DMADirection dir)
-{
- dma_barrier(dma, dir);
-
- return dma_memory_rw_relaxed(dma, addr, buf, len, dir);
-}
-
-static inline int dma_memory_read(DMAContext *dma, dma_addr_t addr,
- void *buf, dma_addr_t len)
-{
- return dma_memory_rw(dma, addr, buf, len, DMA_DIRECTION_TO_DEVICE);
-}
-
-static inline int dma_memory_write(DMAContext *dma, dma_addr_t addr,
- const void *buf, dma_addr_t len)
-{
- return dma_memory_rw(dma, addr, (void *)buf, len,
- DMA_DIRECTION_FROM_DEVICE);
-}
-
-int iommu_dma_memory_set(DMAContext *dma, dma_addr_t addr, uint8_t c,
- dma_addr_t len);
-
-int dma_memory_set(DMAContext *dma, dma_addr_t addr, uint8_t c, dma_addr_t len);
-
-void *iommu_dma_memory_map(DMAContext *dma,
- dma_addr_t addr, dma_addr_t *len,
- DMADirection dir);
-static inline void *dma_memory_map(DMAContext *dma,
- dma_addr_t addr, dma_addr_t *len,
- DMADirection dir)
-{
- if (!dma_has_iommu(dma)) {
- hwaddr xlen = *len;
- void *p;
-
- p = address_space_map(dma->as, addr, &xlen, dir == DMA_DIRECTION_FROM_DEVICE);
- *len = xlen;
- return p;
- } else {
- return iommu_dma_memory_map(dma, addr, len, dir);
- }
-}
-
-void iommu_dma_memory_unmap(DMAContext *dma,
- void *buffer, dma_addr_t len,
- DMADirection dir, dma_addr_t access_len);
-static inline void dma_memory_unmap(DMAContext *dma,
- void *buffer, dma_addr_t len,
- DMADirection dir, dma_addr_t access_len)
-{
- if (!dma_has_iommu(dma)) {
- address_space_unmap(dma->as, buffer, (hwaddr)len,
- dir == DMA_DIRECTION_FROM_DEVICE, access_len);
- } else {
- iommu_dma_memory_unmap(dma, buffer, len, dir, access_len);
- }
-}
-
-#define DEFINE_LDST_DMA(_lname, _sname, _bits, _end) \
- static inline uint##_bits##_t ld##_lname##_##_end##_dma(DMAContext *dma, \
- dma_addr_t addr) \
- { \
- uint##_bits##_t val; \
- dma_memory_read(dma, addr, &val, (_bits) / 8); \
- return _end##_bits##_to_cpu(val); \
- } \
- static inline void st##_sname##_##_end##_dma(DMAContext *dma, \
- dma_addr_t addr, \
- uint##_bits##_t val) \
- { \
- val = cpu_to_##_end##_bits(val); \
- dma_memory_write(dma, addr, &val, (_bits) / 8); \
- }
-
-static inline uint8_t ldub_dma(DMAContext *dma, dma_addr_t addr)
-{
- uint8_t val;
-
- dma_memory_read(dma, addr, &val, 1);
- return val;
-}
-
-static inline void stb_dma(DMAContext *dma, dma_addr_t addr, uint8_t val)
-{
- dma_memory_write(dma, addr, &val, 1);
-}
-
-DEFINE_LDST_DMA(uw, w, 16, le);
-DEFINE_LDST_DMA(l, l, 32, le);
-DEFINE_LDST_DMA(q, q, 64, le);
-DEFINE_LDST_DMA(uw, w, 16, be);
-DEFINE_LDST_DMA(l, l, 32, be);
-DEFINE_LDST_DMA(q, q, 64, be);
-
-#undef DEFINE_LDST_DMA
-
-void dma_context_init(DMAContext *dma, AddressSpace *as, DMATranslateFunc translate,
- DMAMapFunc map, DMAUnmapFunc unmap);
-
-struct ScatterGatherEntry {
- dma_addr_t base;
- dma_addr_t len;
-};
-
-void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint, DMAContext *dma);
-void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len);
-void qemu_sglist_destroy(QEMUSGList *qsg);
-#endif
-
-typedef BlockDriverAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t sector_num,
- QEMUIOVector *iov, int nb_sectors,
- BlockDriverCompletionFunc *cb, void *opaque);
-
-BlockDriverAIOCB *dma_bdrv_io(BlockDriverState *bs,
- QEMUSGList *sg, uint64_t sector_num,
- DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,
- void *opaque, DMADirection dir);
-BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,
- QEMUSGList *sg, uint64_t sector,
- BlockDriverCompletionFunc *cb, void *opaque);
-BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs,
- QEMUSGList *sg, uint64_t sector,
- BlockDriverCompletionFunc *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);
-
-void dma_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie,
- QEMUSGList *sg, enum BlockAcctType type);
-
-#endif
*/
#include "qemu-common.h"
-#include "dump.h"
+#include "sysemu/dump.h"
#include "qapi/qmp/qerror.h"
#include "qmp-commands.h"
#include "exec/cpu-all.h"
#include "exec/hwaddr.h"
#include "monitor/monitor.h"
-#include "kvm.h"
-#include "dump.h"
-#include "sysemu.h"
-#include "memory_mapping.h"
+#include "sysemu/kvm.h"
+#include "sysemu/dump.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/memory_mapping.h"
#include "qapi/error.h"
#include "qmp-commands.h"
#include "exec/gdbstub.h"
+++ /dev/null
-/*
- * QEMU dump
- *
- * Copyright Fujitsu, Corp. 2011, 2012
- *
- * Authors:
- * Wen Congyang <wency@cn.fujitsu.com>
- *
- * 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 DUMP_H
-#define DUMP_H
-
-typedef struct ArchDumpInfo {
- int d_machine; /* Architecture */
- int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */
- int d_class; /* ELFCLASS32 or ELFCLASS64 */
-} ArchDumpInfo;
-
-typedef int (*write_core_dump_function)(void *buf, size_t size, void *opaque);
-int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env,
- int cpuid, void *opaque);
-int cpu_write_elf32_note(write_core_dump_function f, CPUArchState *env,
- int cpuid, void *opaque);
-int cpu_write_elf64_qemunote(write_core_dump_function f, CPUArchState *env,
- void *opaque);
-int cpu_write_elf32_qemunote(write_core_dump_function f, CPUArchState *env,
- void *opaque);
-int cpu_get_dump_info(ArchDumpInfo *info);
-ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);
-
-#endif
#include "hw/hw.h"
#include "hw/qdev.h"
#include "qemu/osdep.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "hw/xen.h"
#include "qemu/timer.h"
#include "qemu/config-file.h"
#include "exec/memory.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "exec/address-spaces.h"
#if defined(CONFIG_USER_ONLY)
#include <qemu.h>
#else /* !CONFIG_USER_ONLY */
-#include "xen-mapcache.h"
+#include "sysemu/xen-mapcache.h"
#include "trace.h"
#endif
#else
#include "monitor/monitor.h"
#include "qemu-char.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/gdbstub.h"
#endif
#include "cpu.h"
#include "qemu/sockets.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#ifndef TARGET_CPU_MEMORY_RW_DEBUG
static inline int target_memory_rw_debug(CPUArchState *env, target_ulong addr,
#include "audiodev.h"
#include "audio/audio.h"
#include "pci/pci.h"
-#include "dma.h"
+#include "sysemu/dma.h"
enum {
AC97_Reset = 0x00,
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw.h"
#include "pc.h"
#include "acpi.h"
#include "pc.h"
#include "pci/pci.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "acpi.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "exec/address-spaces.h"
#include "ich9.h"
#include "pm_smbus.h"
#include "pci/pci.h"
#include "acpi.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/range.h"
#include "exec/ioport.h"
#include "fw_cfg.h"
#include "loader.h"
#include "boards.h"
#include "alpha_sys.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "mc146818rtc.h"
#include "ide.h"
#include "i8254.h"
#include "config.h"
#include "alpha_sys.h"
#include "qemu/log.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* PCI IO reads/writes, to byte-word addressable memory. */
#include "exec/exec-all.h"
#include "hw.h"
#include "devices.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "alpha_sys.h"
#include "exec/address-spaces.h"
#include "pci/pci_bridge.h"
#include "pci/pci_bus.h"
#include "apb_pci.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
/* debug APB */
#include "apic.h"
#include "apic_internal.h"
#include "trace.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
static int apic_irq_delivered;
bool apic_report_tpr_access;
#include "config.h"
#include "hw.h"
#include "arm-misc.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "loader.h"
#include "elf.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "qemu/config-file.h"
#define KERNEL_ARGS_ADDR 0x100
#include "qemu/timer.h"
#include "sysbus.h"
#include "primecell.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define LOCK_VALUE 0xa05f
#include "loader.h"
#include "elf.h"
#include "cris-boot.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define D(x)
* later. See the COPYING file in the top-level directory.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
#include "qemu/error-report.h"
#ifndef HW_BOARDS_H
#define HW_BOARDS_H
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qdev.h"
typedef struct QEMUMachineInitArgs {
#include "pc.h"
#include "mips.h"
#include "pci/pci_host.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
//#define DEBUG_BONITO
#include "qemu-common.h"
#include "irq.h"
#include "devices.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
//#define DEBUG
#include "strongarm.h"
#include "arm-misc.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
static struct arm_boot_info collie_binfo = {
#include "ppc_mac.h"
#include "adb.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* XXX: implement all timer modes */
#include "hw.h"
#include "boards.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qemu/config-file.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
DriveInfo *add_init_drive(const char *optstr)
#include "net/net.h"
#include "net/checksum.h"
#include "loader.h"
-#include "sysemu.h"
-#include "dma.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/dma.h"
#include "e1000_hw.h"
#include "pci/pci.h"
#include "net/net.h"
#include "eeprom93xx.h"
-#include "sysemu.h"
-#include "dma.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/dma.h"
/* QEMU sends frames smaller than 60 bytes to ethernet nics.
* Such frames are rejected by real nics and their emulations.
#include "audiodev.h"
#include "audio/audio.h"
#include "pci/pci.h"
-#include "dma.h"
+#include "sysemu/dma.h"
/* Missing stuff:
SCTRL_P[12](END|ST)INC
#include "hw.h"
#include "exec/address-spaces.h"
#include "qemu-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "etraxfs_dma.h"
* THE SOFTWARE.
*/
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "ptimer.h"
*/
#include "boards.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
#include "arm-misc.h"
#include "loader.h"
#include "hw.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exynos4210.h"
*/
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-char.h"
#include "exynos4210.h"
*
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
#include "net/net.h"
#include "arm-misc.h"
#include "isa.h"
#include "sysbus.h"
#include "qdev-addr.h"
-#include "blockdev.h"
-#include "sysemu.h"
+#include "sysemu/blockdev.h"
+#include "sysemu/sysemu.h"
#include "qemu/log.h"
/********************************************************/
* THE SOFTWARE.
*/
#include "hw.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "isa.h"
#include "fw_cfg.h"
#include "sysbus.h"
#include "flash.h"
#include "devices.h"
#include "boards.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
static const int sector_len = 128 * 1024;
#include "devices.h"
#include "loader.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "sysbus.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define SMP_BOOT_ADDR 0x100
#include <hw/sysbus.h>
#include "monitor/monitor.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "exec/cpu-common.h"
#include "internal.h"
#include <hw/ide/pci.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block/block.h"
-#include "sysemu.h"
-#include "dma.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include <hw/isa.h>
#include "qemu/error-report.h"
#include "qemu/timer.h"
-#include "sysemu.h"
-#include "dma.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/dma.h"
#include "hw/block-common.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include <hw/ide/internal.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include <hw/ide/ahci.h>
#include <hw/ide.h>
#include <hw/isa.h>
#include "exec/iorange.h"
-#include "dma.h"
-#include "sysemu.h"
+#include "sysemu/dma.h"
+#include "sysemu/sysemu.h"
#include "hw/block-common.h"
#include "hw/scsi-defs.h"
#include <hw/pc.h>
#include <hw/isa.h>
#include "block/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include <hw/ppc_mac.h>
#include <hw/mac_dbdma.h>
#include "block/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include <hw/pc.h>
#include <hw/pcmcia.h>
#include "block/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include <hw/ide/internal.h>
*/
#include <hw/hw.h>
#include "block/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include <hw/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa.h>
-#include "blockdev.h"
-#include "sysemu.h"
-#include "dma.h"
+#include "sysemu/blockdev.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/dma.h"
#include <hw/ide/pci.h>
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include <hw/hw.h>
-#include "dma.h"
+#include "sysemu/dma.h"
#include "qemu/error-report.h"
#include <hw/ide/internal.h>
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* --------------------------------- */
#include <hw/pci/pci.h>
#include <hw/isa.h>
#include "block/block.h"
-#include "sysemu.h"
-#include "dma.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include "hw.h"
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "imx.h"
#define CKIH_FREQ 26000000 /* 26MHz crystal input */
#include "hw.h"
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-char.h"
#include "imx.h"
#include "arm-misc.h"
#include "net/net.h"
#include "exec/address-spaces.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
typedef struct {
SysBusDevice busdev;
#include "audiodev.h"
#include "intel-hda.h"
#include "intel-hda-defs.h"
-#include "dma.h"
+#include "sysemu/dma.h"
/* --------------------------------------------------------------------- */
/* hda bus */
#include "hw.h"
#include "monitor/monitor.h"
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "isa.h"
#include "exec/address-spaces.h"
#include "pc.h"
#include "pci/pci.h"
#include "pci/msix.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "migration/migration.h"
#include "qapi/qmp/qerror.h"
#include "qemu/event_notifier.h"
*/
#include "hw/apic_internal.h"
#include "hw/pci/msi.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
static inline void kvm_apic_set_reg(struct kvm_lapic_state *kapic,
int reg_id, uint32_t val)
*/
#include "qemu-common.h"
-#include "sysemu.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/kvm.h"
#include "hw/sysbus.h"
#include "hw/kvm/clock.h"
* THE SOFTWARE.
*/
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw/i8254.h"
#include "hw/i8254_internal.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#define KVM_PIT_REINJECT_BIT 0
*/
#include "hw/i8259_internal.h"
#include "hw/apic_internal.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
static void kvm_pic_get(PICCommonState *s)
{
#include "hw/pc.h"
#include "hw/ioapic_internal.h"
#include "hw/apic_internal.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
/* PC Utility function */
void kvm_pc_setup_irq_routing(bool pci_enabled)
#include "hw/loader.h"
#include "monitor/monitor.h"
#include "qemu/range.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
#include "kvm_i386.h"
* (at your option) any later version. See the COPYING file in the
* top-level directory.
*/
-#include "sysemu.h"
-#include "cpus.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/cpus.h"
+#include "sysemu/kvm.h"
#include "apic_internal.h"
#define APIC_DEFAULT_ADDRESS 0xfee00000
#include "arm-misc.h"
#include "devices.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "serial.h"
#include "imx.h"
#include "sysbus.h"
#include "net/net.h"
#include "devices.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "ptimer.h"
/* For crc32 */
#include <zlib.h>
#include "qemu/timer.h"
#include "ptimer.h"
#include "qemu-char.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "loader.h"
#include "elf.h"
#include "devices.h"
#include "boards.h"
#include "loader.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "elf.h"
#include "lm32_hwsetup.h"
#include "lm32.h"
#include "trace.h"
#include "qemu/log.h"
#include "qemu/error-report.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/log.h"
enum {
#include "hw.h"
#include "disas/disas.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "uboot_image.h"
#include "loader.h"
#include "fw_cfg.h"
#include "pam.h"
#include "pci/pci_bus.h"
#include "exec/address-spaces.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
static int ich9_lpc_sci_irq(ICH9LPCState *lpc);
#include "hw.h"
#include "pci/pci.h"
#include "scsi.h"
-#include "dma.h"
+#include "sysemu/dma.h"
//#define DEBUG_LSI
//#define DEBUG_LSI_REG
*/
#include "hw.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "ssi.h"
#include "devices.h"
#include "hw.h"
#include "nvram.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
#include "isa.h"
#include "exec/address-spaces.h"
*/
#include "hw.h"
#include "firmware_abi.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "ppc_mac.h"
/* debug NVR */
#include "devices.h"
#include "boards.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "exec/address-spaces.h"
*/
#include "hw.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "mc146818rtc.h"
#include "qapi/visitor.h"
#include "mcf.h"
#include "qemu/timer.h"
#include "ptimer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
/* General purpose timer module. */
#include "mcf.h"
#include "qemu/timer.h"
#include "ptimer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "net/net.h"
#include "boards.h"
#include "loader.h"
#include "hw.h"
#include "pci/pci.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "pci/msix.h"
#include "qemu/iov.h"
#include "scsi.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qemu-common.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "loader.h"
#include "elf.h"
#include "hw.h"
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
#include "qemu/error-report.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sd.h"
enum {
#include "hw.h"
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
#include "qemu/timer.h"
#include "ptimer.h"
#include "sysbus.h"
#include "hw.h"
#include "flash.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "devices.h"
#include "boards.h"
#include "loader.h"
#include "elf.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "milkymist-hw.h"
#include "lm32.h"
#include "exec/address-spaces.h"
#include "mips_cpudevs.h"
#include "pci/pci.h"
#include "qemu-char.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "audio/audio.h"
#include "qemu/log.h"
#include "loader.h"
#include "vt82c686.h"
#include "mc146818rtc.h"
#include "i8254.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define DEBUG_FULONG2E_INIT
#include "serial.h"
#include "isa.h"
#include "fdc.h"
-#include "sysemu.h"
-#include "arch_init.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/arch_init.h"
#include "boards.h"
#include "net/net.h"
#include "esp.h"
#include "mc146818rtc.h"
#include "i8254.h"
#include "pcspk.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "exec/address-spaces.h"
#include "mips_cpudevs.h"
#include "pci/pci.h"
#include "qemu-char.h"
-#include "sysemu.h"
-#include "arch_init.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/arch_init.h"
#include "boards.h"
#include "qemu/log.h"
#include "mips-bios.h"
#include "elf.h"
#include "mc146818rtc.h"
#include "i8254.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "sysbus.h" /* SysBusDevice */
#include "serial.h"
#include "isa.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "mips-bios.h"
#include "loader.h"
#include "serial.h"
#include "isa.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "flash.h"
#include "qemu/log.h"
#include "elf.h"
#include "mc146818rtc.h"
#include "i8254.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define MAX_IDE_BUS 2
*/
#include "hw.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
#define MPC8544_GUTS_MMIO_SIZE 0x1000
#include "multiboot.h"
#include "loader.h"
#include "elf.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* Show multiboot debug output */
//#define DEBUG_MULTIBOOT
#include "arm-misc.h"
#include "devices.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "serial.h"
#include "qemu/timer.h"
#include "flash.h"
#include "ui/console.h"
#include "i2c.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "ui/pixel_ops.h"
# include "hw.h"
# include "flash.h"
-# include "blockdev.h"
+# include "sysemu/blockdev.h"
# include "sysbus.h"
#include "qemu/error-report.h"
#include "net/net.h"
#include "ne2000.h"
#include "loader.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* debug NE2000 card */
//#define DEBUG_NE2000
*/
#include "qemu-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "omap.h"
#include "arm-misc.h"
#include "irq.h"
#include "hw.h"
#include "bt.h"
#include "loader.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "exec/address-spaces.h"
#include "hw.h"
#include "arm-misc.h"
#include "omap.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "soc_dma.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qemu/range.h"
#include "sysbus.h"
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw.h"
#include "arm-misc.h"
#include "omap.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "qemu-char.h"
#include "flash.h"
#include "boards.h"
#include "arm-misc.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
/*****************************************************************************/
#include "hw.h"
#include "flash.h"
#include "irq.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "sysbus.h"
#include "hw.h"
#include "sysbus.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
/* RECSMALL is not used because it breaks tap networking in linux:
#include "net/net.h"
#include "loader.h"
#include "exec/address-spaces.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
-#include "qtest.h"
+#include "sysemu/qtest.h"
#define KERNEL_LOAD_ADDR 0x100
*/
#include "hw.h"
#include "audio/audio.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "ui/console.h"
#include "omap.h"
#include "boards.h"
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "pam.h"
void smram_update(MemoryRegion *smram_region, uint8_t smram,
#include "qemu-char.h"
#include "isa.h"
#include "pc.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
//#define DEBUG_PARALLEL
#include "pcspk.h"
#include "pci/msi.h"
#include "sysbus.h"
-#include "sysemu.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/kvm.h"
#include "kvm_i386.h"
#include "xen.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
#include "ui/qemu-spice.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
#include "qemu/bitmap.h"
/* debug PC/ISA interrupts */
#include "net/net.h"
#include "boards.h"
#include "ide.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm/clock.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
-#include "arch_init.h"
-#include "blockdev.h"
+#include "sysemu/arch_init.h"
+#include "sysemu/blockdev.h"
#include "smbus.h"
#include "xen.h"
#include "exec/memory.h"
* THE SOFTWARE.
*/
#include "hw.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
#include "smbus.h"
#include "boards.h"
#include "mc146818rtc.h"
#include "xen.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm/clock.h"
#include "q35.h"
#include "exec/address-spaces.h"
* THE SOFTWARE.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "hw.h"
#include "pc.h"
#include "hw/boards.h"
#include "loader.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "flash.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#define BIOS_FILENAME "bios.bin"
#include "hw/scsi.h"
#include "hw/virtio-blk.h"
#include "qemu/config-file.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qapi/error.h"
#if defined(TARGET_I386)
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "hw/pci/pci.h"
#include "qmp-commands.h"
#include "hw/pci/pci_bus.h"
#include "monitor/monitor.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw/loader.h"
#include "qemu/range.h"
#include "qmp-commands.h"
#include "hw/qdev.h"
#include "exec/memory.h"
-#include "dma.h"
+#include "sysemu/dma.h"
/* PCI includes legacy ISA access. */
#include "hw/isa.h"
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qapi/qmp/types.h"
#include "monitor/monitor.h"
#include "hw/pci/pci_bridge.h"
#include "isa.h"
#include "pc.h"
#include "ps2.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* debug PC keyboard */
//#define DEBUG_KBD
#include "net/net.h"
#include "loader.h"
#include "qemu/timer.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "pcnet.h"
#include "net/net.h"
#include "qemu/timer.h"
#include "qemu/sockets.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "pcnet.h"
#include "hw.h"
#include "net/net.h"
#include "flash.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "devices.h"
#include "boards.h"
#include "xilinx.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "serial.h"
#include "exec/address-spaces.h"
#include "ssi.h"
#include "hw.h"
#include "net/net.h"
#include "flash.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "devices.h"
#include "boards.h"
#include "xilinx.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "microblaze_boot.h"
#include "sysbus.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
//#define DEBUG_PL031
* This code is licensed under the GPL.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "sd.h"
#include "hw.h"
#include "ppc.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "nvram.h"
#include "qemu/log.h"
#include "loader.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
//#define PPC_DEBUG_IRQ
#include "hw/serial.h"
#include "hw/pci/pci.h"
#include "hw/boards.h"
-#include "sysemu.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "hw/openpic.h"
#include "hw/ppc.h"
#include "hw/loader.h"
#include "qemu-common.h"
#include "e500.h"
#include "../boards.h"
-#include "device_tree.h"
-#include "hw/pci.h"
+#include "sysemu/device_tree.h"
+#include "hw/pci/pci.h"
static void e500plat_fixup_devtree(PPCE500Params *params, void *fdt)
{
#include "qemu-common.h"
#include "e500.h"
#include "../boards.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
static void mpc8544ds_fixup_devtree(PPCE500Params *params, void *fdt)
{
#include "ppc405.h"
#include "nvram.h"
#include "flash.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "block/block.h"
#include "boards.h"
#include "qemu/log.h"
#include "loader.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define BIOS_FILENAME "ppc405_rom.bin"
#include "ppc405.h"
#include "serial.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "exec/address-spaces.h"
#include "hw.h"
#include "pci/pci.h"
#include "boards.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "loader.h"
#include "elf.h"
#include "exec/address-spaces.h"
#include "serial.h"
#include "ppc.h"
#include "ppc405.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
#define BINARY_DEVICE_TREE_FILE "bamboo.dtb"
#include "hw.h"
#include "ppc.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "nvram.h"
#include "qemu/log.h"
#include "loader.h"
#include "nvram.h"
#include "pci/pci.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "fw_cfg.h"
#include "escc.h"
#include "ide.h"
#include "loader.h"
#include "elf.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "hw/usb.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "sysbus.h"
#include "adb.h"
#include "mac_dbdma.h"
#include "nvram.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "net/net.h"
#include "isa.h"
#include "pci/pci.h"
#include "ide.h"
#include "loader.h"
#include "elf.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define MAX_IDE_BUS 2
#include "serial.h"
#include "fdc.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "isa.h"
#include "pci/pci.h"
#include "pci/pci_host.h"
#include "ide.h"
#include "loader.h"
#include "mc146818rtc.h"
-#include "blockdev.h"
-#include "arch_init.h"
+#include "sysemu/blockdev.h"
+#include "sysemu/arch_init.h"
#include "exec/address-spaces.h"
//#define HARD_DEBUG_PPC_IO
*/
#include "hw.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#define MAX_CPUS 32
#include "hw.h"
#include "ps2.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
/* debug PC keyboard */
//#define DEBUG_KBD
#include "sysbus.h"
#include "pxa.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "serial.h"
#include "i2c.h"
#include "ssi.h"
#include "qemu-char.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
static struct {
hwaddr io_base;
#include "pxa.h"
#include "ui/pixel_ops.h"
/* FIXME: For graphic_rotate. Should probably be done in common code. */
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "framebuffer.h"
struct DMAChannel {
#include "hw.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "pxa.h"
#include "sysbus.h"
#include "qdev.h"
#include "monitor/monitor.h"
#include "qmp-commands.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
#include "qemu/config-file.h"
/*
#include "net/net.h"
#include "qdev.h"
#include "qapi/qmp/qerror.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
#include "net/hub.h"
#include "qapi/visitor.h"
#include "net/net.h"
#include "qdev.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qemu/timer.h"
#include "qemu/queue.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
#include "qxl.h"
#include "hw.h"
#include "sh.h"
#include "devices.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "pci/pci.h"
#include "net/net.h"
#include "loader.h"
#include "usb.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define FLASH_BASE 0x00000000
#include "devices.h"
#include "pci/pci.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "i2c.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#define SMP_BOOT_ADDR 0xe0000000
#include "hw.h"
#include "pci/pci.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "qemu/timer.h"
#include "net/net.h"
#include "loader.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/iov.h"
/* debug RTL8139 card */
#include "hw.h"
#include "block/block.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "monitor/monitor.h"
#include "loader.h"
#include "hw/virtio-serial.h"
#include "hw/virtio-net.h"
#include "hw/sysbus.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "hw/s390-virtio-bus.h"
#include "hw.h"
#include "block/block.h"
-#include "blockdev.h"
-#include "sysemu.h"
+#include "sysemu/blockdev.h"
+#include "sysemu/sysemu.h"
#include "net/net.h"
#include "boards.h"
#include "monitor/monitor.h"
#include "elf.h"
#include "hw/virtio.h"
#include "hw/sysbus.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "exec/address-spaces.h"
#include "hw/s390-virtio-bus.h"
*/
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sclp.h"
#include "event-facility.h"
*/
#include "cpu.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "exec/memory.h"
#include "sclp.h"
*
*/
#include <hw/qdev.h>
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sclp.h"
#include "event-facility.h"
#include "scsi.h"
#include "scsi-defs.h"
#include "qdev.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "trace.h"
-#include "dma.h"
+#include "sysemu/dma.h"
static char *scsibus_get_dev_path(DeviceState *dev);
static char *scsibus_get_fw_dev_path(DeviceState *dev);
#include "qemu/error-report.h"
#include "scsi.h"
#include "scsi-defs.h"
-#include "sysemu.h"
-#include "blockdev.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#ifdef __linux
#include <scsi/sg.h>
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "scsi.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#ifdef __linux__
#include "qdev.h"
#include "block/block.h"
#include "hw/block-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define MAX_SCSI_DEVS 255
#define HW_SERIAL_H 1
#include "hw.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/memory.h"
#define UART_FIFO_LENGTH 16 /* 16550A Fifo Length */
#include "pci/pci.h"
#include "pc.h"
#include "loader.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define SGABIOS_FILENAME "sgabios.bin"
#include <stdio.h>
#include "hw.h"
#include "sh.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sh7750_regs.h"
#include "sh7750_regnames.h"
#include "sh_intc.h"
*/
#include "hw.h"
#include "sh.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "loader.h"
#include "exec/address-spaces.h"
* THE SOFTWARE.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "sysbus.h"
#include "trace.h"
* GNU GPL, version 2 or (at your option) any later version.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "smbios.h"
#include "loader.h"
#include "pc.h"
#include "pm_smbus.h"
#include "pci/pci.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "i2c.h"
#include "smbus.h"
* THE SOFTWARE.
*
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw.h"
#include "elf.h"
#include "net/net.h"
-#include "blockdev.h"
-#include "cpus.h"
-#include "kvm.h"
+#include "sysemu/blockdev.h"
+#include "sysemu/cpus.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "hw/boards.h"
#include "hw/xics.h"
#include "hw/pci/msi.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "pci/pci.h"
#if !defined(__HW_SPAPR_H__)
#define __HW_SPAPR_H__
-#include "dma.h"
+#include "sysemu/dma.h"
#include "hw/xics.h"
struct VIOsPAPRBus;
*
*/
#include "cpu.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-char.h"
#include "hw/qdev.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "hw/spapr.h"
#include "hw/spapr_vio.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "cpu.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "helper_regs.h"
#include "hw/spapr.h"
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "hw.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qdev.h"
#include "kvm_ppc.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "exec/address-spaces.h"
#include "hw/spapr.h"
#include <sys/mman.h>
#include <libfdt.h>
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "hw/sysbus.h"
#include "hw/spapr.h"
#include "hw/spapr_vio.h"
*
*/
#include "cpu.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-char.h"
#include "hw/qdev.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "hw/spapr.h"
#include "hw/spapr_vio.h"
*/
#include "hw.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "monitor/monitor.h"
#include "loader.h"
#include "elf.h"
#include "hw/sysbus.h"
-#include "kvm.h"
-#include "device_tree.h"
+#include "sysemu/kvm.h"
+#include "sysemu/device_tree.h"
#include "kvm_ppc.h"
#include "hw/spapr.h"
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "dma.h"
+#include "sysemu/dma.h"
#define TYPE_VIO_SPAPR_DEVICE "vio-spapr-device"
#define VIO_SPAPR_DEVICE(obj) \
#include "hw.h"
#include "pxa.h"
#include "arm-misc.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "pcmcia.h"
#include "i2c.h"
#include "ssi.h"
#include "block/block.h"
#include "audio/audio.h"
#include "boards.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "exec/address-spaces.h"
* GNU GPL, version 2 or (at your option) any later version.
*/
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "ssi.h"
#include "sd.h"
#include "qemu/error-report.h"
#include "arm-misc.h"
#include "qemu-char.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "ssi.h"
//#define DEBUG
#include "nvram.h"
#include "sparc32_dma.h"
#include "fdc.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "net/net.h"
#include "boards.h"
#include "firmware_abi.h"
#include "qdev-addr.h"
#include "loader.h"
#include "elf.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "trace.h"
/*
#include "fdc.h"
#include "net/net.h"
#include "qemu/timer.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "firmware_abi.h"
#include "fw_cfg.h"
#include "ide.h"
#include "loader.h"
#include "elf.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
//#define DEBUG_IRQ
#include "flash.h"
#include "ui/console.h"
#include "ui/pixel_ops.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#define IRQ_TC6393_NAND 0
#define IRQ_TC6393_MMC 1
#include "boards.h"
#include "i2c.h"
#include "ssi.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "sysbus.h"
#include "exec/address-spaces.h"
#include "hw.h"
#include "qemu/timer.h"
#include "i2c.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "ui/console.h"
#define VERBOSE 1
#include "hw/hw.h"
#include "hw/usb.h"
#include "hw/qdev.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "trace.h"
#include "net/net.h"
#include "qemu/queue.h"
#include "qemu/config-file.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/iov.h"
/*#define TRAFFIC_DEBUG*/
#include "hw/scsi.h"
#include "ui/console.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
-#include "blockdev.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/blockdev.h"
//#define DEBUG_MSD
#include "hw/usb.h"
#include "monitor/monitor.h"
#include "trace.h"
-#include "dma.h"
-#include "sysemu.h"
+#include "sysemu/dma.h"
+#include "sysemu/sysemu.h"
#ifndef EHCI_DEBUG
#define EHCI_DEBUG 0
#include "hw/pci/pci.h"
#include "qemu/timer.h"
#include "qemu/iov.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "trace.h"
//#define DEBUG
#include "qemu-common.h"
#include "qemu/timer.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
#include <dirent.h>
#include "qemu-common.h"
#include "exec/cpu-common.h"
#include "hw/usb.h"
-#include "dma.h"
+#include "sysemu/dma.h"
int usb_packet_map(USBPacket *p, QEMUSGList *sgl)
{
#include "qemu-common.h"
#include "qemu/timer.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/iov.h"
#include <dirent.h>
#include "arm-misc.h"
#include "devices.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "pci/pci.h"
#include "i2c.h"
#include "boards.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "exec/address-spaces.h"
#include "flash.h"
#include "primecell.h"
#include "devices.h"
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "exec/address-spaces.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "flash.h"
#define VEXPRESS_BOARD_ID 0x8e0
#include "config.h"
#include "qemu/event_notifier.h"
#include "exec/address-spaces.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "exec/memory.h"
#include "pci/msi.h"
#include "pci/msix.h"
#include "hw.h"
#include "serial.h"
#include "flash.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "devices.h"
#include "boards.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#include "loader.h"
#include "elf.h"
#include "qemu/log.h"
#include "ppc4xx.h"
#include "ppc405.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "xilinx.h"
#define EPAPR_MAGIC (0x45504150)
#include "virtio.h"
#include "pc.h"
#include "cpu.h"
-#include "balloon.h"
+#include "sysemu/balloon.h"
#include "virtio-balloon.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "exec/address-spaces.h"
#if defined(__linux__)
#include "qemu/error-report.h"
#include "trace.h"
#include "hw/block-common.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "virtio-blk.h"
#include "scsi-defs.h"
#ifdef __linux__
#include "pci/msi.h"
#include "pci/msix.h"
#include "loader.h"
-#include "kvm.h"
-#include "blockdev.h"
+#include "sysemu/kvm.h"
+#include "sysemu/blockdev.h"
#include "virtio-pci.h"
#include "qemu/range.h"
#include "hw.h"
#include "net/net.h"
#include "qdev.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/event_notifier.h"
#ifdef CONFIG_LINUX
#include "9p.h"
#include "hw.h"
#include "isa.h"
#include "pc.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qdev.h"
//#define VMPORT_DEBUG
#include "apm.h"
#include "acpi.h"
#include "pm_smbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "exec/address-spaces.h"
#include "qemu/queue.h"
#include "qapi/qmp/types.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw/watchdog.h"
/* Possible values for action parameter. */
#define QEMU_HW_XEN_BACKEND_H 1
#include "xen_common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "net/net.h"
/* ------------------------------------------------------------- */
#include "xen_backend.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
/* ------------------------------------------------------------- */
#include "hw.h"
#include "xen_backend.h"
#include "xen_blkif.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
/* ------------------------------------------------------------- */
#include "boards.h"
#include "xen_backend.h"
#include "xen_domainbuild.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
static void xen_init_pv(QEMUMachineInitArgs *args)
{
*/
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "fifo.h"
*/
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "ptimer.h"
#include "qemu/log.h"
#include "fifo.h"
#include "arm-misc.h"
#include "net/net.h"
#include "exec/address-spaces.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "loader.h"
#include "ssi.h"
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "loader.h"
#include "elf.h"
#include "net/net.h"
#include "sysbus.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qemu-char.h"
#include "xtensa_bootparam.h"
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "boards.h"
#include "loader.h"
#include "elf.h"
#include "i2c.h"
#include "ssi.h"
#include "boards.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "flash.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "ui/console.h"
#include "audio/audio.h"
#include "exec/address-spaces.h"
#include "hw.h"
#include "qemu/timer.h"
#include "sysbus.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#ifdef ZYNQ_ARM_SLCR_ERR_DEBUG
#define DB_PRINT(...) do { \
--- /dev/null
+#ifndef QEMU_ARCH_INIT_H
+#define QEMU_ARCH_INIT_H
+
+#include "qmp-commands.h"
+
+enum {
+ QEMU_ARCH_ALL = -1,
+ QEMU_ARCH_ALPHA = 1,
+ QEMU_ARCH_ARM = 2,
+ QEMU_ARCH_CRIS = 4,
+ QEMU_ARCH_I386 = 8,
+ QEMU_ARCH_M68K = 16,
+ QEMU_ARCH_LM32 = 32,
+ QEMU_ARCH_MICROBLAZE = 64,
+ QEMU_ARCH_MIPS = 128,
+ QEMU_ARCH_PPC = 256,
+ QEMU_ARCH_S390X = 512,
+ QEMU_ARCH_SH4 = 1024,
+ QEMU_ARCH_SPARC = 2048,
+ QEMU_ARCH_XTENSA = 4096,
+ QEMU_ARCH_OPENRISC = 8192,
+ QEMU_ARCH_UNICORE32 = 0x4000,
+};
+
+extern const uint32_t arch_type;
+
+void select_soundhw(const char *optarg);
+void do_acpitable_option(const char *optarg);
+void do_smbios_option(const char *optarg);
+void cpudef_init(void);
+int audio_available(void);
+void audio_init(ISABus *isa_bus, PCIBus *pci_bus);
+int tcg_available(void);
+int kvm_available(void);
+int xen_available(void);
+
+CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp);
+
+#endif
--- /dev/null
+/*
+ * Balloon
+ *
+ * Copyright IBM, Corp. 2008
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef _QEMU_BALLOON_H
+#define _QEMU_BALLOON_H
+
+#include "monitor/monitor.h"
+#include "qapi-types.h"
+
+typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target);
+typedef void (QEMUBalloonStatus)(void *opaque, BalloonInfo *info);
+
+int qemu_add_balloon_handler(QEMUBalloonEvent *event_func,
+ QEMUBalloonStatus *stat_func, void *opaque);
+void qemu_remove_balloon_handler(void *opaque);
+
+void qemu_balloon_changed(int64_t actual);
+
+#endif
--- /dev/null
+/*
+ * QEMU host block devices
+ *
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ *
+ * 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 BLOCKDEV_H
+#define BLOCKDEV_H
+
+#include "block/block.h"
+#include "qapi/error.h"
+#include "qemu/queue.h"
+
+void blockdev_mark_auto_del(BlockDriverState *bs);
+void blockdev_auto_del(BlockDriverState *bs);
+
+typedef enum {
+ IF_DEFAULT = -1, /* for use with drive_add() only */
+ /*
+ * IF_IDE must be zero, because we want QEMUMachine member
+ * block_default_type to default-initialize to IF_IDE
+ */
+ IF_IDE = 0,
+ IF_NONE,
+ IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
+ IF_COUNT
+} BlockInterfaceType;
+
+struct DriveInfo {
+ BlockDriverState *bdrv;
+ char *id;
+ const char *devaddr;
+ BlockInterfaceType type;
+ int bus;
+ int unit;
+ int auto_del; /* see blockdev_mark_auto_del() */
+ int media_cd;
+ int cyls, heads, secs, trans;
+ QemuOpts *opts;
+ const char *serial;
+ QTAILQ_ENTRY(DriveInfo) next;
+ int refcount;
+};
+
+DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
+DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
+int drive_get_max_bus(BlockInterfaceType type);
+DriveInfo *drive_get_next(BlockInterfaceType type);
+void drive_get_ref(DriveInfo *dinfo);
+void drive_put_ref(DriveInfo *dinfo);
+DriveInfo *drive_get_by_blockdev(BlockDriverState *bs);
+
+QemuOpts *drive_def(const char *optstr);
+QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
+ const char *optstr);
+DriveInfo *drive_init(QemuOpts *arg, BlockInterfaceType block_default_type);
+
+/* device-hotplug */
+
+DriveInfo *add_init_drive(const char *opts);
+
+void qmp_change_blockdev(const char *device, const char *filename,
+ bool has_format, const char *format, Error **errp);
+void do_commit(Monitor *mon, const QDict *qdict);
+int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
+#endif
--- /dev/null
+#ifndef QEMU_CPUS_H
+#define QEMU_CPUS_H
+
+/* cpus.c */
+void qemu_init_cpu_loop(void);
+void resume_all_vcpus(void);
+void pause_all_vcpus(void);
+void cpu_stop_current(void);
+
+void cpu_synchronize_all_states(void);
+void cpu_synchronize_all_post_reset(void);
+void cpu_synchronize_all_post_init(void);
+
+void qtest_clock_warp(int64_t dest);
+
+/* vl.c */
+extern int smp_cores;
+extern int smp_threads;
+void set_numa_modes(void);
+void set_cpu_log(const char *optarg);
+void set_cpu_log_filename(const char *optarg);
+void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
+
+#endif
--- /dev/null
+/*
+ * Header with function prototypes to help device tree manipulation using
+ * libfdt. It also provides functions to read entries from device tree proc
+ * interface.
+ *
+ * Copyright 2008 IBM Corporation.
+ * Authors: Jerone Young <jyoung5@us.ibm.com>
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the GNU GPL license version 2 or later.
+ *
+ */
+
+#ifndef __DEVICE_TREE_H__
+#define __DEVICE_TREE_H__
+
+void *create_device_tree(int *sizep);
+void *load_device_tree(const char *filename_path, int *sizep);
+
+int qemu_devtree_setprop(void *fdt, const char *node_path,
+ const char *property, const void *val_array, int size);
+int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
+ const char *property, uint32_t val);
+int qemu_devtree_setprop_u64(void *fdt, const char *node_path,
+ const char *property, uint64_t val);
+int qemu_devtree_setprop_string(void *fdt, const char *node_path,
+ const char *property, const char *string);
+int qemu_devtree_setprop_phandle(void *fdt, const char *node_path,
+ const char *property,
+ const char *target_node_path);
+const void *qemu_devtree_getprop(void *fdt, const char *node_path,
+ const char *property, int *lenp);
+uint32_t qemu_devtree_getprop_cell(void *fdt, const char *node_path,
+ const char *property);
+uint32_t qemu_devtree_get_phandle(void *fdt, const char *path);
+uint32_t qemu_devtree_alloc_phandle(void *fdt);
+int qemu_devtree_nop_node(void *fdt, const char *node_path);
+int qemu_devtree_add_subnode(void *fdt, const char *name);
+
+#define qemu_devtree_setprop_cells(fdt, node_path, property, ...) \
+ do { \
+ uint32_t qdt_tmp[] = { __VA_ARGS__ }; \
+ int i; \
+ \
+ for (i = 0; i < ARRAY_SIZE(qdt_tmp); i++) { \
+ qdt_tmp[i] = cpu_to_be32(qdt_tmp[i]); \
+ } \
+ qemu_devtree_setprop(fdt, node_path, property, qdt_tmp, \
+ sizeof(qdt_tmp)); \
+ } while (0)
+
+void qemu_devtree_dumpdtb(void *fdt, int size);
+
+#endif /* __DEVICE_TREE_H__ */
--- /dev/null
+/*
+ * DMA helper functions
+ *
+ * Copyright (c) 2009 Red Hat
+ *
+ * This work is licensed under the terms of the GNU General Public License
+ * (GNU GPL), version 2 or later.
+ */
+
+#ifndef DMA_H
+#define DMA_H
+
+#include <stdio.h>
+#include "exec/memory.h"
+#include "hw/hw.h"
+#include "block/block.h"
+#include "sysemu/kvm.h"
+
+typedef struct DMAContext DMAContext;
+typedef struct ScatterGatherEntry ScatterGatherEntry;
+
+typedef enum {
+ DMA_DIRECTION_TO_DEVICE = 0,
+ DMA_DIRECTION_FROM_DEVICE = 1,
+} DMADirection;
+
+struct QEMUSGList {
+ ScatterGatherEntry *sg;
+ int nsg;
+ int nalloc;
+ size_t size;
+ DMAContext *dma;
+};
+
+#ifndef CONFIG_USER_ONLY
+
+/*
+ * When an IOMMU is present, bus addresses become distinct from
+ * CPU/memory physical addresses and may be a different size. Because
+ * the IOVA size depends more on the bus than on the platform, we more
+ * or less have to treat these as 64-bit always to cover all (or at
+ * least most) cases.
+ */
+typedef uint64_t dma_addr_t;
+
+#define DMA_ADDR_BITS 64
+#define DMA_ADDR_FMT "%" PRIx64
+
+typedef int DMATranslateFunc(DMAContext *dma,
+ dma_addr_t addr,
+ hwaddr *paddr,
+ hwaddr *len,
+ DMADirection dir);
+typedef void* DMAMapFunc(DMAContext *dma,
+ dma_addr_t addr,
+ dma_addr_t *len,
+ DMADirection dir);
+typedef void DMAUnmapFunc(DMAContext *dma,
+ void *buffer,
+ dma_addr_t len,
+ DMADirection dir,
+ dma_addr_t access_len);
+
+struct DMAContext {
+ AddressSpace *as;
+ DMATranslateFunc *translate;
+ DMAMapFunc *map;
+ DMAUnmapFunc *unmap;
+};
+
+/* A global DMA context corresponding to the address_space_memory
+ * AddressSpace, for sysbus devices which do DMA.
+ */
+extern DMAContext dma_context_memory;
+
+static inline void dma_barrier(DMAContext *dma, DMADirection dir)
+{
+ /*
+ * This is called before DMA read and write operations
+ * unless the _relaxed form is used and is responsible
+ * for providing some sane ordering of accesses vs
+ * concurrently running VCPUs.
+ *
+ * Users of map(), unmap() or lower level st/ld_*
+ * operations are responsible for providing their own
+ * ordering via barriers.
+ *
+ * This primitive implementation does a simple smp_mb()
+ * before each operation which provides pretty much full
+ * ordering.
+ *
+ * A smarter implementation can be devised if needed to
+ * use lighter barriers based on the direction of the
+ * transfer, the DMA context, etc...
+ */
+ if (kvm_enabled()) {
+ smp_mb();
+ }
+}
+
+static inline bool dma_has_iommu(DMAContext *dma)
+{
+ return dma && dma->translate;
+}
+
+/* Checks that the given range of addresses is valid for DMA. This is
+ * useful for certain cases, but usually you should just use
+ * dma_memory_{read,write}() and check for errors */
+bool iommu_dma_memory_valid(DMAContext *dma, dma_addr_t addr, dma_addr_t len,
+ DMADirection dir);
+static inline bool dma_memory_valid(DMAContext *dma,
+ dma_addr_t addr, dma_addr_t len,
+ DMADirection dir)
+{
+ if (!dma_has_iommu(dma)) {
+ return true;
+ } else {
+ return iommu_dma_memory_valid(dma, addr, len, dir);
+ }
+}
+
+int iommu_dma_memory_rw(DMAContext *dma, dma_addr_t addr,
+ void *buf, dma_addr_t len, DMADirection dir);
+static inline int dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr,
+ void *buf, dma_addr_t len,
+ DMADirection dir)
+{
+ if (!dma_has_iommu(dma)) {
+ /* Fast-path for no IOMMU */
+ address_space_rw(dma->as, addr, buf, len, dir == DMA_DIRECTION_FROM_DEVICE);
+ return 0;
+ } else {
+ return iommu_dma_memory_rw(dma, addr, buf, len, dir);
+ }
+}
+
+static inline int dma_memory_read_relaxed(DMAContext *dma, dma_addr_t addr,
+ void *buf, dma_addr_t len)
+{
+ return dma_memory_rw_relaxed(dma, addr, buf, len, DMA_DIRECTION_TO_DEVICE);
+}
+
+static inline int dma_memory_write_relaxed(DMAContext *dma, dma_addr_t addr,
+ const void *buf, dma_addr_t len)
+{
+ return dma_memory_rw_relaxed(dma, addr, (void *)buf, len,
+ DMA_DIRECTION_FROM_DEVICE);
+}
+
+static inline int dma_memory_rw(DMAContext *dma, dma_addr_t addr,
+ void *buf, dma_addr_t len,
+ DMADirection dir)
+{
+ dma_barrier(dma, dir);
+
+ return dma_memory_rw_relaxed(dma, addr, buf, len, dir);
+}
+
+static inline int dma_memory_read(DMAContext *dma, dma_addr_t addr,
+ void *buf, dma_addr_t len)
+{
+ return dma_memory_rw(dma, addr, buf, len, DMA_DIRECTION_TO_DEVICE);
+}
+
+static inline int dma_memory_write(DMAContext *dma, dma_addr_t addr,
+ const void *buf, dma_addr_t len)
+{
+ return dma_memory_rw(dma, addr, (void *)buf, len,
+ DMA_DIRECTION_FROM_DEVICE);
+}
+
+int iommu_dma_memory_set(DMAContext *dma, dma_addr_t addr, uint8_t c,
+ dma_addr_t len);
+
+int dma_memory_set(DMAContext *dma, dma_addr_t addr, uint8_t c, dma_addr_t len);
+
+void *iommu_dma_memory_map(DMAContext *dma,
+ dma_addr_t addr, dma_addr_t *len,
+ DMADirection dir);
+static inline void *dma_memory_map(DMAContext *dma,
+ dma_addr_t addr, dma_addr_t *len,
+ DMADirection dir)
+{
+ if (!dma_has_iommu(dma)) {
+ hwaddr xlen = *len;
+ void *p;
+
+ p = address_space_map(dma->as, addr, &xlen, dir == DMA_DIRECTION_FROM_DEVICE);
+ *len = xlen;
+ return p;
+ } else {
+ return iommu_dma_memory_map(dma, addr, len, dir);
+ }
+}
+
+void iommu_dma_memory_unmap(DMAContext *dma,
+ void *buffer, dma_addr_t len,
+ DMADirection dir, dma_addr_t access_len);
+static inline void dma_memory_unmap(DMAContext *dma,
+ void *buffer, dma_addr_t len,
+ DMADirection dir, dma_addr_t access_len)
+{
+ if (!dma_has_iommu(dma)) {
+ address_space_unmap(dma->as, buffer, (hwaddr)len,
+ dir == DMA_DIRECTION_FROM_DEVICE, access_len);
+ } else {
+ iommu_dma_memory_unmap(dma, buffer, len, dir, access_len);
+ }
+}
+
+#define DEFINE_LDST_DMA(_lname, _sname, _bits, _end) \
+ static inline uint##_bits##_t ld##_lname##_##_end##_dma(DMAContext *dma, \
+ dma_addr_t addr) \
+ { \
+ uint##_bits##_t val; \
+ dma_memory_read(dma, addr, &val, (_bits) / 8); \
+ return _end##_bits##_to_cpu(val); \
+ } \
+ static inline void st##_sname##_##_end##_dma(DMAContext *dma, \
+ dma_addr_t addr, \
+ uint##_bits##_t val) \
+ { \
+ val = cpu_to_##_end##_bits(val); \
+ dma_memory_write(dma, addr, &val, (_bits) / 8); \
+ }
+
+static inline uint8_t ldub_dma(DMAContext *dma, dma_addr_t addr)
+{
+ uint8_t val;
+
+ dma_memory_read(dma, addr, &val, 1);
+ return val;
+}
+
+static inline void stb_dma(DMAContext *dma, dma_addr_t addr, uint8_t val)
+{
+ dma_memory_write(dma, addr, &val, 1);
+}
+
+DEFINE_LDST_DMA(uw, w, 16, le);
+DEFINE_LDST_DMA(l, l, 32, le);
+DEFINE_LDST_DMA(q, q, 64, le);
+DEFINE_LDST_DMA(uw, w, 16, be);
+DEFINE_LDST_DMA(l, l, 32, be);
+DEFINE_LDST_DMA(q, q, 64, be);
+
+#undef DEFINE_LDST_DMA
+
+void dma_context_init(DMAContext *dma, AddressSpace *as, DMATranslateFunc translate,
+ DMAMapFunc map, DMAUnmapFunc unmap);
+
+struct ScatterGatherEntry {
+ dma_addr_t base;
+ dma_addr_t len;
+};
+
+void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint, DMAContext *dma);
+void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len);
+void qemu_sglist_destroy(QEMUSGList *qsg);
+#endif
+
+typedef BlockDriverAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t sector_num,
+ QEMUIOVector *iov, int nb_sectors,
+ BlockDriverCompletionFunc *cb, void *opaque);
+
+BlockDriverAIOCB *dma_bdrv_io(BlockDriverState *bs,
+ QEMUSGList *sg, uint64_t sector_num,
+ DMAIOFunc *io_func, BlockDriverCompletionFunc *cb,
+ void *opaque, DMADirection dir);
+BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs,
+ QEMUSGList *sg, uint64_t sector,
+ BlockDriverCompletionFunc *cb, void *opaque);
+BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs,
+ QEMUSGList *sg, uint64_t sector,
+ BlockDriverCompletionFunc *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);
+
+void dma_acct_start(BlockDriverState *bs, BlockAcctCookie *cookie,
+ QEMUSGList *sg, enum BlockAcctType type);
+
+#endif
--- /dev/null
+/*
+ * QEMU dump
+ *
+ * Copyright Fujitsu, Corp. 2011, 2012
+ *
+ * Authors:
+ * Wen Congyang <wency@cn.fujitsu.com>
+ *
+ * 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 DUMP_H
+#define DUMP_H
+
+typedef struct ArchDumpInfo {
+ int d_machine; /* Architecture */
+ int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */
+ int d_class; /* ELFCLASS32 or ELFCLASS64 */
+} ArchDumpInfo;
+
+typedef int (*write_core_dump_function)(void *buf, size_t size, void *opaque);
+int cpu_write_elf64_note(write_core_dump_function f, CPUArchState *env,
+ int cpuid, void *opaque);
+int cpu_write_elf32_note(write_core_dump_function f, CPUArchState *env,
+ int cpuid, void *opaque);
+int cpu_write_elf64_qemunote(write_core_dump_function f, CPUArchState *env,
+ void *opaque);
+int cpu_write_elf32_qemunote(write_core_dump_function f, CPUArchState *env,
+ void *opaque);
+int cpu_get_dump_info(ArchDumpInfo *info);
+ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);
+
+#endif
--- /dev/null
+/*
+ * QEMU KVM support
+ *
+ * Copyright IBM, Corp. 2008
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * 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 QEMU_KVM_H
+#define QEMU_KVM_H
+
+#include <errno.h>
+#include "config-host.h"
+#include "qemu/queue.h"
+
+#ifdef CONFIG_KVM
+#include <linux/kvm.h>
+#include <linux/kvm_para.h>
+#endif
+
+extern int kvm_allowed;
+extern bool kvm_kernel_irqchip;
+extern bool kvm_async_interrupts_allowed;
+extern bool kvm_irqfds_allowed;
+extern bool kvm_msi_via_irqfd_allowed;
+extern bool kvm_gsi_routing_allowed;
+
+#if defined CONFIG_KVM || !defined NEED_CPU_H
+#define kvm_enabled() (kvm_allowed)
+/**
+ * kvm_irqchip_in_kernel:
+ *
+ * Returns: true if the user asked us to create an in-kernel
+ * irqchip via the "kernel_irqchip=on" machine option.
+ * What this actually means is architecture and machine model
+ * specific: on PC, for instance, it means that the LAPIC,
+ * IOAPIC and PIT are all in kernel. This function should never
+ * be used from generic target-independent code: use one of the
+ * following functions or some other specific check instead.
+ */
+#define kvm_irqchip_in_kernel() (kvm_kernel_irqchip)
+
+/**
+ * kvm_async_interrupts_enabled:
+ *
+ * Returns: true if we can deliver interrupts to KVM
+ * asynchronously (ie by ioctl from any thread at any time)
+ * rather than having to do interrupt delivery synchronously
+ * (where the vcpu must be stopped at a suitable point first).
+ */
+#define kvm_async_interrupts_enabled() (kvm_async_interrupts_allowed)
+
+/**
+ * kvm_irqfds_enabled:
+ *
+ * Returns: true if we can use irqfds to inject interrupts into
+ * a KVM CPU (ie the kernel supports irqfds and we are running
+ * with a configuration where it is meaningful to use them).
+ */
+#define kvm_irqfds_enabled() (kvm_irqfds_allowed)
+
+/**
+ * kvm_msi_via_irqfd_enabled:
+ *
+ * Returns: true if we can route a PCI MSI (Message Signaled Interrupt)
+ * to a KVM CPU via an irqfd. This requires that the kernel supports
+ * this and that we're running in a configuration that permits it.
+ */
+#define kvm_msi_via_irqfd_enabled() (kvm_msi_via_irqfd_allowed)
+
+/**
+ * kvm_gsi_routing_enabled:
+ *
+ * Returns: true if GSI routing is enabled (ie the kernel supports
+ * it and we're running in a configuration that permits it).
+ */
+#define kvm_gsi_routing_enabled() (kvm_gsi_routing_allowed)
+
+#else
+#define kvm_enabled() (0)
+#define kvm_irqchip_in_kernel() (false)
+#define kvm_async_interrupts_enabled() (false)
+#define kvm_irqfds_enabled() (false)
+#define kvm_msi_via_irqfd_enabled() (false)
+#define kvm_gsi_routing_allowed() (false)
+#endif
+
+struct kvm_run;
+struct kvm_lapic_state;
+
+typedef struct KVMCapabilityInfo {
+ const char *name;
+ int value;
+} KVMCapabilityInfo;
+
+#define KVM_CAP_INFO(CAP) { "KVM_CAP_" stringify(CAP), KVM_CAP_##CAP }
+#define KVM_CAP_LAST_INFO { NULL, 0 }
+
+struct KVMState;
+typedef struct KVMState KVMState;
+extern KVMState *kvm_state;
+
+/* external API */
+
+int kvm_init(void);
+
+int kvm_has_sync_mmu(void);
+int kvm_has_vcpu_events(void);
+int kvm_has_robust_singlestep(void);
+int kvm_has_debugregs(void);
+int kvm_has_xsave(void);
+int kvm_has_xcrs(void);
+int kvm_has_pit_state2(void);
+int kvm_has_many_ioeventfds(void);
+int kvm_has_gsi_routing(void);
+int kvm_has_intx_set_mask(void);
+
+#ifdef NEED_CPU_H
+int kvm_init_vcpu(CPUArchState *env);
+
+int kvm_cpu_exec(CPUArchState *env);
+
+#if !defined(CONFIG_USER_ONLY)
+void *kvm_vmalloc(ram_addr_t size);
+void *kvm_arch_vmalloc(ram_addr_t size);
+void kvm_setup_guest_memory(void *start, size_t size);
+
+void kvm_flush_coalesced_mmio_buffer(void);
+#endif
+
+int kvm_insert_breakpoint(CPUArchState *current_env, target_ulong addr,
+ target_ulong len, int type);
+int kvm_remove_breakpoint(CPUArchState *current_env, target_ulong addr,
+ target_ulong len, int type);
+void kvm_remove_all_breakpoints(CPUArchState *current_env);
+int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap);
+#ifndef _WIN32
+int kvm_set_signal_mask(CPUArchState *env, const sigset_t *sigset);
+#endif
+
+int kvm_on_sigbus_vcpu(CPUArchState *env, int code, void *addr);
+int kvm_on_sigbus(int code, void *addr);
+
+/* internal API */
+
+int kvm_ioctl(KVMState *s, int type, ...);
+
+int kvm_vm_ioctl(KVMState *s, int type, ...);
+
+int kvm_vcpu_ioctl(CPUArchState *env, int type, ...);
+
+/* Arch specific hooks */
+
+extern const KVMCapabilityInfo kvm_arch_required_capabilities[];
+
+void kvm_arch_pre_run(CPUArchState *env, struct kvm_run *run);
+void kvm_arch_post_run(CPUArchState *env, struct kvm_run *run);
+
+int kvm_arch_handle_exit(CPUArchState *env, struct kvm_run *run);
+
+int kvm_arch_process_async_events(CPUArchState *env);
+
+int kvm_arch_get_registers(CPUArchState *env);
+
+/* state subset only touched by the VCPU itself during runtime */
+#define KVM_PUT_RUNTIME_STATE 1
+/* state subset modified during VCPU reset */
+#define KVM_PUT_RESET_STATE 2
+/* full state set, modified during initialization or on vmload */
+#define KVM_PUT_FULL_STATE 3
+
+int kvm_arch_put_registers(CPUArchState *env, int level);
+
+int kvm_arch_init(KVMState *s);
+
+int kvm_arch_init_vcpu(CPUArchState *env);
+
+void kvm_arch_reset_vcpu(CPUArchState *env);
+
+int kvm_arch_on_sigbus_vcpu(CPUArchState *env, int code, void *addr);
+int kvm_arch_on_sigbus(int code, void *addr);
+
+void kvm_arch_init_irq_routing(KVMState *s);
+
+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_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
+void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
+
+struct kvm_guest_debug;
+struct kvm_debug_exit_arch;
+
+struct kvm_sw_breakpoint {
+ target_ulong pc;
+ target_ulong saved_insn;
+ int use_count;
+ QTAILQ_ENTRY(kvm_sw_breakpoint) entry;
+};
+
+QTAILQ_HEAD(kvm_sw_breakpoint_head, kvm_sw_breakpoint);
+
+struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUArchState *env,
+ target_ulong pc);
+
+int kvm_sw_breakpoints_active(CPUArchState *env);
+
+int kvm_arch_insert_sw_breakpoint(CPUArchState *current_env,
+ struct kvm_sw_breakpoint *bp);
+int kvm_arch_remove_sw_breakpoint(CPUArchState *current_env,
+ struct kvm_sw_breakpoint *bp);
+int kvm_arch_insert_hw_breakpoint(target_ulong addr,
+ target_ulong len, int type);
+int kvm_arch_remove_hw_breakpoint(target_ulong addr,
+ target_ulong len, int type);
+void kvm_arch_remove_all_hw_breakpoints(void);
+
+void kvm_arch_update_guest_debug(CPUArchState *env, struct kvm_guest_debug *dbg);
+
+bool kvm_arch_stop_on_emulation_error(CPUArchState *env);
+
+int kvm_check_extension(KVMState *s, unsigned int extension);
+
+uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function,
+ uint32_t index, int reg);
+void kvm_cpu_synchronize_state(CPUArchState *env);
+void kvm_cpu_synchronize_post_reset(CPUArchState *env);
+void kvm_cpu_synchronize_post_init(CPUArchState *env);
+
+/* generic hooks - to be moved/refactored once there are more users */
+
+static inline void cpu_synchronize_state(CPUArchState *env)
+{
+ if (kvm_enabled()) {
+ kvm_cpu_synchronize_state(env);
+ }
+}
+
+static inline void cpu_synchronize_post_reset(CPUArchState *env)
+{
+ if (kvm_enabled()) {
+ kvm_cpu_synchronize_post_reset(env);
+ }
+}
+
+static inline void cpu_synchronize_post_init(CPUArchState *env)
+{
+ if (kvm_enabled()) {
+ kvm_cpu_synchronize_post_init(env);
+ }
+}
+
+
+#if !defined(CONFIG_USER_ONLY)
+int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr,
+ hwaddr *phys_addr);
+#endif
+
+#endif
+int kvm_set_ioeventfd_mmio(int fd, uint32_t adr, uint32_t val, bool assign,
+ uint32_t size);
+
+int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign);
+
+int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg);
+int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg);
+void kvm_irqchip_release_virq(KVMState *s, int virq);
+
+int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
+int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
+void kvm_pc_gsi_handler(void *opaque, int n, int level);
+void kvm_pc_setup_irq_routing(bool pci_enabled);
+#endif
--- /dev/null
+/*
+ * QEMU memory mapping
+ *
+ * Copyright Fujitsu, Corp. 2011, 2012
+ *
+ * Authors:
+ * Wen Congyang <wency@cn.fujitsu.com>
+ *
+ * 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 MEMORY_MAPPING_H
+#define MEMORY_MAPPING_H
+
+#include "qemu/queue.h"
+
+/* The physical and virtual address in the memory mapping are contiguous. */
+typedef struct MemoryMapping {
+ hwaddr phys_addr;
+ target_ulong virt_addr;
+ ram_addr_t length;
+ QTAILQ_ENTRY(MemoryMapping) next;
+} MemoryMapping;
+
+typedef struct MemoryMappingList {
+ unsigned int num;
+ MemoryMapping *last_mapping;
+ QTAILQ_HEAD(, MemoryMapping) head;
+} MemoryMappingList;
+
+int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env);
+bool cpu_paging_enabled(CPUArchState *env);
+
+/*
+ * add or merge the memory region [phys_addr, phys_addr + length) into the
+ * memory mapping's list. The region's virtual address starts with virt_addr,
+ * and is contiguous. The list is sorted by phys_addr.
+ */
+void memory_mapping_list_add_merge_sorted(MemoryMappingList *list,
+ hwaddr phys_addr,
+ hwaddr virt_addr,
+ ram_addr_t length);
+
+void memory_mapping_list_free(MemoryMappingList *list);
+
+void memory_mapping_list_init(MemoryMappingList *list);
+
+/*
+ * Return value:
+ * 0: success
+ * -1: failed
+ * -2: unsupported
+ */
+int qemu_get_guest_memory_mapping(MemoryMappingList *list);
+
+/* get guest's memory mapping without do paging(virtual address is 0). */
+void qemu_get_guest_simple_memory_mapping(MemoryMappingList *list);
+
+void memory_mapping_filter(MemoryMappingList *list, int64_t begin,
+ int64_t length);
+
+#endif
--- /dev/null
+/*
+ * posix specific declarations
+ *
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ * Copyright (c) 2010 Jes Sorensen <Jes.Sorensen@redhat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef QEMU_OS_POSIX_H
+#define QEMU_OS_POSIX_H
+
+void os_set_line_buffering(void);
+void os_set_proc_name(const char *s);
+void os_setup_signal_handling(void);
+void os_daemonize(void);
+void os_setup_post(void);
+
+typedef struct timeval qemu_timeval;
+#define qemu_gettimeofday(tp) gettimeofday(tp, NULL)
+
+#ifndef CONFIG_UTIMENSAT
+#ifndef UTIME_NOW
+# define UTIME_NOW ((1l << 30) - 1l)
+#endif
+#ifndef UTIME_OMIT
+# define UTIME_OMIT ((1l << 30) - 2l)
+#endif
+#endif
+typedef struct timespec qemu_timespec;
+int qemu_utimens(const char *path, const qemu_timespec *times);
+
+bool is_daemonized(void);
+
+#endif
--- /dev/null
+/*
+ * win32 specific declarations
+ *
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ * Copyright (c) 2010 Jes Sorensen <Jes.Sorensen@redhat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef QEMU_OS_WIN32_H
+#define QEMU_OS_WIN32_H
+
+#include <windows.h>
+#include <winsock2.h>
+
+/* Workaround for older versions of MinGW. */
+#ifndef ECONNREFUSED
+# define ECONNREFUSED WSAECONNREFUSED
+#endif
+#ifndef EINPROGRESS
+# define EINPROGRESS WSAEINPROGRESS
+#endif
+#ifndef EHOSTUNREACH
+# define EHOSTUNREACH WSAEHOSTUNREACH
+#endif
+#ifndef EINTR
+# define EINTR WSAEINTR
+#endif
+#ifndef EINPROGRESS
+# define EINPROGRESS WSAEINPROGRESS
+#endif
+#ifndef ENETUNREACH
+# define ENETUNREACH WSAENETUNREACH
+#endif
+#ifndef ENOTCONN
+# define ENOTCONN WSAENOTCONN
+#endif
+#ifndef EWOULDBLOCK
+# define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+
+#if defined(_WIN64)
+/* On w64, setjmp is implemented by _setjmp which needs a second parameter.
+ * If this parameter is NULL, longjump does no stack unwinding.
+ * That is what we need for QEMU. Passing the value of register rsp (default)
+ * lets longjmp try a stack unwinding which will crash with generated code. */
+# undef setjmp
+# define setjmp(env) _setjmp(env, NULL)
+#endif
+
+/* Declaration of ffs() is missing in MinGW's strings.h. */
+int ffs(int i);
+
+/* Missing POSIX functions. Don't use MinGW-w64 macros. */
+#undef gmtime_r
+struct tm *gmtime_r(const time_t *timep, struct tm *result);
+#undef localtime_r
+struct tm *localtime_r(const time_t *timep, struct tm *result);
+
+static inline void os_setup_signal_handling(void) {}
+static inline void os_daemonize(void) {}
+static inline void os_setup_post(void) {}
+void os_set_line_buffering(void);
+static inline void os_set_proc_name(const char *dummy) {}
+
+#if !defined(EPROTONOSUPPORT)
+# define EPROTONOSUPPORT EINVAL
+#endif
+
+int setenv(const char *name, const char *value, int overwrite);
+
+typedef struct {
+ long tv_sec;
+ long tv_usec;
+} qemu_timeval;
+int qemu_gettimeofday(qemu_timeval *tp);
+
+static inline bool is_daemonized(void)
+{
+ return false;
+}
+
+#endif
--- /dev/null
+/*
+ * Test Server
+ *
+ * Copyright IBM, Corp. 2011
+ *
+ * Authors:
+ * Anthony Liguori <aliguori@us.ibm.com>
+ *
+ * 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 QTEST_H
+#define QTEST_H
+
+#include "qemu-common.h"
+
+#if !defined(CONFIG_USER_ONLY)
+extern int qtest_allowed;
+extern const char *qtest_chrdev;
+extern const char *qtest_log;
+
+static inline bool qtest_enabled(void)
+{
+ return qtest_allowed;
+}
+
+static inline int qtest_available(void)
+{
+ return 1;
+}
+
+int qtest_init(void);
+#else
+static inline bool qtest_enabled(void)
+{
+ return false;
+}
+
+static inline int qtest_available(void)
+{
+ return 0;
+}
+
+static inline int qtest_init(void)
+{
+ return 0;
+}
+
+#endif
+
+#endif
--- /dev/null
+/*
+ * QEMU seccomp mode 2 support with libseccomp
+ *
+ * Copyright IBM, Corp. 2012
+ *
+ * Authors:
+ * Eduardo Otubo <eotubo@br.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.
+ */
+#ifndef QEMU_SECCOMP_H
+#define QEMU_SECCOMP_H
+
+#include <seccomp.h>
+#include "qemu/osdep.h"
+
+int seccomp_start(void);
+#endif
--- /dev/null
+#ifndef SYSEMU_H
+#define SYSEMU_H
+/* Misc. things related to the system emulator. */
+
+#include "qemu/typedefs.h"
+#include "qemu/option.h"
+#include "qemu/queue.h"
+#include "qemu/timer.h"
+#include "qapi-types.h"
+#include "qemu/notify.h"
+#include "qemu/main-loop.h"
+
+/* vl.c */
+
+extern const char *bios_name;
+
+extern const char *qemu_name;
+extern uint8_t qemu_uuid[];
+int qemu_uuid_parse(const char *str, uint8_t *uuid);
+#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
+
+bool runstate_check(RunState state);
+void runstate_set(RunState new_state);
+int runstate_is_running(void);
+typedef struct vm_change_state_entry VMChangeStateEntry;
+typedef void VMChangeStateHandler(void *opaque, int running, RunState state);
+
+VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
+ void *opaque);
+void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
+void vm_state_notify(int running, RunState state);
+
+#define VMRESET_SILENT false
+#define VMRESET_REPORT true
+
+void vm_start(void);
+void vm_stop(RunState state);
+void vm_stop_force_state(RunState state);
+
+typedef enum WakeupReason {
+ QEMU_WAKEUP_REASON_OTHER = 0,
+ QEMU_WAKEUP_REASON_RTC,
+ QEMU_WAKEUP_REASON_PMTIMER,
+} WakeupReason;
+
+void qemu_system_reset_request(void);
+void qemu_system_suspend_request(void);
+void qemu_register_suspend_notifier(Notifier *notifier);
+void qemu_system_wakeup_request(WakeupReason reason);
+void qemu_system_wakeup_enable(WakeupReason reason, bool enabled);
+void qemu_register_wakeup_notifier(Notifier *notifier);
+void qemu_system_shutdown_request(void);
+void qemu_system_powerdown_request(void);
+void qemu_register_powerdown_notifier(Notifier *notifier);
+void qemu_system_debug_request(void);
+void qemu_system_vmstop_request(RunState reason);
+int qemu_shutdown_requested_get(void);
+int qemu_reset_requested_get(void);
+void qemu_system_killed(int signal, pid_t pid);
+void qemu_devices_reset(void);
+void qemu_system_reset(bool report);
+
+void qemu_add_exit_notifier(Notifier *notify);
+void qemu_remove_exit_notifier(Notifier *notify);
+
+void qemu_add_machine_init_done_notifier(Notifier *notify);
+
+void do_savevm(Monitor *mon, const QDict *qdict);
+int load_vmstate(const char *name);
+void do_delvm(Monitor *mon, const QDict *qdict);
+void do_info_snapshots(Monitor *mon);
+
+void qemu_announce_self(void);
+
+bool qemu_savevm_state_blocked(Error **errp);
+int qemu_savevm_state_begin(QEMUFile *f,
+ const MigrationParams *params);
+int qemu_savevm_state_iterate(QEMUFile *f);
+int qemu_savevm_state_complete(QEMUFile *f);
+void qemu_savevm_state_cancel(QEMUFile *f);
+int qemu_loadvm_state(QEMUFile *f);
+
+/* SLIRP */
+void do_info_slirp(Monitor *mon);
+
+typedef enum DisplayType
+{
+ DT_DEFAULT,
+ DT_CURSES,
+ DT_SDL,
+ DT_NOGRAPHIC,
+ DT_NONE,
+} DisplayType;
+
+extern int autostart;
+extern int bios_size;
+
+typedef enum {
+ VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
+} VGAInterfaceType;
+
+extern int vga_interface_type;
+#define xenfb_enabled (vga_interface_type == VGA_XENFB)
+#define qxl_enabled (vga_interface_type == VGA_QXL)
+
+extern int graphic_width;
+extern int graphic_height;
+extern int graphic_depth;
+extern DisplayType display_type;
+extern const char *keyboard_layout;
+extern int win2k_install_hack;
+extern int alt_grab;
+extern int ctrl_grab;
+extern int smp_cpus;
+extern int max_cpus;
+extern int cursor_hide;
+extern int graphic_rotate;
+extern int no_quit;
+extern int no_shutdown;
+extern int semihosting_enabled;
+extern int old_param;
+extern int boot_menu;
+extern uint8_t *boot_splash_filedata;
+extern int boot_splash_filedata_size;
+extern uint8_t qemu_extra_params_fw[2];
+extern QEMUClock *rtc_clock;
+
+#define MAX_NODES 64
+#define MAX_CPUMASK_BITS 255
+extern int nb_numa_nodes;
+extern uint64_t node_mem[MAX_NODES];
+extern unsigned long *node_cpumask[MAX_NODES];
+
+#define MAX_OPTION_ROMS 16
+typedef struct QEMUOptionRom {
+ const char *name;
+ int32_t bootindex;
+} QEMUOptionRom;
+extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
+extern int nb_option_roms;
+
+#define MAX_PROM_ENVS 128
+extern const char *prom_envs[MAX_PROM_ENVS];
+extern unsigned int nb_prom_envs;
+
+/* pci-hotplug */
+void pci_device_hot_add(Monitor *mon, const QDict *qdict);
+int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo);
+void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict);
+
+/* generic hotplug */
+void drive_hot_add(Monitor *mon, const QDict *qdict);
+
+/* pcie aer error injection */
+void pcie_aer_inject_error_print(Monitor *mon, const QObject *data);
+int do_pcie_aer_inject_error(Monitor *mon,
+ const QDict *qdict, QObject **ret_data);
+
+/* serial ports */
+
+#define MAX_SERIAL_PORTS 4
+
+extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
+
+/* parallel ports */
+
+#define MAX_PARALLEL_PORTS 3
+
+extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
+
+void do_usb_add(Monitor *mon, const QDict *qdict);
+void do_usb_del(Monitor *mon, const QDict *qdict);
+void usb_info(Monitor *mon);
+
+void rtc_change_mon_event(struct tm *tm);
+
+void register_devices(void);
+
+void add_boot_device_path(int32_t bootindex, DeviceState *dev,
+ const char *suffix);
+char *get_boot_devices_list(uint32_t *size);
+
+bool usb_enabled(bool default_usb);
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2011 Citrix Ltd.
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef XEN_MAPCACHE_H
+#define XEN_MAPCACHE_H
+
+#include <stdlib.h>
+
+typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr start_addr,
+ ram_addr_t size,
+ void *opaque);
+#ifdef CONFIG_XEN
+
+void xen_map_cache_init(phys_offset_to_gaddr_t f,
+ void *opaque);
+uint8_t *xen_map_cache(hwaddr phys_addr, hwaddr size,
+ uint8_t lock);
+ram_addr_t xen_ram_addr_from_mapcache(void *ptr);
+void xen_invalidate_map_cache_entry(uint8_t *buffer);
+void xen_invalidate_map_cache(void);
+
+#else
+
+static inline void xen_map_cache_init(phys_offset_to_gaddr_t f,
+ void *opaque)
+{
+}
+
+static inline uint8_t *xen_map_cache(hwaddr phys_addr,
+ hwaddr size,
+ uint8_t lock)
+{
+ abort();
+}
+
+static inline ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
+{
+ abort();
+}
+
+static inline void xen_invalidate_map_cache_entry(uint8_t *buffer)
+{
+}
+
+static inline void xen_invalidate_map_cache(void)
+{
+}
+
+#endif
+
+#endif /* !XEN_MAPCACHE_H */
#include "qemu/thread.h"
#include "ui/qemu-pixman.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define NUM_MEMSLOTS 8
#define MEMSLOT_GENERATION_BITS 8
#include "qemu/atomic.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "exec/gdbstub.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qemu/bswap.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "hw/pci/msi.h"
#include "cpu.h"
#include "exec/gdbstub.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
KVMState *kvm_state;
bool kvm_kernel_irqchip;
+++ /dev/null
-/*
- * QEMU KVM support
- *
- * Copyright IBM, Corp. 2008
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * 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 QEMU_KVM_H
-#define QEMU_KVM_H
-
-#include <errno.h>
-#include "config-host.h"
-#include "qemu/queue.h"
-
-#ifdef CONFIG_KVM
-#include <linux/kvm.h>
-#include <linux/kvm_para.h>
-#endif
-
-extern int kvm_allowed;
-extern bool kvm_kernel_irqchip;
-extern bool kvm_async_interrupts_allowed;
-extern bool kvm_irqfds_allowed;
-extern bool kvm_msi_via_irqfd_allowed;
-extern bool kvm_gsi_routing_allowed;
-
-#if defined CONFIG_KVM || !defined NEED_CPU_H
-#define kvm_enabled() (kvm_allowed)
-/**
- * kvm_irqchip_in_kernel:
- *
- * Returns: true if the user asked us to create an in-kernel
- * irqchip via the "kernel_irqchip=on" machine option.
- * What this actually means is architecture and machine model
- * specific: on PC, for instance, it means that the LAPIC,
- * IOAPIC and PIT are all in kernel. This function should never
- * be used from generic target-independent code: use one of the
- * following functions or some other specific check instead.
- */
-#define kvm_irqchip_in_kernel() (kvm_kernel_irqchip)
-
-/**
- * kvm_async_interrupts_enabled:
- *
- * Returns: true if we can deliver interrupts to KVM
- * asynchronously (ie by ioctl from any thread at any time)
- * rather than having to do interrupt delivery synchronously
- * (where the vcpu must be stopped at a suitable point first).
- */
-#define kvm_async_interrupts_enabled() (kvm_async_interrupts_allowed)
-
-/**
- * kvm_irqfds_enabled:
- *
- * Returns: true if we can use irqfds to inject interrupts into
- * a KVM CPU (ie the kernel supports irqfds and we are running
- * with a configuration where it is meaningful to use them).
- */
-#define kvm_irqfds_enabled() (kvm_irqfds_allowed)
-
-/**
- * kvm_msi_via_irqfd_enabled:
- *
- * Returns: true if we can route a PCI MSI (Message Signaled Interrupt)
- * to a KVM CPU via an irqfd. This requires that the kernel supports
- * this and that we're running in a configuration that permits it.
- */
-#define kvm_msi_via_irqfd_enabled() (kvm_msi_via_irqfd_allowed)
-
-/**
- * kvm_gsi_routing_enabled:
- *
- * Returns: true if GSI routing is enabled (ie the kernel supports
- * it and we're running in a configuration that permits it).
- */
-#define kvm_gsi_routing_enabled() (kvm_gsi_routing_allowed)
-
-#else
-#define kvm_enabled() (0)
-#define kvm_irqchip_in_kernel() (false)
-#define kvm_async_interrupts_enabled() (false)
-#define kvm_irqfds_enabled() (false)
-#define kvm_msi_via_irqfd_enabled() (false)
-#define kvm_gsi_routing_allowed() (false)
-#endif
-
-struct kvm_run;
-struct kvm_lapic_state;
-
-typedef struct KVMCapabilityInfo {
- const char *name;
- int value;
-} KVMCapabilityInfo;
-
-#define KVM_CAP_INFO(CAP) { "KVM_CAP_" stringify(CAP), KVM_CAP_##CAP }
-#define KVM_CAP_LAST_INFO { NULL, 0 }
-
-struct KVMState;
-typedef struct KVMState KVMState;
-extern KVMState *kvm_state;
-
-/* external API */
-
-int kvm_init(void);
-
-int kvm_has_sync_mmu(void);
-int kvm_has_vcpu_events(void);
-int kvm_has_robust_singlestep(void);
-int kvm_has_debugregs(void);
-int kvm_has_xsave(void);
-int kvm_has_xcrs(void);
-int kvm_has_pit_state2(void);
-int kvm_has_many_ioeventfds(void);
-int kvm_has_gsi_routing(void);
-int kvm_has_intx_set_mask(void);
-
-#ifdef NEED_CPU_H
-int kvm_init_vcpu(CPUArchState *env);
-
-int kvm_cpu_exec(CPUArchState *env);
-
-#if !defined(CONFIG_USER_ONLY)
-void *kvm_vmalloc(ram_addr_t size);
-void *kvm_arch_vmalloc(ram_addr_t size);
-void kvm_setup_guest_memory(void *start, size_t size);
-
-void kvm_flush_coalesced_mmio_buffer(void);
-#endif
-
-int kvm_insert_breakpoint(CPUArchState *current_env, target_ulong addr,
- target_ulong len, int type);
-int kvm_remove_breakpoint(CPUArchState *current_env, target_ulong addr,
- target_ulong len, int type);
-void kvm_remove_all_breakpoints(CPUArchState *current_env);
-int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap);
-#ifndef _WIN32
-int kvm_set_signal_mask(CPUArchState *env, const sigset_t *sigset);
-#endif
-
-int kvm_on_sigbus_vcpu(CPUArchState *env, int code, void *addr);
-int kvm_on_sigbus(int code, void *addr);
-
-/* internal API */
-
-int kvm_ioctl(KVMState *s, int type, ...);
-
-int kvm_vm_ioctl(KVMState *s, int type, ...);
-
-int kvm_vcpu_ioctl(CPUArchState *env, int type, ...);
-
-/* Arch specific hooks */
-
-extern const KVMCapabilityInfo kvm_arch_required_capabilities[];
-
-void kvm_arch_pre_run(CPUArchState *env, struct kvm_run *run);
-void kvm_arch_post_run(CPUArchState *env, struct kvm_run *run);
-
-int kvm_arch_handle_exit(CPUArchState *env, struct kvm_run *run);
-
-int kvm_arch_process_async_events(CPUArchState *env);
-
-int kvm_arch_get_registers(CPUArchState *env);
-
-/* state subset only touched by the VCPU itself during runtime */
-#define KVM_PUT_RUNTIME_STATE 1
-/* state subset modified during VCPU reset */
-#define KVM_PUT_RESET_STATE 2
-/* full state set, modified during initialization or on vmload */
-#define KVM_PUT_FULL_STATE 3
-
-int kvm_arch_put_registers(CPUArchState *env, int level);
-
-int kvm_arch_init(KVMState *s);
-
-int kvm_arch_init_vcpu(CPUArchState *env);
-
-void kvm_arch_reset_vcpu(CPUArchState *env);
-
-int kvm_arch_on_sigbus_vcpu(CPUArchState *env, int code, void *addr);
-int kvm_arch_on_sigbus(int code, void *addr);
-
-void kvm_arch_init_irq_routing(KVMState *s);
-
-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_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
-void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
-
-struct kvm_guest_debug;
-struct kvm_debug_exit_arch;
-
-struct kvm_sw_breakpoint {
- target_ulong pc;
- target_ulong saved_insn;
- int use_count;
- QTAILQ_ENTRY(kvm_sw_breakpoint) entry;
-};
-
-QTAILQ_HEAD(kvm_sw_breakpoint_head, kvm_sw_breakpoint);
-
-struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUArchState *env,
- target_ulong pc);
-
-int kvm_sw_breakpoints_active(CPUArchState *env);
-
-int kvm_arch_insert_sw_breakpoint(CPUArchState *current_env,
- struct kvm_sw_breakpoint *bp);
-int kvm_arch_remove_sw_breakpoint(CPUArchState *current_env,
- struct kvm_sw_breakpoint *bp);
-int kvm_arch_insert_hw_breakpoint(target_ulong addr,
- target_ulong len, int type);
-int kvm_arch_remove_hw_breakpoint(target_ulong addr,
- target_ulong len, int type);
-void kvm_arch_remove_all_hw_breakpoints(void);
-
-void kvm_arch_update_guest_debug(CPUArchState *env, struct kvm_guest_debug *dbg);
-
-bool kvm_arch_stop_on_emulation_error(CPUArchState *env);
-
-int kvm_check_extension(KVMState *s, unsigned int extension);
-
-uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function,
- uint32_t index, int reg);
-void kvm_cpu_synchronize_state(CPUArchState *env);
-void kvm_cpu_synchronize_post_reset(CPUArchState *env);
-void kvm_cpu_synchronize_post_init(CPUArchState *env);
-
-/* generic hooks - to be moved/refactored once there are more users */
-
-static inline void cpu_synchronize_state(CPUArchState *env)
-{
- if (kvm_enabled()) {
- kvm_cpu_synchronize_state(env);
- }
-}
-
-static inline void cpu_synchronize_post_reset(CPUArchState *env)
-{
- if (kvm_enabled()) {
- kvm_cpu_synchronize_post_reset(env);
- }
-}
-
-static inline void cpu_synchronize_post_init(CPUArchState *env)
-{
- if (kvm_enabled()) {
- kvm_cpu_synchronize_post_init(env);
- }
-}
-
-
-#if !defined(CONFIG_USER_ONLY)
-int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr,
- hwaddr *phys_addr);
-#endif
-
-#endif
-int kvm_set_ioeventfd_mmio(int fd, uint32_t adr, uint32_t val, bool assign,
- uint32_t size);
-
-int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign);
-
-int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg);
-int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg);
-void kvm_irqchip_release_virq(KVMState *s, int virq);
-
-int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
-int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq);
-void kvm_pc_gsi_handler(void *opaque, int n, int level);
-void kvm_pc_setup_irq_routing(bool pci_enabled);
-#endif
#include "exec/address-spaces.h"
#include "exec/ioport.h"
#include "qemu/bitops.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include <assert.h>
#include "exec/memory-internal.h"
#include "cpu.h"
#include "exec/cpu-all.h"
-#include "memory_mapping.h"
+#include "sysemu/memory_mapping.h"
int qemu_get_guest_memory_mapping(MemoryMappingList *list)
{
#include "cpu.h"
#include "exec/cpu-all.h"
-#include "memory_mapping.h"
+#include "sysemu/memory_mapping.h"
static void memory_mapping_list_add_mapping_sorted(MemoryMappingList *list,
MemoryMapping *mapping)
+++ /dev/null
-/*
- * QEMU memory mapping
- *
- * Copyright Fujitsu, Corp. 2011, 2012
- *
- * Authors:
- * Wen Congyang <wency@cn.fujitsu.com>
- *
- * 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 MEMORY_MAPPING_H
-#define MEMORY_MAPPING_H
-
-#include "qemu/queue.h"
-
-/* The physical and virtual address in the memory mapping are contiguous. */
-typedef struct MemoryMapping {
- hwaddr phys_addr;
- target_ulong virt_addr;
- ram_addr_t length;
- QTAILQ_ENTRY(MemoryMapping) next;
-} MemoryMapping;
-
-typedef struct MemoryMappingList {
- unsigned int num;
- MemoryMapping *last_mapping;
- QTAILQ_HEAD(, MemoryMapping) head;
-} MemoryMappingList;
-
-int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env);
-bool cpu_paging_enabled(CPUArchState *env);
-
-/*
- * add or merge the memory region [phys_addr, phys_addr + length) into the
- * memory mapping's list. The region's virtual address starts with virt_addr,
- * and is contiguous. The list is sorted by phys_addr.
- */
-void memory_mapping_list_add_merge_sorted(MemoryMappingList *list,
- hwaddr phys_addr,
- hwaddr virt_addr,
- ram_addr_t length);
-
-void memory_mapping_list_free(MemoryMappingList *list);
-
-void memory_mapping_list_init(MemoryMappingList *list);
-
-/*
- * Return value:
- * 0: success
- * -1: failed
- * -2: unsupported
- */
-int qemu_get_guest_memory_mapping(MemoryMappingList *list);
-
-/* get guest's memory mapping without do paging(virtual address is 0). */
-void qemu_get_guest_simple_memory_mapping(MemoryMappingList *list);
-
-void memory_mapping_filter(MemoryMappingList *list, int64_t begin,
- int64_t length);
-
-#endif
#include "migration/migration.h"
#include "monitor/monitor.h"
#include "buffered_file.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "block/block.h"
#include "qemu/sockets.h"
#include "migration/block.h"
#include "net/slirp.h"
#include "qemu-char.h"
#include "ui/qemu-spice.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "monitor/readline.h"
#include "ui/console.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "audio/audio.h"
#include "disas/disas.h"
-#include "balloon.h"
+#include "sysemu/balloon.h"
#include "qemu/timer.h"
#include "migration/migration.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qemu/acl.h"
#include "qapi/qmp/qint.h"
#include "qapi/qmp/qfloat.h"
#include "tap_int.h"
#include "qemu-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#ifdef __NetBSD__
#include <net/if.h>
#include <sys/ioctl.h>
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
*/
#include "tap_int.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include <sys/stat.h>
#include <sys/ethernet.h>
#include "qemu-common.h"
#include "clients.h" /* net_init_tap */
#include "net/net.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include <stdio.h>
#include <windows.h>
#include "net/net.h"
#include "clients.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
/* Needed early for CONFIG_BSD etc. */
#include "config-host.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "net/slirp.h"
#include "qemu-options.h"
#include <errno.h>
#include <sys/time.h>
#include "config-host.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-options.h"
/***********************************************************/
#endif
#include "config-host.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
#include "qemu/sockets.h"
*/
#include <windows.h>
#include "config-host.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/main-loop.h"
#include "trace.h"
#include "qemu/sockets.h"
#include "qemu-common.h"
#include "monitor/monitor.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "qemu-char.h"
#include "hw/usb.h"
#include <glib.h>
#ifdef _WIN32
-#include "qemu-os-win32.h"
+#include "sysemu/os-win32.h"
#endif
#ifdef CONFIG_POSIX
-#include "qemu-os-posix.h"
+#include "sysemu/os-posix.h"
#endif
#ifndef O_LARGEFILE
#include "qemu/option.h"
#include "qemu/error-report.h"
#include "qemu/osdep.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "block/block_int.h"
#include <getopt.h>
#include <stdio.h>
+++ /dev/null
-/*
- * posix specific declarations
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- * Copyright (c) 2010 Jes Sorensen <Jes.Sorensen@redhat.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef QEMU_OS_POSIX_H
-#define QEMU_OS_POSIX_H
-
-void os_set_line_buffering(void);
-void os_set_proc_name(const char *s);
-void os_setup_signal_handling(void);
-void os_daemonize(void);
-void os_setup_post(void);
-
-typedef struct timeval qemu_timeval;
-#define qemu_gettimeofday(tp) gettimeofday(tp, NULL)
-
-#ifndef CONFIG_UTIMENSAT
-#ifndef UTIME_NOW
-# define UTIME_NOW ((1l << 30) - 1l)
-#endif
-#ifndef UTIME_OMIT
-# define UTIME_OMIT ((1l << 30) - 2l)
-#endif
-#endif
-typedef struct timespec qemu_timespec;
-int qemu_utimens(const char *path, const qemu_timespec *times);
-
-bool is_daemonized(void);
-
-#endif
+++ /dev/null
-/*
- * win32 specific declarations
- *
- * Copyright (c) 2003-2008 Fabrice Bellard
- * Copyright (c) 2010 Jes Sorensen <Jes.Sorensen@redhat.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#ifndef QEMU_OS_WIN32_H
-#define QEMU_OS_WIN32_H
-
-#include <windows.h>
-#include <winsock2.h>
-
-/* Workaround for older versions of MinGW. */
-#ifndef ECONNREFUSED
-# define ECONNREFUSED WSAECONNREFUSED
-#endif
-#ifndef EINPROGRESS
-# define EINPROGRESS WSAEINPROGRESS
-#endif
-#ifndef EHOSTUNREACH
-# define EHOSTUNREACH WSAEHOSTUNREACH
-#endif
-#ifndef EINTR
-# define EINTR WSAEINTR
-#endif
-#ifndef EINPROGRESS
-# define EINPROGRESS WSAEINPROGRESS
-#endif
-#ifndef ENETUNREACH
-# define ENETUNREACH WSAENETUNREACH
-#endif
-#ifndef ENOTCONN
-# define ENOTCONN WSAENOTCONN
-#endif
-#ifndef EWOULDBLOCK
-# define EWOULDBLOCK WSAEWOULDBLOCK
-#endif
-
-#if defined(_WIN64)
-/* On w64, setjmp is implemented by _setjmp which needs a second parameter.
- * If this parameter is NULL, longjump does no stack unwinding.
- * That is what we need for QEMU. Passing the value of register rsp (default)
- * lets longjmp try a stack unwinding which will crash with generated code. */
-# undef setjmp
-# define setjmp(env) _setjmp(env, NULL)
-#endif
-
-/* Declaration of ffs() is missing in MinGW's strings.h. */
-int ffs(int i);
-
-/* Missing POSIX functions. Don't use MinGW-w64 macros. */
-#undef gmtime_r
-struct tm *gmtime_r(const time_t *timep, struct tm *result);
-#undef localtime_r
-struct tm *localtime_r(const time_t *timep, struct tm *result);
-
-static inline void os_setup_signal_handling(void) {}
-static inline void os_daemonize(void) {}
-static inline void os_setup_post(void) {}
-void os_set_line_buffering(void);
-static inline void os_set_proc_name(const char *dummy) {}
-
-#if !defined(EPROTONOSUPPORT)
-# define EPROTONOSUPPORT EINVAL
-#endif
-
-int setenv(const char *name, const char *value, int overwrite);
-
-typedef struct {
- long tv_sec;
- long tv_usec;
-} qemu_timeval;
-int qemu_gettimeofday(qemu_timeval *tp);
-
-static inline bool is_daemonized(void)
-{
- return false;
-}
-
-#endif
#include "qemu-common.h"
#include "qemu/osdep.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include <stdio.h>
struct progress_state {
*/
#include <stdio.h>
#include <seccomp.h>
-#include "qemu-seccomp.h"
+#include "sysemu/seccomp.h"
struct QemuSeccompSyscall {
int32_t num;
+++ /dev/null
-/*
- * QEMU seccomp mode 2 support with libseccomp
- *
- * Copyright IBM, Corp. 2012
- *
- * Authors:
- * Eduardo Otubo <eotubo@br.ibm.com>
- *
- * This work is licensed under the terms of the GNU GPL, version 2. See
- * the COPYING file in the top-level directory.
- *
- * Contributions after 2012-01-13 are licensed under the terms of the
- * GNU GPL, version 2 or (at your option) any later version.
- */
-#ifndef QEMU_SECCOMP_H
-#define QEMU_SECCOMP_H
-
-#include <seccomp.h>
-#include "qemu/osdep.h"
-
-int seccomp_start(void);
-#endif
* THE SOFTWARE.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "ui/console.h"
#include "qemu/log.h"
#include "migration/migration.h"
#include "qemu/main-loop.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/sockets.h"
#include "slirp/libslirp.h"
*/
#include "qemu-common.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qmp-commands.h"
#include "qemu-char.h"
#include "ui/qemu-spice.h"
#include "ui/vnc.h"
-#include "kvm.h"
-#include "arch_init.h"
+#include "sysemu/kvm.h"
+#include "sysemu/arch_init.h"
#include "hw/qdev.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qom/qom-qobject.h"
NameInfo *qmp_query_name(Error **errp)
*
*/
-#include "qtest.h"
+#include "sysemu/qtest.h"
#include "hw/qdev.h"
#include "qemu-char.h"
#include "exec/ioport.h"
#include "exec/memory.h"
#include "hw/irq.h"
-#include "sysemu.h"
-#include "cpus.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/cpus.h"
#define MAX_IRQ 256
+++ /dev/null
-/*
- * Test Server
- *
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- * Anthony Liguori <aliguori@us.ibm.com>
- *
- * 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 QTEST_H
-#define QTEST_H
-
-#include "qemu-common.h"
-
-#if !defined(CONFIG_USER_ONLY)
-extern int qtest_allowed;
-extern const char *qtest_chrdev;
-extern const char *qtest_log;
-
-static inline bool qtest_enabled(void)
-{
- return qtest_allowed;
-}
-
-static inline int qtest_available(void)
-{
- return 1;
-}
-
-int qtest_init(void);
-#else
-static inline bool qtest_enabled(void)
-{
- return false;
-}
-
-static inline int qtest_available(void)
-{
- return 0;
-}
-
-static inline int qtest_init(void)
-{
- return 0;
-}
-
-#endif
-
-#endif
#include "hw/qdev.h"
#include "net/net.h"
#include "monitor/monitor.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#include "audio/audio.h"
#include "migration/migration.h"
#include "qemu/sockets.h"
#include "qemu/queue.h"
#include "qemu/timer.h"
-#include "cpus.h"
+#include "sysemu/cpus.h"
#include "exec/memory.h"
#include "qmp-commands.h"
#include "trace.h"
#include "qemu-common.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
#include "qapi/qmp/qerror.h"
CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
+++ /dev/null
-#ifndef SYSEMU_H
-#define SYSEMU_H
-/* Misc. things related to the system emulator. */
-
-#include "qemu/typedefs.h"
-#include "qemu/option.h"
-#include "qemu/queue.h"
-#include "qemu/timer.h"
-#include "qapi-types.h"
-#include "qemu/notify.h"
-#include "qemu/main-loop.h"
-
-/* vl.c */
-
-extern const char *bios_name;
-
-extern const char *qemu_name;
-extern uint8_t qemu_uuid[];
-int qemu_uuid_parse(const char *str, uint8_t *uuid);
-#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
-
-bool runstate_check(RunState state);
-void runstate_set(RunState new_state);
-int runstate_is_running(void);
-typedef struct vm_change_state_entry VMChangeStateEntry;
-typedef void VMChangeStateHandler(void *opaque, int running, RunState state);
-
-VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
- void *opaque);
-void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
-void vm_state_notify(int running, RunState state);
-
-#define VMRESET_SILENT false
-#define VMRESET_REPORT true
-
-void vm_start(void);
-void vm_stop(RunState state);
-void vm_stop_force_state(RunState state);
-
-typedef enum WakeupReason {
- QEMU_WAKEUP_REASON_OTHER = 0,
- QEMU_WAKEUP_REASON_RTC,
- QEMU_WAKEUP_REASON_PMTIMER,
-} WakeupReason;
-
-void qemu_system_reset_request(void);
-void qemu_system_suspend_request(void);
-void qemu_register_suspend_notifier(Notifier *notifier);
-void qemu_system_wakeup_request(WakeupReason reason);
-void qemu_system_wakeup_enable(WakeupReason reason, bool enabled);
-void qemu_register_wakeup_notifier(Notifier *notifier);
-void qemu_system_shutdown_request(void);
-void qemu_system_powerdown_request(void);
-void qemu_register_powerdown_notifier(Notifier *notifier);
-void qemu_system_debug_request(void);
-void qemu_system_vmstop_request(RunState reason);
-int qemu_shutdown_requested_get(void);
-int qemu_reset_requested_get(void);
-void qemu_system_killed(int signal, pid_t pid);
-void qemu_devices_reset(void);
-void qemu_system_reset(bool report);
-
-void qemu_add_exit_notifier(Notifier *notify);
-void qemu_remove_exit_notifier(Notifier *notify);
-
-void qemu_add_machine_init_done_notifier(Notifier *notify);
-
-void do_savevm(Monitor *mon, const QDict *qdict);
-int load_vmstate(const char *name);
-void do_delvm(Monitor *mon, const QDict *qdict);
-void do_info_snapshots(Monitor *mon);
-
-void qemu_announce_self(void);
-
-bool qemu_savevm_state_blocked(Error **errp);
-int qemu_savevm_state_begin(QEMUFile *f,
- const MigrationParams *params);
-int qemu_savevm_state_iterate(QEMUFile *f);
-int qemu_savevm_state_complete(QEMUFile *f);
-void qemu_savevm_state_cancel(QEMUFile *f);
-int qemu_loadvm_state(QEMUFile *f);
-
-/* SLIRP */
-void do_info_slirp(Monitor *mon);
-
-typedef enum DisplayType
-{
- DT_DEFAULT,
- DT_CURSES,
- DT_SDL,
- DT_NOGRAPHIC,
- DT_NONE,
-} DisplayType;
-
-extern int autostart;
-extern int bios_size;
-
-typedef enum {
- VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
-} VGAInterfaceType;
-
-extern int vga_interface_type;
-#define xenfb_enabled (vga_interface_type == VGA_XENFB)
-#define qxl_enabled (vga_interface_type == VGA_QXL)
-
-extern int graphic_width;
-extern int graphic_height;
-extern int graphic_depth;
-extern DisplayType display_type;
-extern const char *keyboard_layout;
-extern int win2k_install_hack;
-extern int alt_grab;
-extern int ctrl_grab;
-extern int smp_cpus;
-extern int max_cpus;
-extern int cursor_hide;
-extern int graphic_rotate;
-extern int no_quit;
-extern int no_shutdown;
-extern int semihosting_enabled;
-extern int old_param;
-extern int boot_menu;
-extern uint8_t *boot_splash_filedata;
-extern int boot_splash_filedata_size;
-extern uint8_t qemu_extra_params_fw[2];
-extern QEMUClock *rtc_clock;
-
-#define MAX_NODES 64
-#define MAX_CPUMASK_BITS 255
-extern int nb_numa_nodes;
-extern uint64_t node_mem[MAX_NODES];
-extern unsigned long *node_cpumask[MAX_NODES];
-
-#define MAX_OPTION_ROMS 16
-typedef struct QEMUOptionRom {
- const char *name;
- int32_t bootindex;
-} QEMUOptionRom;
-extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
-extern int nb_option_roms;
-
-#define MAX_PROM_ENVS 128
-extern const char *prom_envs[MAX_PROM_ENVS];
-extern unsigned int nb_prom_envs;
-
-/* pci-hotplug */
-void pci_device_hot_add(Monitor *mon, const QDict *qdict);
-int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo);
-void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict);
-
-/* generic hotplug */
-void drive_hot_add(Monitor *mon, const QDict *qdict);
-
-/* pcie aer error injection */
-void pcie_aer_inject_error_print(Monitor *mon, const QObject *data);
-int do_pcie_aer_inject_error(Monitor *mon,
- const QDict *qdict, QObject **ret_data);
-
-/* serial ports */
-
-#define MAX_SERIAL_PORTS 4
-
-extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
-
-/* parallel ports */
-
-#define MAX_PARALLEL_PORTS 3
-
-extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
-
-void do_usb_add(Monitor *mon, const QDict *qdict);
-void do_usb_del(Monitor *mon, const QDict *qdict);
-void usb_info(Monitor *mon);
-
-void rtc_change_mon_event(struct tm *tm);
-
-void register_devices(void);
-
-void add_boot_device_path(int32_t bootindex, DeviceState *dev,
- const char *suffix);
-char *get_boot_devices_list(uint32_t *size);
-
-bool usb_enabled(bool default_usb);
-
-#endif
#include "cpu.h"
#include "helper.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/timer.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/loader.h"
#endif
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
static void cp_reg_reset(gpointer key, gpointer value, gpointer opaque)
{
#include "exec/gdbstub.h"
#include "helper.h"
#include "qemu/host-utils.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/bitops.h"
#ifndef CONFIG_USER_ONLY
#include "cpu.h"
#include "exec/cpu-all.h"
-#include "dump.h"
+#include "sysemu/dump.h"
#include "elf.h"
#ifdef TARGET_X86_64
#include "cpu.h"
#include "exec/cpu-all.h"
-#include "memory_mapping.h"
+#include "sysemu/memory_mapping.h"
/* PAE Paging or IA-32e Paging */
static void walk_pte(MemoryMappingList *list, hwaddr pte_start_addr,
#include <inttypes.h>
#include "cpu.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/qmp/qerror.h"
#include "qapi/visitor.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
#include "hyperv.h"
#include <linux/kvm_para.h>
#endif
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#ifndef CONFIG_USER_ONLY
#include "hw/xen.h"
#include "hw/sysbus.h"
#include "cpu.h"
#include "qemu/log.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "helper.h"
#if 0
*/
#include "cpu.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#ifndef CONFIG_USER_ONLY
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#endif
#include <linux/kvm_para.h>
#include "qemu-common.h"
-#include "sysemu.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/kvm.h"
#include "kvm_i386.h"
#include "cpu.h"
#include "exec/gdbstub.h"
#ifndef QEMU_KVM_I386_H
#define QEMU_KVM_I386_H
-#include "kvm.h"
+#include "sysemu/kvm.h"
bool kvm_allows_irq0_override(void);
#include "hw/isa.h"
#include "cpu.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
static const VMStateDescription vmstate_segment = {
.name = "segment",
#include "exec/gdbstub.h"
#include "exec/softmmu-semi.h"
#endif
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define HOSTED_EXIT 0
#define HOSTED_INIT_SIM 1
#include "cpu.h"
#include "helper_regs.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
-#include "cpus.h"
+#include "sysemu/cpus.h"
PowerPCCPU *cpu_ppc_init(const char *cpu_model)
{
#include "qemu-common.h"
#include "qemu/timer.h"
-#include "sysemu.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
#include "cpu.h"
-#include "cpus.h"
-#include "device_tree.h"
+#include "sysemu/cpus.h"
+#include "sysemu/device_tree.h"
#include "hw/sysbus.h"
#include "hw/spapr.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "kvm_ppc.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
#define PROC_DEVTREE_PATH "/proc/device-tree"
#include "hw/hw.h"
#include "hw/boards.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
void cpu_save(QEMUFile *f, void *opaque)
{
*/
#include "cpu.h"
#include "helper.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "kvm_ppc.h"
//#define DEBUG_MMU
#include "disas/bfd.h"
#include "exec/gdbstub.h"
-#include <kvm.h>
+#include <sysemu/kvm.h>
#include "kvm_ppc.h"
-#include "arch_init.h"
+#include "sysemu/arch_init.h"
//#define PPC_DUMP_CPU
//#define PPC_DEBUG_SPR
#include "exec/gdbstub.h"
#include "qemu/timer.h"
#ifndef CONFIG_USER_ONLY
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#endif
//#define DEBUG_S390
*/
#include "cpu.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#if !defined(CONFIG_USER_ONLY)
/* service interrupts are floating therefore we must not pass an cpustate */
#include "qemu-common.h"
#include "qemu/timer.h"
-#include "sysemu.h"
-#include "kvm.h"
+#include "sysemu/sysemu.h"
+#include "sysemu/kvm.h"
#include "cpu.h"
-#include "device_tree.h"
+#include "sysemu/device_tree.h"
/* #define DEBUG_KVM */
#include "qemu/host-utils.h"
#include "helper.h"
#include <string.h>
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qemu/timer.h"
#ifdef CONFIG_KVM
#include <linux/kvm.h>
#if !defined(CONFIG_USER_ONLY)
#include "exec/softmmu_exec.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#endif
/* #define DEBUG_HELPER */
#include "cpu.h"
#include "qemu/host-utils.h"
#include "helper.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
void helper_raise_exception(CPUSPARCState *env, int tt)
{
#include "cpu.h"
#include "trace.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define DEBUG_PCALL
#include "disas/disas.h"
#include "tcg-op.h"
#include "qemu/log.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "helper.h"
#define GEN_HELPER 1
#include "qemu-common.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#ifndef MAC_OS_X_VERSION_10_4
#define MAC_OS_X_VERSION_10_4 1040
#include "qemu-common.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#define FONT_HEIGHT 16
#define FONT_WIDTH 8
* THE SOFTWARE.
*/
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "ui/console.h"
#include "qapi/error.h"
*/
#include "keymaps.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
static int get_keysym(const name2keysym_t *table,
const char *name)
#include "qemu-common.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "x_keymap.h"
#include "sdl_zoom.h"
#include <spice-experimental.h>
#include <netdb.h>
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu-common.h"
#include "ui/qemu-spice.h"
#include "qemu/queue.h"
#include "monitor/monitor.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "trace.h"
#include "ui/spice-display.h"
#include "vnc.h"
#include "vnc-jobs.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "qemu/sockets.h"
#include "qemu/timer.h"
#include "qemu/acl.h"
#endif
#ifdef CONFIG_SECCOMP
-#include "qemu-seccomp.h"
+#include "sysemu/seccomp.h"
#endif
#ifdef __sun__
#include "net/slirp.h"
#include "monitor/monitor.h"
#include "ui/console.h"
-#include "sysemu.h"
+#include "sysemu/sysemu.h"
#include "exec/gdbstub.h"
#include "qemu/timer.h"
#include "qemu-char.h"
#include "qemu/cache-utils.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "hw/block-common.h"
#include "migration/block.h"
-#include "dma.h"
+#include "sysemu/dma.h"
#include "audio/audio.h"
#include "migration/migration.h"
-#include "kvm.h"
+#include "sysemu/kvm.h"
#include "qapi/qmp/qjson.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#ifdef CONFIG_VIRTFS
#include "fsdev/qemu-fsdev.h"
#endif
-#include "qtest.h"
+#include "sysemu/qtest.h"
#include "disas/disas.h"
#include "trace.h"
#include "trace/control.h"
#include "qemu/queue.h"
-#include "cpus.h"
-#include "arch_init.h"
+#include "sysemu/cpus.h"
+#include "sysemu/arch_init.h"
#include "qemu/osdep.h"
#include "ui/qemu-spice.h"
#include "qmp-commands.h"
#include "qemu/range.h"
-#include "xen-mapcache.h"
+#include "sysemu/xen-mapcache.h"
#include "trace.h"
#include "exec/address-spaces.h"
#include <sys/resource.h>
#include "hw/xen_backend.h"
-#include "blockdev.h"
+#include "sysemu/blockdev.h"
#include "qemu/bitmap.h"
#include <xen/hvm/params.h>
#include <sys/mman.h>
-#include "xen-mapcache.h"
+#include "sysemu/xen-mapcache.h"
#include "trace.h"
+++ /dev/null
-/*
- * Copyright (C) 2011 Citrix Ltd.
- *
- * This work is licensed under the terms of the GNU GPL, version 2. See
- * the COPYING file in the top-level directory.
- *
- */
-
-#ifndef XEN_MAPCACHE_H
-#define XEN_MAPCACHE_H
-
-#include <stdlib.h>
-
-typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr start_addr,
- ram_addr_t size,
- void *opaque);
-#ifdef CONFIG_XEN
-
-void xen_map_cache_init(phys_offset_to_gaddr_t f,
- void *opaque);
-uint8_t *xen_map_cache(hwaddr phys_addr, hwaddr size,
- uint8_t lock);
-ram_addr_t xen_ram_addr_from_mapcache(void *ptr);
-void xen_invalidate_map_cache_entry(uint8_t *buffer);
-void xen_invalidate_map_cache(void);
-
-#else
-
-static inline void xen_map_cache_init(phys_offset_to_gaddr_t f,
- void *opaque)
-{
-}
-
-static inline uint8_t *xen_map_cache(hwaddr phys_addr,
- hwaddr size,
- uint8_t lock)
-{
- abort();
-}
-
-static inline ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
-{
- abort();
-}
-
-static inline void xen_invalidate_map_cache_entry(uint8_t *buffer)
-{
-}
-
-static inline void xen_invalidate_map_cache(void)
-{
-}
-
-#endif
-
-#endif /* !XEN_MAPCACHE_H */