qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header.
Date: Wed, 12 Aug 2015 18:40:56 +0200

The header is included from basically everywhere, thanks to cpu.h.
It should be moved to the (TCG only) files that actually need it.
As a start, remove non-TCG stuff.

While adding a #ifndef CONFIG_USER_ONLY include section to cpu-exec.c,
move memory API files under it.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 cpu-exec.c              | 9 ++++++---
 include/exec/exec-all.h | 6 ------
 include/exec/ram_addr.h | 1 +
 include/sysemu/sysemu.h | 3 +++
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/cpu-exec.c b/cpu-exec.c
index c680cca..599e64d 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -22,12 +22,15 @@
 #include "disas/disas.h"
 #include "tcg.h"
 #include "qemu/atomic.h"
-#include "sysemu/qtest.h"
 #include "qemu/timer.h"
+#include "exec/tb-hash.h"
+#include "qemu/rcu.h"
+
+#if !defined(CONFIG_USER_ONLY)
 #include "exec/address-spaces.h"
 #include "exec/memory-internal.h"
-#include "qemu/rcu.h"
-#include "exec/tb-hash.h"
+#include "sysemu/sysemu.h"
+#endif
 
 /* -icount align implementation. */
 
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index dafd177..eb77373 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -92,7 +92,6 @@ void cpu_exec_init(CPUState *cpu, Error **errp);
 void QEMU_NORETURN cpu_loop_exit(CPUState *cpu);
 
 #if !defined(CONFIG_USER_ONLY)
-bool qemu_in_vcpu_thread(void);
 void cpu_reload_memory_map(CPUState *cpu);
 void tcg_cpu_address_space_init(CPUState *cpu, AddressSpace *as);
 /* cputlb.c */
@@ -320,8 +319,6 @@ extern uintptr_t tci_tb_ptr;
 
 #if !defined(CONFIG_USER_ONLY)
 
-void phys_mem_set_alloc(void *(*alloc)(size_t, uint64_t *align));
-
 struct MemoryRegion *iotlb_to_region(CPUState *cpu,
                                      hwaddr index);
 
@@ -346,7 +343,4 @@ extern int singlestep;
 /* cpu-exec.c */
 extern volatile sig_atomic_t exit_request;
 
-#if !defined(CONFIG_USER_ONLY)
-void migration_bitmap_extend(ram_addr_t old, ram_addr_t new);
-#endif
 #endif
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index c113f21..7e7566e 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -249,5 +249,6 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(unsigned 
long *dest,
     return num_dirty;
 }
 
+void migration_bitmap_extend(ram_addr_t old, ram_addr_t new);
 #endif
 #endif
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 44570d1..93a70e3 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -205,6 +205,9 @@ QemuOpts *qemu_get_machine_opts(void);
 bool defaults_enabled(void);
 bool usb_enabled(void);
 
+bool qemu_in_vcpu_thread(void);
+void phys_mem_set_alloc(void *(*alloc)(size_t, uint64_t *align));
+
 extern QemuOptsList qemu_legacy_drive_opts;
 extern QemuOptsList qemu_common_drive_opts;
 extern QemuOptsList qemu_drive_opts;
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]