From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: mttcg@greensocs.com, fred.konrad@greensocs.com
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 [thread overview]
Message-ID: <1439397664-70734-5-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1439397664-70734-1-git-send-email-pbonzini@redhat.com>
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 <pbonzini@redhat.com>
---
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
next prev parent reply other threads:[~2015-08-12 16:41 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 16:40 [Qemu-devel] [PATCH 00/10] translate-all.c thread-safety Paolo Bonzini
2015-08-12 16:40 ` [Qemu-devel] [PATCH 01/10] cpus: protect work list with work_mutex Paolo Bonzini
2015-08-28 14:33 ` Peter Maydell
2015-08-12 16:40 ` [Qemu-devel] [PATCH 02/10] cpus: remove tcg_halt_cond global variable Paolo Bonzini
2015-08-13 13:05 ` Frederic Konrad
2015-08-13 13:08 ` Paolo Bonzini
2015-08-13 13:19 ` Frederic Konrad
2015-08-28 14:36 ` Peter Maydell
2015-08-29 6:52 ` Paolo Bonzini
2015-08-12 16:40 ` [Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex Paolo Bonzini
2015-08-13 12:17 ` Frederic Konrad
2015-08-13 13:12 ` Paolo Bonzini
2015-08-13 13:21 ` Frederic Konrad
2015-08-28 14:49 ` Peter Maydell
2015-08-28 14:53 ` Frederic Konrad
2015-08-29 6:51 ` Paolo Bonzini
2015-08-12 16:40 ` Paolo Bonzini [this message]
2015-08-28 14:53 ` [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header Peter Maydell
2015-08-29 6:55 ` Paolo Bonzini
2015-08-12 16:40 ` [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY Paolo Bonzini
2015-08-13 13:14 ` Frederic Konrad
2015-08-13 14:06 ` Paolo Bonzini
2015-08-28 14:56 ` Peter Maydell
2015-08-29 7:07 ` Paolo Bonzini
2015-08-12 16:40 ` [Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode emulation Paolo Bonzini
2015-08-28 14:57 ` Peter Maydell
2015-08-29 7:13 ` Paolo Bonzini
2015-08-12 16:40 ` [Qemu-devel] [PATCH 07/10] tcg: comment on which functions have to be called with mmap_lock held Paolo Bonzini
2015-08-28 15:33 ` Peter Maydell
2015-08-29 6:57 ` Paolo Bonzini
2015-08-12 16:41 ` [Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses Paolo Bonzini
2015-08-12 20:37 ` Emilio G. Cota
2015-08-13 8:13 ` Paolo Bonzini
2015-08-13 19:50 ` Emilio G. Cota
2015-08-28 15:40 ` Peter Maydell
2015-08-29 6:58 ` Paolo Bonzini
2015-08-12 16:41 ` [Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available Paolo Bonzini
2015-08-28 15:42 ` Peter Maydell
2015-08-12 16:41 ` [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation Paolo Bonzini
2015-08-28 15:59 ` Peter Maydell
2015-08-12 16:41 ` [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held Paolo Bonzini
2015-08-13 12:51 ` Frederic Konrad
2015-08-13 12:59 ` Paolo Bonzini
2015-08-13 13:32 ` Frederic Konrad
2015-08-13 14:39 ` Paolo Bonzini
2015-08-13 15:32 ` Peter Maydell
2015-08-13 16:20 ` Paolo Bonzini
2015-08-12 16:41 ` [Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock Paolo Bonzini
2015-08-13 12:57 ` Frederic Konrad
2015-08-13 13:01 ` Paolo Bonzini
2015-08-13 13:04 ` Frederic Konrad
2015-08-14 9:26 ` [Qemu-devel] [PATCH 00/10] translate-all.c thread-safety Frederic Konrad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439397664-70734-5-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=fred.konrad@greensocs.com \
--cc=mttcg@greensocs.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).