On 12 August 2015 at 17:40, Paolo Bonzini <pbonz...@redhat.com> 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 <pbonz...@redhat.com>
> --- 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