diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-03-29 19:23:47 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-03-29 19:23:47 +0000 |
commit | 1c14f162dd92c0448948791531dc82ac277330ae (patch) | |
tree | 6d3acf8ca007935e6289ad82b744f97af1f4dafe | |
parent | 54fc6ea92bdd698498706d3cd8e10afd78680bed (diff) |
Allow various header files to be included from non-CPU code
Allow balloon.h, gdbstub.h and kvm.h to be included from
non-CPU code.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | balloon.h | 2 | ||||
-rw-r--r-- | gdbstub.h | 12 | ||||
-rw-r--r-- | kvm.h | 7 |
3 files changed, 13 insertions, 8 deletions
@@ -14,8 +14,6 @@ #ifndef _QEMU_BALLOON_H #define _QEMU_BALLOON_H -#include "cpu-defs.h" - typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target, MonitorCompletion cb, void *cb_data); @@ -10,6 +10,7 @@ #define GDB_WATCHPOINT_READ 3 #define GDB_WATCHPOINT_ACCESS 4 +#ifdef NEED_CPU_H typedef void (*gdb_syscall_complete_cb)(CPUState *env, target_ulong ret, target_ulong err); @@ -21,10 +22,7 @@ int gdb_queuesig (void); int gdb_handlesig (CPUState *, int); void gdb_exit(CPUState *, int); void gdb_signalled(CPUState *, int); -int gdbserver_start(int); void gdbserver_fork(CPUState *); -#else -int gdbserver_start(const char *port); #endif /* Get or set a register. Returns the size of the register. */ typedef int (*gdb_reg_cb)(CPUState *env, uint8_t *buf, int reg); @@ -33,3 +31,11 @@ void gdb_register_coprocessor(CPUState *env, int num_regs, const char *xml, int g_pos); #endif + +#ifdef CONFIG_USER_ONLY +int gdbserver_start(int); +#else +int gdbserver_start(const char *port); +#endif + +#endif @@ -14,12 +14,12 @@ #ifndef QEMU_KVM_H #define QEMU_KVM_H -#include "config.h" +#include "config-host.h" #include "qemu-queue.h" -#ifdef CONFIG_KVM extern int kvm_allowed; +#ifdef CONFIG_KVM #define kvm_enabled() (kvm_allowed) #else #define kvm_enabled() (0) @@ -31,6 +31,7 @@ struct kvm_run; int kvm_init(int smp_cpus); +#ifdef NEED_CPU_H int kvm_init_vcpu(CPUState *env); int kvm_cpu_exec(CPUState *env); @@ -160,5 +161,5 @@ static inline void cpu_synchronize_post_init(CPUState *env) kvm_cpu_synchronize_post_init(env); } } - +#endif #endif |