[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header. |
Date: |
Fri, 28 Aug 2015 15:53:42 +0100 |
On 12 August 2015 at 17:40, Paolo Bonzini <address@hidden> wrote:
> 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>
> --- 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
> --- 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;
sysemu.h is a bit of a huge grab-bag of stuff, so it seems
a shame to put qemu_in_vcpu_thread() into it, given that
(a) that function is only used by a couple of files and
(b) the files that do want that function don't want most of
what's in sysemu.h...
thanks
-- PMM
- Re: [Qemu-devel] [PATCH 07/10] tcg: comment on which functions have to be called with mmap_lock held, (continued)
- [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header., Paolo Bonzini, 2015/08/12
- Re: [Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header.,
Peter Maydell <=
- [Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode emulation, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/12