/* By Dang Hoang Vu , 2015 */ #ifndef UC_QEMU_H #define UC_QEMU_H struct uc_struct; #define OPC_BUF_SIZE 640 #include "sysemu/sysemu.h" #include "sysemu/cpus.h" #include "exec/cpu-common.h" #include "exec/memory.h" #include "qemu/thread.h" #include "include/qom/cpu.h" #include "vl.h" // This struct was originally from qemu/include/exec/cpu-all.h // Temporarily moved here since there is circular inclusion. typedef struct { MemoryRegion *mr; void *buffer; hwaddr addr; hwaddr len; bool in_use; } BounceBuffer; // Moved here to allow a concrete type in the uc_struct. /* * We divide code_gen_buffer into equally-sized "regions" that TCG threads * dynamically allocate from as demand dictates. Given appropriate region * sizing, this minimizes flushes even when some TCG threads generate a lot * more code than others. */ struct tcg_region_state { //QemuMutex lock; /* fields set at init time */ void *start; void *start_aligned; void *end; size_t n; size_t size; /* size of one region */ size_t stride; /* .size + guard size */ /* fields protected by the lock */ size_t current; /* current region index */ size_t agg_size_full; /* aggregate size of full regions */ }; #endif