With this set of patches against HEAD, I'm finally able to compile vl.c only once.
Comments? Objections? The patches can be found in: git://repo.or.cz/qemu/blueswirl.git http://repo.or.cz/r/qemu/blueswirl.git Blue Swirl (7): Adjust debug handling Allow various header files to be included from non-CPU code Move cpu_exec_init_all() declaration to qemu-common.h Move KVM and Xen global flags to vl.c Refactor a few architecture dependent pieces in vl.c Refactor CPUState handling out of vl.c Refactor target specific handling, compile vl.c only once Makefile.objs | 12 +- Makefile.target | 13 +- arch_init.c | 509 +++++++++++++++++++++ arch_init.h | 33 ++ balloon.h | 2 - cpu-all.h | 1 - cpus.c | 773 ++++++++++++++++++++++++++++++++ cpus.h | 18 + gdbstub.h | 12 +- hw/xen_machine_pv.c | 3 - kvm-all.c | 2 - kvm.h | 7 +- qemu-common.h | 2 + qemu-options.hx | 309 +++++++------- sysemu.h | 4 - vl.c | 1219 +++------------------------------------------------ 16 files changed, 1570 insertions(+), 1349 deletions(-) create mode 100644 arch_init.c create mode 100644 arch_init.h create mode 100644 cpus.c create mode 100644 cpus.h