All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.7 00/49] NEED_CPU_H / cpu.h / hw/hw.h cleanups
@ 2016-04-08 20:28 Paolo Bonzini
  2016-04-08 20:28 ` [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions Paolo Bonzini
                   ` (51 more replies)
  0 siblings, 52 replies; 72+ messages in thread
From: Paolo Bonzini @ 2016-04-08 20:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, peter.maydell

(CCs only on cover letter due to huge series).

I am sending this now because of vacation coming soon (yay!).
This series removes usage of NEED_CPU_H from several central
include files in QEMU, most notably hw/hw.h and qemu-common.h.
Definitions conditional on NEED_CPU_H remain only in disas/disas.h,
exec/gdbstub.h, exec/helper-head.h and exec/log.h.

The interesting patches are interspersed with other miscellaenous
cleanups that I won't really dwell on in the cover letter.  Most
of them are just making indirect inclusions explicit.

Patches 5 to 27 make sure that target-independent code can access
QOM objects for the CPU through an opaque type.  This is useful
because often target-independent code uses a target-specific header
file that happens to use pointers to ARMCPU* or similar.  The
target-independent code itself does not use the pointed-to object,
but the very presenece of the ARMCPU* name means that all users of
that header have to bring in cpu.h.  By providing the opaque type,
a much smaller API can be exposed to all these users in hw/.

Patches 34 to 37 remove NEED_CPU_H from hw/hw.h, exec/memory.h
and exec/cpu-common.h.

Patches 38 and 39 remove two nested inclusions from qemu-common.h.
This should make Markus's patch to remove unnecessary qemu-common.h
inclusions even more effective.

Patches 42 and 43 disentangle qemu-common.h and cpu.h, so that all
users of the latter have to be explicit.  This has the biggest
effect on reducing include pollution (the next offender is now
exec/cpu-common.h).

Patches 46 to 50 remove more nested inclusions, and especially:
1) the inclusion of the (TCG-specific) exec-all.h header from
cpu.h, so that non-TCG functions cannot anymore creep into
exec-all.h; 2) indirect qemu-common.h inclusion in hw/hw.h.

At the end, hw/hw.h includes 13 fewer headers indirectly compared
to before when NEED_CPU_H is not defined, and 27 fewer headers
when NEED_CPU_H is defined.  This was found with the script of
patch 1, which produces the following statistics:

Compiled 3979 files                         | After: 4006 (nmi.o now built per target)
3773 files include qemu-common.h            | After: 3702 (-71)
1658 files include hw/hw.h                  | After: 1589 (-69)
3101 files include cpu.h                    | After: 2337 (-764, -25%!)
3800 files include qapi-types.h             | After: 3811 (+11, mostly from nmi.c)
 844 files include generated-tracers.h      | After: 844
1270 files include qapi/error.h             | After: 1297 (+27, from nmi.c)
1996 files include block/aio.h              | After: 1647 (-349, -18%)
3544 files include qom/object.h             | After: 3514 (-30)
3451 files include exec/memory.h            | After: 3540 (+89, from indirect inclusions)
3840 files include fpu/softfloat.h          | After: 3701 (-139)
3783 files include qemu/bswap.h             | After: 3644 (-139)
                                            |
osdep.h:                                    | After: (adds exec/poison.h)
lines    bytes   files   source             | lines    bytes   files   source
174      4944    3       QEMU               | 226      5217    4       QEMU
17460    440677  157     total              | 17512    440950  158     total
                                            |
qemu-common.h:                              | After:
lines    bytes   files   source             | lines    bytes   files   source
7037     160007  14      QEMU               | 5919     132798  12      QEMU
24323    595740  168     total              | 23205    568531  166     total
                                            |
hw/hw.h:                                    | After:
lines    bytes   files   source             | lines    bytes   files   source
9714     228659  36      QEMU               | 8458     201740  24      QEMU
27052    665298  192     total              | 25796    638379  180     total
                                            |
target-i386/cpu.h:                          | After:
lines    bytes   files   source             | lines    bytes   files   source
11259    270041  41      QEMU               | 10981    263615  39      QEMU
28597    706680  197     total              | 28319    700254  195     total
                                            |
hw/hw.h + NEED_CPU_H:                       | After:
lines    bytes   files   source             | lines    bytes   files   source
12340    294661  50      QEMU               | 8407     201467  23      QEMU
29678    731300  206     total              | 25745    638106  179     total

The next objectives should be removing unnecessary inclusions from/of
qemu-common.h (or delete it altogether) and exec/cpu-common.h.

Paolo

Paolo Bonzini (50):
  scripts: add script to build QEMU and analyze inclusions
  include: move CPU-related definitions out of qemu-common.h
  log: do not use CONFIG_USER_ONLY
  cpu: make cpu-qom.h only include-able from cpu.h
  target-alpha: make cpu-qom.h not target specific
  target-arm: make cpu-qom.h not target specific
  target-cris: make cpu-qom.h not target specific
  target-i386: make cpu-qom.h not target specific
  target-lm32: make cpu-qom.h not target specific
  target-m68k: make cpu-qom.h not target specific
  target-microblaze: make cpu-qom.h not target specific
  target-mips: make cpu-qom.h not target specific
  target-ppc: do not use target_ulong in cpu-qom.h
  target-ppc: make cpu-qom.h not target specific
  target-s390x: make cpu-qom.h not target specific
  target-sh4: make cpu-qom.h not target specific
  target-sparc: make cpu-qom.h not target specific
  target-tricore: make cpu-qom.h not target specific
  target-unicore32: make cpu-qom.h not target specific
  target-xtensa: make cpu-qom.h not target specific
  arm: include cpu-qom.h in files that require ARMCPU
  m68k: include cpu-qom.h in files that require M68KCPU
  sh4: include cpu-qom.h in files that require SuperHCPU
  alpha: include cpu-qom.h in files that require AlphaCPU
  mips: use MIPSCPU instead of CPUMIPSState
  ppc: use PowerPCCPU instead of CPUPPCState
  arm: remove useless cpu.h inclusion
  explicitly include qom/cpu.h
  explicitly include hw/qdev-core.h
  explicitly include linux/kvm.h
  apic: move target-dependent definitions to cpu.h
  include: poison symbols in osdep.h
  hw: do not use VMSTATE_*TL
  hw: move CPU state serialization to migration/cpu.h
  hw: cannot include hw/hw.h from user emulation
  cpu: move endian-dependent load/store functions to cpu-all.h
  qemu-common: stop including qemu/bswap.h from qemu-common.h
  qemu-common: stop including qemu/host-utils.h from qemu-common.h
  gdbstub: remove includes from gdbstub-xml.c
  dma: do not depend on kvm_enabled()
  s390x: move stuff out of cpu.h
  acpi: do not use TARGET_PAGE_SIZE
  qemu-common: push cpu.h inclusion out of qemu-common.h
  arm: move arm_log_exception into .c file
  mips: move CP0 functions out of cpu.h
  hw: explicitly include qemu/log.h
  exec: extract exec/tb-context.h
  cpu: move exec-all.h inclusion out of cpu.h
  hw: remove pio_addr_t
  hw: clean up hw/hw.h includes

 arch_init.c                                 |   2 +
 audio/mixeng.c                              |   1 +
 audio/noaudio.c                             |   1 +
 audio/wavaudio.c                            |   2 +-
 block/bochs.c                               |   1 +
 block/cloop.c                               |   1 +
 block/parallels.c                           |   1 +
 block/qcow.c                                |   1 +
 block/qcow2-cluster.c                       |   1 +
 block/qcow2-refcount.c                      |   1 +
 block/qcow2-snapshot.c                      |   1 +
 block/qcow2.c                               |   1 +
 block/qed-table.c                           |   1 +
 block/qed.c                                 |   1 +
 block/vdi.c                                 |   1 +
 block/vhdx-endian.c                         |   1 +
 block/vhdx-log.c                            |   1 +
 block/vhdx.c                                |   1 +
 block/vmdk.c                                |   1 +
 block/vpc.c                                 |   1 +
 block/vvfat.c                               |   1 +
 bootdevice.c                                |   1 +
 bsd-user/main.c                             |   2 +
 bsd-user/qemu.h                             |   1 +
 contrib/ivshmem-server/ivshmem-server.c     |   1 +
 cpu-exec-common.c                           |   1 +
 cpu-exec.c                                  |   1 +
 cpus.c                                      |   4 +-
 cputlb.c                                    |   1 +
 crypto/afsplit.c                            |   1 +
 crypto/block-luks.c                         |   1 +
 device_tree.c                               |   1 +
 disas/tci.c                                 |   1 +
 exec.c                                      |  25 ++--
 gdbstub.c                                   |   3 +-
 hw/acpi/core.c                              |   6 +
 hw/acpi/nvdimm.c                            |  22 ++--
 hw/acpi/piix4.c                             |   1 +
 hw/alpha/alpha_sys.h                        |   1 +
 hw/alpha/pci.c                              |   1 -
 hw/arm/ast2400.c                            |   1 +
 hw/arm/collie.c                             |   1 +
 hw/arm/nseries.c                            |   3 +
 hw/arm/palmetto-bmc.c                       |   1 +
 hw/arm/pxa2xx_gpio.c                        |   2 +
 hw/arm/stellaris.c                          |   1 +
 hw/arm/stm32f205_soc.c                      |   1 -
 hw/arm/strongarm.c                          |   1 +
 hw/arm/strongarm.h                          |   1 +
 hw/arm/xlnx-ep108.c                         |   1 +
 hw/audio/pl041.c                            |   1 +
 hw/block/hd-geometry.c                      |   1 +
 hw/block/m25p80.c                           |   1 +
 hw/block/pflash_cfi01.c                     |   1 +
 hw/bt/hci-csr.c                             |   1 +
 hw/bt/l2cap.c                               |   1 +
 hw/bt/sdp.c                                 |   1 +
 hw/char/bcm2835_aux.c                       |   1 +
 hw/char/cadence_uart.c                      |   4 +
 hw/char/digic-uart.c                        |   1 +
 hw/char/imx_serial.c                        |   1 +
 hw/char/pl011.c                             |   1 +
 hw/char/stm32f2xx_usart.c                   |   1 +
 hw/core/Makefile.objs                       |   2 +-
 hw/core/nmi.c                               |   5 +
 hw/core/sysbus.c                            |   4 +-
 hw/cpu/a9mpcore.c                           |   1 +
 hw/display/bcm2835_fb.c                     |   1 +
 hw/display/cg3.c                            |   2 +
 hw/display/pl110.c                          |   1 +
 hw/display/tc6393xb.c                       |   1 +
 hw/display/virtio-gpu.c                     |   1 +
 hw/dma/bcm2835_dma.c                        |   1 +
 hw/dma/pl080.c                              |   1 +
 hw/dma/pl330.c                              |   1 +
 hw/dma/rc4030.c                             |   1 +
 hw/gpio/gpio_key.c                          |   1 +
 hw/gpio/imx_gpio.c                          |   1 +
 hw/gpio/pl061.c                             |   1 +
 hw/i2c/imx_i2c.c                            |   1 +
 hw/i2c/versatile_i2c.c                      |   1 +
 hw/i386/kvm/apic.c                          |   2 +
 hw/i386/kvm/clock.c                         |   1 +
 hw/i386/kvm/i8254.c                         |   1 +
 hw/i386/kvm/pci-assign.c                    |   1 +
 hw/i386/kvmvapic.c                          |   3 +
 hw/input/pl050.c                            |   1 +
 hw/intc/allwinner-a10-pic.c                 |   1 +
 hw/intc/apic.c                              |   2 +
 hw/intc/apic_common.c                       |   2 +
 hw/intc/arm_gic.c                           |   1 +
 hw/intc/arm_gic_kvm.c                       |   2 +
 hw/intc/arm_gicv2m.c                        |   2 +
 hw/intc/armv7m_nvic.c                       |   2 +
 hw/intc/bcm2835_ic.c                        |   1 +
 hw/intc/bcm2836_control.c                   |   1 +
 hw/intc/i8259.c                             |   1 +
 hw/intc/imx_avic.c                          |   1 +
 hw/intc/ioapic.c                            |   1 +
 hw/intc/openpic.c                           |   1 +
 hw/intc/openpic_kvm.c                       |   2 +
 hw/intc/pl190.c                             |   1 +
 hw/intc/s390_flic_kvm.c                     |   2 +
 hw/isa/lpc_ich9.c                           |   1 +
 hw/mips/cps.c                               |   7 +-
 hw/mips/cputimer.c                          |   4 +-
 hw/mips/mips_fulong2e.c                     |   4 +-
 hw/mips/mips_int.c                          |   3 +-
 hw/mips/mips_jazz.c                         |   4 +-
 hw/mips/mips_malta.c                        |   5 +-
 hw/mips/mips_mipssim.c                      |   4 +-
 hw/mips/mips_r4k.c                          |   4 +-
 hw/misc/arm11scu.c                          |   1 +
 hw/misc/arm_integrator_debug.c              |   1 +
 hw/misc/arm_l2x0.c                          |   1 +
 hw/misc/arm_sysctl.c                        |   1 +
 hw/misc/bcm2835_mbox.c                      |   1 +
 hw/misc/bcm2835_property.c                  |   1 +
 hw/misc/imx25_ccm.c                         |   1 +
 hw/misc/imx31_ccm.c                         |   1 +
 hw/misc/imx6_ccm.c                          |   1 +
 hw/misc/imx_ccm.c                           |   1 +
 hw/misc/macio/cuda.c                        |   1 +
 hw/misc/macio/mac_dbdma.c                   |   1 +
 hw/misc/mips_cmgcr.c                        |   1 +
 hw/misc/mips_cpc.c                          |   2 +
 hw/misc/mips_itu.c                          |   3 +
 hw/misc/stm32f2xx_syscfg.c                  |   1 +
 hw/misc/zynq-xadc.c                         |   1 +
 hw/misc/zynq_slcr.c                         |   1 +
 hw/net/allwinner_emac.c                     |   1 +
 hw/net/fsl_etsec/etsec.c                    |   1 +
 hw/net/fsl_etsec/rings.c                    |   2 +-
 hw/net/imx_fec.c                            |   1 +
 hw/net/lan9118.c                            |   1 +
 hw/net/spapr_llan.c                         |   9 +-
 hw/pci-host/apb.c                           |   1 +
 hw/pci-host/versatile.c                     |   1 +
 hw/ppc/e500plat.c                           |   1 +
 hw/ppc/ppc.c                                |  20 +--
 hw/ppc/ppc4xx_devs.c                        |   1 +
 hw/ppc/prep.c                               |   1 +
 hw/ppc/spapr.c                              |   1 +
 hw/ppc/spapr_hcall.c                        |   3 +
 hw/ppc/spapr_iommu.c                        |   1 +
 hw/ppc/spapr_rtas.c                         |   2 +
 hw/ppc/spapr_vio.c                          |   3 +-
 hw/ppc/virtex_ml507.c                       |   1 +
 hw/s390x/css.c                              |   4 +-
 hw/s390x/s390-skeys.c                       |   1 +
 hw/s390x/s390-virtio-ccw.c                  |   4 +-
 hw/s390x/virtio-ccw.c                       |   5 +-
 hw/s390x/virtio-ccw.h                       |   3 +-
 hw/sd/pl181.c                               |   1 +
 hw/sd/sd.c                                  |   1 +
 hw/sd/sdhci.c                               |   1 +
 hw/sh4/sh7750.c                             |   1 +
 hw/ssi/pl022.c                              |   1 +
 hw/timer/allwinner-a10-pit.c                |   1 +
 hw/timer/arm_timer.c                        |   1 +
 hw/timer/digic-timer.c                      |   1 +
 hw/timer/imx_epit.c                         |   1 +
 hw/timer/imx_gpt.c                          |   1 +
 hw/timer/pl031.c                            |   1 +
 hw/timer/stm32f2xx_timer.c                  |   1 +
 hw/vfio/common.c                            |   3 +
 hw/watchdog/wdt_diag288.c                   |   1 +
 hw/xtensa/pic_cpu.c                         |   1 +
 include/disas/disas.h                       |   2 +
 include/exec/cpu-all.h                      |  25 ++++
 include/exec/cpu-common.h                   |  14 --
 include/exec/cpu-defs.h                     |   1 +
 include/exec/exec-all.h                     |  56 +-------
 include/exec/gdbstub.h                      |   2 +
 include/exec/helper-head.h                  |  23 ++--
 include/exec/hwaddr.h                       |   2 +
 include/exec/ioport.h                       |  19 +--
 include/exec/memory.h                       |  17 ---
 include/exec/poison.h                       |   8 --
 include/exec/tb-context.h                   |  46 +++++++
 include/hw/acpi/acpi.h                      |   7 -
 include/hw/arm/arm.h                        |   2 +-
 include/hw/arm/digic.h                      |   1 -
 include/hw/arm/exynos4210.h                 |   1 +
 include/hw/arm/omap.h                       |   1 +
 include/hw/arm/pxa.h                        |   1 +
 include/hw/arm/virt-acpi-build.h            |   1 +
 include/hw/arm/virt.h                       |   1 +
 include/hw/hw.h                             |  60 +--------
 include/hw/i386/apic.h                      |   5 -
 include/hw/isa/isa.h                        |   2 +-
 include/hw/m68k/mcf.h                       |   2 +
 include/hw/mips/cpudevs.h                   |   7 +-
 include/hw/ppc/openpic.h                    |   3 +-
 include/hw/ppc/ppc.h                        |  24 ++--
 include/hw/ppc/spapr_vio.h                  |   2 +-
 {hw => include/hw}/s390x/css.h              |  31 ++++-
 {target-s390x => include/hw/s390x}/ioinst.h |  16 +--
 include/hw/sd/sd.h                          |   2 +
 include/hw/sh4/sh.h                         |   1 +
 include/hw/sysbus.h                         |   4 +-
 include/hw/xen/xen.h                        |   7 +-
 include/migration/cpu.h                     |  48 +++++++
 include/qemu-common.h                       |  32 -----
 include/qemu/log.h                          |  17 +--
 include/qemu/osdep.h                        |   2 +
 include/qemu/timer.h                        |   2 +-
 include/qom/cpu.h                           |  19 +++
 include/sysemu/cpus.h                       |  13 ++
 include/sysemu/dma.h                        |   5 +-
 include/sysemu/kvm.h                        |   1 +
 io/channel-websock.c                        |   1 +
 ioport.c                                    |  14 +-
 kvm-stub.c                                  |   1 -
 linux-user/main.c                           |   2 +
 linux-user/qemu.h                           |   1 +
 memory.c                                    |   2 +
 migration/ram.c                             |   2 +
 migration/savevm.c                          |   1 +
 monitor.c                                   |   4 +
 nbd/nbd-internal.h                          |   1 +
 page_cache.c                                |   1 +
 qemu-nbd.c                                  |   1 +
 qtest.c                                     |   2 +
 scripts/analyze-inclusions                  |  89 +++++++++++++
 scripts/create_config                       |   2 +-
 scripts/feature_to_c.sh                     |   3 -
 scripts/tracetool/format/tcg_helper_c.py    |   1 +
 slirp/slirp.h                               |   1 +
 stubs/cpu-get-icount.c                      |   1 +
 stubs/slirp.c                               |   1 +
 target-alpha/cpu-qom.h                      |  41 +-----
 target-alpha/cpu.c                          |   1 +
 target-alpha/cpu.h                          |  44 ++++++-
 target-alpha/fpu_helper.c                   |   1 +
 target-alpha/gdbstub.c                      |   1 +
 target-alpha/helper.c                       |   1 +
 target-alpha/int_helper.c                   |   1 +
 target-alpha/machine.c                      |   3 +
 target-alpha/mem_helper.c                   |   1 +
 target-alpha/sys_helper.c                   |   1 +
 target-alpha/translate.c                    |   1 +
 target-alpha/vax_helper.c                   |   1 +
 target-arm/arm_ldst.h                       |   1 +
 target-arm/cpu-qom.h                        | 178 +------------------------
 target-arm/cpu.c                            |   1 +
 target-arm/cpu.h                            | 181 +++++++++++++++++++++++++-
 target-arm/gdbstub.c                        |   1 +
 target-arm/gdbstub64.c                      |   1 +
 target-arm/helper-a64.c                     |   1 +
 target-arm/helper.c                         |  16 +++
 target-arm/internals.h                      |  15 ---
 target-arm/kvm-stub.c                       |   1 +
 target-arm/kvm32.c                          |   2 +-
 target-arm/kvm64.c                          |   2 +-
 target-arm/machine.c                        |   3 +
 target-arm/op_helper.c                      |   1 +
 target-arm/psci.c                           |   2 +-
 target-arm/translate-a64.c                  |   1 +
 target-arm/translate.c                      |   1 +
 target-cris/cpu-qom.h                       |  40 +-----
 target-cris/cpu.c                           |   1 +
 target-cris/cpu.h                           |  43 +++++-
 target-cris/gdbstub.c                       |   1 +
 target-cris/helper.c                        |   1 +
 target-cris/machine.c                       |   3 +
 target-cris/mmu.c                           |   1 +
 target-cris/op_helper.c                     |   1 +
 target-cris/translate.c                     |   1 +
 target-i386/bpt_helper.c                    |   1 +
 target-i386/cpu-qom.h                       |  98 +-------------
 target-i386/cpu.c                           |   3 +-
 target-i386/cpu.h                           | 107 ++++++++++++++-
 target-i386/excp_helper.c                   |   1 +
 target-i386/fpu_helper.c                    |   1 +
 target-i386/gdbstub.c                       |   1 +
 target-i386/helper.c                        |   1 +
 target-i386/int_helper.c                    |   1 +
 target-i386/kvm-stub.c                      |   1 +
 target-i386/kvm.c                           |   2 +-
 target-i386/machine.c                       |   6 +
 target-i386/mem_helper.c                    |   1 +
 target-i386/misc_helper.c                   |   1 +
 target-i386/mpx_helper.c                    |   1 +
 target-i386/seg_helper.c                    |   1 +
 target-i386/svm_helper.c                    |   1 +
 target-i386/translate.c                     |   1 +
 target-lm32/cpu-qom.h                       |  42 +-----
 target-lm32/cpu.c                           |   1 +
 target-lm32/cpu.h                           |  46 ++++++-
 target-lm32/gdbstub.c                       |   1 +
 target-lm32/helper.c                        |   1 +
 target-lm32/machine.c                       |   3 +
 target-lm32/op_helper.c                     |   1 +
 target-lm32/translate.c                     |   1 +
 target-m68k/cpu-qom.h                       |  34 +----
 target-m68k/cpu.c                           |   1 +
 target-m68k/cpu.h                           |  38 +++++-
 target-m68k/gdbstub.c                       |   1 +
 target-m68k/helper.c                        |   1 +
 target-m68k/m68k-semi.c                     |   1 +
 target-m68k/op_helper.c                     |   1 +
 target-m68k/translate.c                     |   1 +
 target-microblaze/cpu-qom.h                 |  44 +------
 target-microblaze/cpu.c                     |   1 +
 target-microblaze/cpu.h                     |  47 ++++++-
 target-microblaze/gdbstub.c                 |   1 +
 target-microblaze/helper.c                  |   1 +
 target-microblaze/mmu.c                     |   1 +
 target-microblaze/op_helper.c               |   1 +
 target-microblaze/translate.c               |   1 +
 target-mips/cpu-qom.h                       |  37 +-----
 target-mips/cpu.c                           |   1 +
 target-mips/cpu.h                           | 171 ++++++------------------
 target-mips/gdbstub.c                       |   1 +
 target-mips/helper.c                        | 126 ++++++++++++++++++
 target-mips/kvm.c                           |   2 +-
 target-mips/machine.c                       |   4 +-
 target-mips/mips-semi.c                     |   1 +
 target-mips/msa_helper.c                    |   1 +
 target-mips/op_helper.c                     |   1 +
 target-mips/translate.c                     |   1 +
 target-moxie/cpu.c                          |   1 +
 target-moxie/cpu.h                          |   1 -
 target-moxie/machine.c                      |   3 +
 target-openrisc/cpu.c                       |   1 +
 target-openrisc/cpu.h                       |   2 -
 target-openrisc/exception.c                 |   1 +
 target-openrisc/gdbstub.c                   |   1 +
 target-openrisc/interrupt.c                 |   1 +
 target-openrisc/interrupt_helper.c          |   1 +
 target-openrisc/machine.c                   |   3 +
 target-openrisc/mmu.c                       |   1 +
 target-openrisc/mmu_helper.c                |   1 +
 target-openrisc/sys_helper.c                |   1 +
 target-ppc/cpu-qom.h                        | 165 +++++++++++++++--------
 target-ppc/cpu.h                            | 166 ++++++++---------------
 target-ppc/excp_helper.c                    |   1 +
 target-ppc/gdbstub.c                        |   1 +
 target-ppc/int_helper.c                     |   1 +
 target-ppc/kvm-stub.c                       |   1 +
 target-ppc/kvm.c                            |   2 +-
 target-ppc/machine.c                        |   5 +
 target-ppc/mem_helper.c                     |   2 +
 target-ppc/misc_helper.c                    |   1 +
 target-ppc/mmu-hash32.c                     |   3 +-
 target-ppc/mmu-hash32.h                     |   2 +-
 target-ppc/mmu-hash64.c                     |   3 +-
 target-ppc/mmu-hash64.h                     |   2 +-
 target-ppc/mmu_helper.c                     |   1 +
 target-ppc/timebase_helper.c                |   1 +
 target-ppc/translate.c                      |   1 +
 target-ppc/translate_init.c                 |  92 ++++++-------
 target-s390x/cc_helper.c                    |   1 +
 target-s390x/cpu-qom.h                      |  46 +------
 target-s390x/cpu.c                          |   4 +-
 target-s390x/cpu.h                          | 166 ++++++++++-------------
 target-s390x/fpu_helper.c                   |   1 +
 target-s390x/gdbstub.c                      |   2 +
 target-s390x/helper.c                       |   2 +
 target-s390x/int_helper.c                   |   1 +
 target-s390x/interrupt.c                    |  64 +++++++++
 target-s390x/ioinst.c                       |   2 +-
 target-s390x/kvm.c                          |   2 +-
 target-s390x/mem_helper.c                   |   4 +
 target-s390x/misc_helper.c                  |   3 +-
 target-s390x/translate.c                    |   1 +
 target-sh4/cpu-qom.h                        |  31 +----
 target-sh4/cpu.c                            |   1 +
 target-sh4/cpu.h                            |  34 ++++-
 target-sh4/gdbstub.c                        |   1 +
 target-sh4/helper.c                         |   1 +
 target-sh4/op_helper.c                      |   1 +
 target-sh4/translate.c                      |   1 +
 target-sparc/cpu-qom.h                      |  38 +-----
 target-sparc/cpu.c                          |   1 +
 target-sparc/cpu.h                          |  40 +++++-
 target-sparc/gdbstub.c                      |   1 +
 target-sparc/helper.c                       |   1 +
 target-sparc/ldst_helper.c                  |   1 +
 target-sparc/machine.c                      |   6 +
 target-sparc/mmu_helper.c                   |   1 +
 target-sparc/translate.c                    |   1 +
 target-tilegx/cpu.c                         |   1 +
 target-tilegx/cpu.h                         |   2 -
 target-tilegx/helper.c                      |   1 +
 target-tilegx/translate.c                   |   1 +
 target-tricore/cpu-qom.h                    |  28 +---
 target-tricore/cpu.c                        |   1 +
 target-tricore/cpu.h                        |  32 ++++-
 target-tricore/helper.c                     |   1 +
 target-tricore/op_helper.c                  |   1 +
 target-tricore/translate.c                  |   1 +
 target-unicore32/cpu-qom.h                  |  30 +----
 target-unicore32/cpu.c                      |   1 +
 target-unicore32/cpu.h                      |  32 ++++-
 target-unicore32/helper.c                   |   1 +
 target-unicore32/op_helper.c                |   1 +
 target-unicore32/softmmu.c                  |   1 +
 target-unicore32/translate.c                |   1 +
 target-xtensa/cpu-qom.h                     | 194 ++++++++++++++++++++++-----
 target-xtensa/cpu.c                         |   1 +
 target-xtensa/cpu.h                         | 195 +++++-----------------------
 target-xtensa/gdbstub.c                     |   2 +
 target-xtensa/op_helper.c                   |   1 +
 target-xtensa/translate.c                   |   1 +
 tcg/optimize.c                              |   3 +-
 tcg/tcg-common.c                            |   2 +
 tcg/tcg-op.c                                |   3 +
 tcg/tcg.c                                   |   5 +
 tcg/tcg.h                                   |  23 ++++
 tests/ide-test.c                            |   1 +
 tests/libqos/malloc.c                       |   1 +
 translate-all.c                             |   1 +
 translate-common.c                          |   1 +
 ui/vnc-ws.c                                 |   1 +
 user-exec.c                                 |   1 +
 util/buffer.c                               |   1 +
 util/log.c                                  |  12 +-
 vl.c                                        |   2 +
 xen-hvm.c                                   |   8 +-
 421 files changed, 2214 insertions(+), 1745 deletions(-)
 create mode 100644 include/exec/tb-context.h
 rename {hw => include/hw}/s390x/css.h (76%)
 rename {target-s390x => include/hw/s390x}/ioinst.h (87%)
 create mode 100644 include/migration/cpu.h
 create mode 100644 scripts/analyze-inclusions

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 72+ messages in thread
* [Qemu-devel] [PATCH CFT v3 00/50] NEED_CPU_H / cpu.h / hw/hw.h cleanups
@ 2016-05-16 15:35 Paolo Bonzini
  2016-05-16 15:35 ` [Qemu-devel] [PATCH 06/50] target-arm: make cpu-qom.h not target specific Paolo Bonzini
  0 siblings, 1 reply; 72+ messages in thread
From: Paolo Bonzini @ 2016-05-16 15:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, Cornelia Huck

This series removes usage of NEED_CPU_H from several central
include files in QEMU, most notably hw/hw.h and qemu-common.h.
Definitions conditional on NEED_CPU_H remain only in disas/disas.h,
exec/gdbstub.h, exec/helper-head.h and exec/log.h.

The interesting patches are interspersed with other miscellaenous
cleanups that I won't really dwell on in the cover letter; the main
changes are:

- make sure that target-independent code can access QOM objects
for the CPU through an opaque type.  This is useful because often
target-independent code uses a header file that happens to include
pointers to ARMCPU* or similar.  The target-independent code itself does
not use the pointed-to object, but the very presenece of the ARMCPU*
name means that all users of that header have to bring in cpu.h.
By providing the opaque type, a much smaller API can be exposed to all
these users in hw/ without doing complex surgery to split the header file.

- remove NEED_CPU_H from hw/hw.h, exec/memory.h and exec/cpu-common.h.

- remove three nested inclusions from qemu-common.h, including cpu.h

- remove inclusion of exec-all.h (TCG-specific) from cpu.h

- remove indirect inclusion of qemu-common.h from hw/hw.h

The next objectives should be removing unnecessary inclusions from/of
qemu-common.h (or delete it altogether) and exec/cpu-common.h.

I compiled this on x64 Linux (all patches) and 32-bit ARM
Linux, and I will compile it on Win32 before sending a pull
request.  I would appreciate people compile-testing it on s390
and PPC.  The changes are available in the git repository at
git://github.com/bonzini/qemu.git, branch need-cpu-h (SHA1 for the top
commit is b65f2d57b126883367fb81d54f383352b24029b1).

There were very few comments on v2, so the series is more or less
the same, just rebased.  I made some s390 functions static and
tweaked the script in patch 1.

Paolo Bonzini (50):
  scripts: add script to build QEMU and analyze inclusions
  include: move CPU-related definitions out of qemu-common.h
  log: do not use CONFIG_USER_ONLY
  cpu: make cpu-qom.h only include-able from cpu.h
  target-alpha: make cpu-qom.h not target specific
  target-arm: make cpu-qom.h not target specific
  target-cris: make cpu-qom.h not target specific
  target-i386: make cpu-qom.h not target specific
  target-lm32: make cpu-qom.h not target specific
  target-m68k: make cpu-qom.h not target specific
  target-microblaze: make cpu-qom.h not target specific
  target-mips: make cpu-qom.h not target specific
  target-ppc: do not use target_ulong in cpu-qom.h
  target-ppc: make cpu-qom.h not target specific
  target-s390x: make cpu-qom.h not target specific
  target-sh4: make cpu-qom.h not target specific
  target-sparc: make cpu-qom.h not target specific
  target-tricore: make cpu-qom.h not target specific
  target-unicore32: make cpu-qom.h not target specific
  target-xtensa: make cpu-qom.h not target specific
  arm: include cpu-qom.h in files that require ARMCPU
  m68k: include cpu-qom.h in files that require M68KCPU
  sh4: include cpu-qom.h in files that require SuperHCPU
  alpha: include cpu-qom.h in files that require AlphaCPU
  mips: use MIPSCPU instead of CPUMIPSState
  ppc: use PowerPCCPU instead of CPUPPCState
  arm: remove useless cpu.h inclusion
  explicitly include qom/cpu.h
  explicitly include hw/qdev-core.h
  explicitly include linux/kvm.h
  apic: move target-dependent definitions to cpu.h
  include: poison symbols in osdep.h
  hw: do not use VMSTATE_*TL
  hw: move CPU state serialization to migration/cpu.h
  hw: cannot include hw/hw.h from user emulation
  cpu: move endian-dependent load/store functions to cpu-all.h
  qemu-common: stop including qemu/bswap.h from qemu-common.h
  qemu-common: stop including qemu/host-utils.h from qemu-common.h
  gdbstub: remove unnecessary includes from gdbstub-xml.c
  dma: do not depend on kvm_enabled()
  s390x: move stuff out of cpu.h
  acpi: do not use TARGET_PAGE_SIZE
  qemu-common: push cpu.h inclusion out of qemu-common.h
  arm: move arm_log_exception into .c file
  mips: move CP0 functions out of cpu.h
  hw: explicitly include qemu/log.h
  exec: extract exec/tb-context.h
  cpu: move exec-all.h inclusion out of cpu.h
  hw: remove pio_addr_t
  hw: clean up hw/hw.h includes

 arch_init.c                                 |   2 +
 audio/mixeng.c                              |   1 +
 audio/noaudio.c                             |   1 +
 audio/spiceaudio.c                          |   1 +
 audio/wavaudio.c                            |   2 +-
 block/bochs.c                               |   1 +
 block/cloop.c                               |   1 +
 block/parallels.c                           |   1 +
 block/qcow.c                                |   1 +
 block/qcow2-cluster.c                       |   1 +
 block/qcow2-refcount.c                      |   1 +
 block/qcow2-snapshot.c                      |   1 +
 block/qcow2.c                               |   1 +
 block/qed-table.c                           |   1 +
 block/qed.c                                 |   1 +
 block/vdi.c                                 |   1 +
 block/vhdx-endian.c                         |   1 +
 block/vhdx-log.c                            |   1 +
 block/vhdx.c                                |   1 +
 block/vmdk.c                                |   1 +
 block/vpc.c                                 |   1 +
 block/vvfat.c                               |   1 +
 bootdevice.c                                |   1 +
 bsd-user/main.c                             |   2 +
 bsd-user/qemu.h                             |   1 +
 contrib/ivshmem-server/ivshmem-server.c     |   1 +
 cpu-exec-common.c                           |   1 +
 cpu-exec.c                                  |   1 +
 cpus.c                                      |   4 +-
 cputlb.c                                    |   1 +
 crypto/afsplit.c                            |   1 +
 crypto/block-luks.c                         |   1 +
 device_tree.c                               |   1 +
 disas/tci.c                                 |   1 +
 exec.c                                      |  25 ++--
 gdbstub.c                                   |   3 +-
 hw/acpi/core.c                              |   6 +
 hw/acpi/nvdimm.c                            |  22 ++--
 hw/acpi/piix4.c                             |   1 +
 hw/alpha/alpha_sys.h                        |   1 +
 hw/alpha/pci.c                              |   1 -
 hw/arm/ast2400.c                            |   1 +
 hw/arm/collie.c                             |   1 +
 hw/arm/nseries.c                            |   3 +
 hw/arm/palmetto-bmc.c                       |   1 +
 hw/arm/pxa2xx_gpio.c                        |   2 +
 hw/arm/stellaris.c                          |   1 +
 hw/arm/stm32f205_soc.c                      |   1 -
 hw/arm/strongarm.c                          |   1 +
 hw/arm/strongarm.h                          |   1 +
 hw/arm/xlnx-ep108.c                         |   1 +
 hw/audio/pl041.c                            |   1 +
 hw/block/hd-geometry.c                      |   1 +
 hw/block/m25p80.c                           |   1 +
 hw/block/pflash_cfi01.c                     |   1 +
 hw/bt/hci-csr.c                             |   1 +
 hw/bt/l2cap.c                               |   1 +
 hw/bt/sdp.c                                 |   1 +
 hw/char/bcm2835_aux.c                       |   1 +
 hw/char/cadence_uart.c                      |   4 +
 hw/char/digic-uart.c                        |   1 +
 hw/char/imx_serial.c                        |   1 +
 hw/char/pl011.c                             |   1 +
 hw/char/stm32f2xx_usart.c                   |   1 +
 hw/core/Makefile.objs                       |   2 +-
 hw/core/nmi.c                               |   5 +
 hw/core/sysbus.c                            |   4 +-
 hw/cpu/a9mpcore.c                           |   1 +
 hw/display/bcm2835_fb.c                     |   1 +
 hw/display/cg3.c                            |   2 +
 hw/display/pl110.c                          |   1 +
 hw/display/tc6393xb.c                       |   1 +
 hw/display/virtio-gpu.c                     |   1 +
 hw/dma/bcm2835_dma.c                        |   1 +
 hw/dma/pl080.c                              |   1 +
 hw/dma/pl330.c                              |   1 +
 hw/dma/rc4030.c                             |   1 +
 hw/gpio/gpio_key.c                          |   1 +
 hw/gpio/imx_gpio.c                          |   1 +
 hw/gpio/pl061.c                             |   1 +
 hw/i2c/imx_i2c.c                            |   1 +
 hw/i2c/versatile_i2c.c                      |   1 +
 hw/i386/kvm/apic.c                          |   2 +
 hw/i386/kvm/clock.c                         |   1 +
 hw/i386/kvm/i8254.c                         |   1 +
 hw/i386/kvm/pci-assign.c                    |   1 +
 hw/i386/kvmvapic.c                          |   3 +
 hw/input/pl050.c                            |   1 +
 hw/intc/allwinner-a10-pic.c                 |   1 +
 hw/intc/apic.c                              |   2 +
 hw/intc/apic_common.c                       |   2 +
 hw/intc/arm_gic.c                           |   1 +
 hw/intc/arm_gic_kvm.c                       |   2 +
 hw/intc/arm_gicv2m.c                        |   2 +
 hw/intc/armv7m_nvic.c                       |   2 +
 hw/intc/bcm2835_ic.c                        |   1 +
 hw/intc/bcm2836_control.c                   |   1 +
 hw/intc/i8259.c                             |   1 +
 hw/intc/imx_avic.c                          |   1 +
 hw/intc/ioapic.c                            |   1 +
 hw/intc/openpic.c                           |   1 +
 hw/intc/openpic_kvm.c                       |   2 +
 hw/intc/pl190.c                             |   1 +
 hw/intc/s390_flic_kvm.c                     |   2 +
 hw/isa/lpc_ich9.c                           |   1 +
 hw/mips/cps.c                               |   7 +-
 hw/mips/cputimer.c                          |   4 +-
 hw/mips/mips_fulong2e.c                     |   4 +-
 hw/mips/mips_int.c                          |   3 +-
 hw/mips/mips_jazz.c                         |   4 +-
 hw/mips/mips_malta.c                        |   5 +-
 hw/mips/mips_mipssim.c                      |   4 +-
 hw/mips/mips_r4k.c                          |   4 +-
 hw/misc/arm11scu.c                          |   1 +
 hw/misc/arm_integrator_debug.c              |   1 +
 hw/misc/arm_l2x0.c                          |   1 +
 hw/misc/arm_sysctl.c                        |   1 +
 hw/misc/bcm2835_mbox.c                      |   1 +
 hw/misc/bcm2835_property.c                  |   1 +
 hw/misc/imx25_ccm.c                         |   1 +
 hw/misc/imx31_ccm.c                         |   1 +
 hw/misc/imx6_ccm.c                          |   1 +
 hw/misc/imx6_src.c                          |   1 +
 hw/misc/imx_ccm.c                           |   1 +
 hw/misc/macio/cuda.c                        |   1 +
 hw/misc/macio/mac_dbdma.c                   |   1 +
 hw/misc/mips_cmgcr.c                        |   1 +
 hw/misc/mips_cpc.c                          |   2 +
 hw/misc/mips_itu.c                          |   3 +
 hw/misc/pci-testdev.c                       |   1 +
 hw/misc/stm32f2xx_syscfg.c                  |   1 +
 hw/misc/zynq-xadc.c                         |   1 +
 hw/misc/zynq_slcr.c                         |   1 +
 hw/net/allwinner_emac.c                     |   1 +
 hw/net/fsl_etsec/etsec.c                    |   1 +
 hw/net/fsl_etsec/rings.c                    |   2 +-
 hw/net/imx_fec.c                            |   1 +
 hw/net/lan9118.c                            |   1 +
 hw/net/spapr_llan.c                         |   9 +-
 hw/pci-host/apb.c                           |   1 +
 hw/pci-host/versatile.c                     |   1 +
 hw/ppc/e500plat.c                           |   1 +
 hw/ppc/ppc.c                                |  20 +--
 hw/ppc/ppc4xx_devs.c                        |   1 +
 hw/ppc/prep.c                               |   1 +
 hw/ppc/spapr.c                              |   1 +
 hw/ppc/spapr_hcall.c                        |   3 +
 hw/ppc/spapr_iommu.c                        |   1 +
 hw/ppc/spapr_rtas.c                         |   2 +
 hw/ppc/spapr_vio.c                          |   3 +-
 hw/ppc/virtex_ml507.c                       |   1 +
 hw/s390x/css.c                              |   4 +-
 hw/s390x/s390-skeys.c                       |   1 +
 hw/s390x/s390-virtio-ccw.c                  |   4 +-
 hw/s390x/virtio-ccw.c                       |   5 +-
 hw/s390x/virtio-ccw.h                       |   3 +-
 hw/sd/pl181.c                               |   1 +
 hw/sd/sd.c                                  |   1 +
 hw/sd/sdhci.c                               |   1 +
 hw/sh4/sh7750.c                             |   1 +
 hw/ssi/imx_spi.c                            |   1 +
 hw/ssi/pl022.c                              |   1 +
 hw/timer/allwinner-a10-pit.c                |   1 +
 hw/timer/arm_timer.c                        |   1 +
 hw/timer/digic-timer.c                      |   1 +
 hw/timer/imx_epit.c                         |   1 +
 hw/timer/imx_gpt.c                          |   1 +
 hw/timer/pl031.c                            |   1 +
 hw/timer/stm32f2xx_timer.c                  |   1 +
 hw/vfio/common.c                            |   3 +
 hw/watchdog/wdt_diag288.c                   |   1 +
 hw/xtensa/pic_cpu.c                         |   1 +
 include/disas/disas.h                       |   2 +
 include/exec/cpu-all.h                      |  25 ++++
 include/exec/cpu-common.h                   |  14 --
 include/exec/cpu-defs.h                     |   1 +
 include/exec/exec-all.h                     |  56 +-------
 include/exec/gdbstub.h                      |   2 +
 include/exec/helper-head.h                  |  23 ++--
 include/exec/hwaddr.h                       |   2 +
 include/exec/ioport.h                       |  19 +--
 include/exec/memory.h                       |  17 ---
 include/exec/poison.h                       |   8 --
 include/exec/tb-context.h                   |  46 +++++++
 include/hw/acpi/acpi.h                      |   7 -
 include/hw/arm/arm.h                        |   2 +-
 include/hw/arm/digic.h                      |   1 -
 include/hw/arm/exynos4210.h                 |   1 +
 include/hw/arm/fsl-imx6.h                   |   1 +
 include/hw/arm/omap.h                       |   1 +
 include/hw/arm/pxa.h                        |   1 +
 include/hw/arm/virt-acpi-build.h            |   1 +
 include/hw/arm/virt.h                       |   1 +
 include/hw/hw.h                             |  60 +--------
 include/hw/i386/apic.h                      |   5 -
 include/hw/isa/isa.h                        |   2 +-
 include/hw/m68k/mcf.h                       |   2 +
 include/hw/mips/cpudevs.h                   |   7 +-
 include/hw/ppc/openpic.h                    |   3 +-
 include/hw/ppc/ppc.h                        |  24 ++--
 include/hw/ppc/spapr_vio.h                  |   2 +-
 {hw => include/hw}/s390x/css.h              |  31 ++++-
 {target-s390x => include/hw/s390x}/ioinst.h |  16 +--
 include/hw/sd/sd.h                          |   2 +
 include/hw/sh4/sh.h                         |   1 +
 include/hw/sysbus.h                         |   4 +-
 include/hw/xen/xen.h                        |   7 +-
 include/migration/cpu.h                     |  48 +++++++
 include/qemu-common.h                       |  32 -----
 include/qemu/log.h                          |  17 +--
 include/qemu/osdep.h                        |   2 +
 include/qemu/timer.h                        |   2 +-
 include/qom/cpu.h                           |  19 +++
 include/sysemu/cpus.h                       |  13 ++
 include/sysemu/dma.h                        |   5 +-
 include/sysemu/kvm.h                        |   1 +
 io/channel-websock.c                        |   1 +
 ioport.c                                    |  14 +-
 kvm-stub.c                                  |   1 -
 linux-user/main.c                           |   2 +
 linux-user/qemu.h                           |   1 +
 memory.c                                    |   2 +
 migration/ram.c                             |   2 +
 migration/savevm.c                          |   1 +
 monitor.c                                   |   4 +
 nbd/nbd-internal.h                          |   1 +
 page_cache.c                                |   1 +
 qemu-nbd.c                                  |   1 +
 qtest.c                                     |   2 +
 scripts/analyze-inclusions                  | 102 +++++++++++++++
 scripts/create_config                       |   2 +-
 scripts/feature_to_c.sh                     |   2 -
 scripts/tracetool/format/tcg_helper_c.py    |   1 +
 slirp/slirp.h                               |   1 +
 stubs/cpu-get-icount.c                      |   1 +
 stubs/slirp.c                               |   1 +
 target-alpha/cpu-qom.h                      |  41 +-----
 target-alpha/cpu.c                          |   1 +
 target-alpha/cpu.h                          |  44 ++++++-
 target-alpha/fpu_helper.c                   |   1 +
 target-alpha/gdbstub.c                      |   1 +
 target-alpha/helper.c                       |   1 +
 target-alpha/int_helper.c                   |   1 +
 target-alpha/machine.c                      |   3 +
 target-alpha/mem_helper.c                   |   1 +
 target-alpha/sys_helper.c                   |   1 +
 target-alpha/translate.c                    |   1 +
 target-alpha/vax_helper.c                   |   1 +
 target-arm/arm-powerctl.c                   |   2 +
 target-arm/arm_ldst.h                       |   1 +
 target-arm/cpu-qom.h                        | 178 +------------------------
 target-arm/cpu.c                            |   1 +
 target-arm/cpu.h                            | 181 +++++++++++++++++++++++++-
 target-arm/gdbstub.c                        |   1 +
 target-arm/gdbstub64.c                      |   1 +
 target-arm/helper-a64.c                     |   1 +
 target-arm/helper.c                         |  16 +++
 target-arm/internals.h                      |  15 ---
 target-arm/kvm-stub.c                       |   1 +
 target-arm/kvm.c                            |   1 +
 target-arm/kvm32.c                          |   3 +-
 target-arm/kvm64.c                          |   2 +-
 target-arm/machine.c                        |   3 +
 target-arm/op_helper.c                      |   1 +
 target-arm/psci.c                           |   2 +-
 target-arm/translate-a64.c                  |   1 +
 target-arm/translate.c                      |   1 +
 target-cris/cpu-qom.h                       |  40 +-----
 target-cris/cpu.c                           |   1 +
 target-cris/cpu.h                           |  43 +++++-
 target-cris/gdbstub.c                       |   1 +
 target-cris/helper.c                        |   1 +
 target-cris/machine.c                       |   3 +
 target-cris/mmu.c                           |   1 +
 target-cris/op_helper.c                     |   1 +
 target-cris/translate.c                     |   1 +
 target-i386/bpt_helper.c                    |   1 +
 target-i386/cpu-qom.h                       |  98 +-------------
 target-i386/cpu.c                           |   3 +-
 target-i386/cpu.h                           | 107 ++++++++++++++-
 target-i386/excp_helper.c                   |   1 +
 target-i386/fpu_helper.c                    |   1 +
 target-i386/gdbstub.c                       |   1 +
 target-i386/helper.c                        |   1 +
 target-i386/int_helper.c                    |   1 +
 target-i386/kvm-stub.c                      |   1 +
 target-i386/kvm.c                           |   2 +-
 target-i386/machine.c                       |   6 +
 target-i386/mem_helper.c                    |   1 +
 target-i386/misc_helper.c                   |   1 +
 target-i386/mpx_helper.c                    |   1 +
 target-i386/seg_helper.c                    |   1 +
 target-i386/svm_helper.c                    |   1 +
 target-i386/translate.c                     |   1 +
 target-lm32/cpu-qom.h                       |  42 +-----
 target-lm32/cpu.c                           |   1 +
 target-lm32/cpu.h                           |  46 ++++++-
 target-lm32/gdbstub.c                       |   1 +
 target-lm32/helper.c                        |   1 +
 target-lm32/machine.c                       |   3 +
 target-lm32/op_helper.c                     |   1 +
 target-lm32/translate.c                     |   1 +
 target-m68k/cpu-qom.h                       |  34 +----
 target-m68k/cpu.c                           |   1 +
 target-m68k/cpu.h                           |  38 +++++-
 target-m68k/gdbstub.c                       |   1 +
 target-m68k/helper.c                        |   1 +
 target-m68k/m68k-semi.c                     |   1 +
 target-m68k/op_helper.c                     |   1 +
 target-m68k/translate.c                     |   1 +
 target-microblaze/cpu-qom.h                 |  44 +------
 target-microblaze/cpu.c                     |   1 +
 target-microblaze/cpu.h                     |  47 ++++++-
 target-microblaze/gdbstub.c                 |   1 +
 target-microblaze/helper.c                  |   1 +
 target-microblaze/mmu.c                     |   1 +
 target-microblaze/op_helper.c               |   1 +
 target-microblaze/translate.c               |   1 +
 target-mips/cpu-qom.h                       |  37 +-----
 target-mips/cpu.c                           |   1 +
 target-mips/cpu.h                           | 171 ++++++------------------
 target-mips/gdbstub.c                       |   1 +
 target-mips/helper.c                        | 126 ++++++++++++++++++
 target-mips/kvm.c                           |   2 +-
 target-mips/machine.c                       |   4 +-
 target-mips/mips-semi.c                     |   1 +
 target-mips/msa_helper.c                    |   1 +
 target-mips/op_helper.c                     |   1 +
 target-mips/translate.c                     |   1 +
 target-moxie/cpu.c                          |   1 +
 target-moxie/cpu.h                          |   1 -
 target-moxie/machine.c                      |   3 +
 target-openrisc/cpu.c                       |   1 +
 target-openrisc/cpu.h                       |   2 -
 target-openrisc/exception.c                 |   1 +
 target-openrisc/gdbstub.c                   |   1 +
 target-openrisc/interrupt.c                 |   1 +
 target-openrisc/interrupt_helper.c          |   1 +
 target-openrisc/machine.c                   |   3 +
 target-openrisc/mmu.c                       |   1 +
 target-openrisc/mmu_helper.c                |   1 +
 target-openrisc/sys_helper.c                |   1 +
 target-ppc/cpu-qom.h                        | 165 +++++++++++++++--------
 target-ppc/cpu.h                            | 166 ++++++++---------------
 target-ppc/excp_helper.c                    |   1 +
 target-ppc/gdbstub.c                        |   1 +
 target-ppc/int_helper.c                     |   1 +
 target-ppc/kvm-stub.c                       |   1 +
 target-ppc/kvm.c                            |   2 +-
 target-ppc/machine.c                        |   5 +
 target-ppc/mem_helper.c                     |   2 +
 target-ppc/misc_helper.c                    |   1 +
 target-ppc/mmu-hash32.c                     |   3 +-
 target-ppc/mmu-hash32.h                     |   2 +-
 target-ppc/mmu-hash64.c                     |   3 +-
 target-ppc/mmu-hash64.h                     |   2 +-
 target-ppc/mmu_helper.c                     |   1 +
 target-ppc/timebase_helper.c                |   1 +
 target-ppc/translate.c                      |   1 +
 target-ppc/translate_init.c                 |  92 ++++++-------
 target-s390x/cc_helper.c                    |   1 +
 target-s390x/cpu-qom.h                      |  46 +------
 target-s390x/cpu.c                          |   4 +-
 target-s390x/cpu.h                          | 162 ++++++++++-------------
 target-s390x/fpu_helper.c                   |   1 +
 target-s390x/gdbstub.c                      |   2 +
 target-s390x/helper.c                       |   2 +
 target-s390x/int_helper.c                   |   1 +
 target-s390x/interrupt.c                    |  66 +++++++++-
 target-s390x/ioinst.c                       |   2 +-
 target-s390x/kvm.c                          |   2 +-
 target-s390x/mem_helper.c                   |   4 +
 target-s390x/misc_helper.c                  |   3 +-
 target-s390x/translate.c                    |   1 +
 target-sh4/cpu-qom.h                        |  31 +----
 target-sh4/cpu.c                            |   1 +
 target-sh4/cpu.h                            |  34 ++++-
 target-sh4/gdbstub.c                        |   1 +
 target-sh4/helper.c                         |   1 +
 target-sh4/op_helper.c                      |   1 +
 target-sh4/translate.c                      |   1 +
 target-sparc/cpu-qom.h                      |  38 +-----
 target-sparc/cpu.c                          |   1 +
 target-sparc/cpu.h                          |  40 +++++-
 target-sparc/gdbstub.c                      |   1 +
 target-sparc/helper.c                       |   1 +
 target-sparc/ldst_helper.c                  |   1 +
 target-sparc/machine.c                      |   6 +
 target-sparc/mmu_helper.c                   |   1 +
 target-sparc/translate.c                    |   1 +
 target-tilegx/cpu.c                         |   1 +
 target-tilegx/cpu.h                         |   2 -
 target-tilegx/helper.c                      |   1 +
 target-tilegx/translate.c                   |   1 +
 target-tricore/cpu-qom.h                    |  28 +---
 target-tricore/cpu.c                        |   1 +
 target-tricore/cpu.h                        |  32 ++++-
 target-tricore/helper.c                     |   1 +
 target-tricore/op_helper.c                  |   1 +
 target-tricore/translate.c                  |   1 +
 target-unicore32/cpu-qom.h                  |  30 +----
 target-unicore32/cpu.c                      |   1 +
 target-unicore32/cpu.h                      |  32 ++++-
 target-unicore32/helper.c                   |   1 +
 target-unicore32/op_helper.c                |   1 +
 target-unicore32/softmmu.c                  |   1 +
 target-unicore32/translate.c                |   1 +
 target-xtensa/cpu-qom.h                     | 194 ++++++++++++++++++++++-----
 target-xtensa/cpu.c                         |   1 +
 target-xtensa/cpu.h                         | 195 +++++-----------------------
 target-xtensa/gdbstub.c                     |   2 +
 target-xtensa/op_helper.c                   |   1 +
 target-xtensa/translate.c                   |   1 +
 tcg/optimize.c                              |   3 +-
 tcg/tcg-common.c                            |   2 +
 tcg/tcg-op.c                                |   3 +
 tcg/tcg.c                                   |   5 +
 tcg/tcg.h                                   |  23 ++++
 tests/ide-test.c                            |   1 +
 tests/libqos/malloc.c                       |   1 +
 translate-all.c                             |   1 +
 translate-common.c                          |   1 +
 ui/vnc-ws.c                                 |   1 +
 user-exec.c                                 |   1 +
 util/buffer.c                               |   1 +
 util/log.c                                  |  12 +-
 vl.c                                        |   2 +
 xen-hvm.c                                   |   8 +-
 428 files changed, 2233 insertions(+), 1745 deletions(-)
 create mode 100644 include/exec/tb-context.h
 rename {hw => include/hw}/s390x/css.h (76%)
 rename {target-s390x => include/hw/s390x}/ioinst.h (87%)
 create mode 100644 include/migration/cpu.h
 create mode 100644 scripts/analyze-inclusions

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2016-05-16 15:36 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 20:28 [Qemu-devel] [PATCH for-2.7 00/49] NEED_CPU_H / cpu.h / hw/hw.h cleanups Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions Paolo Bonzini
2016-04-18 13:10   ` Markus Armbruster
2016-05-09 10:07     ` Paolo Bonzini
2016-04-20 19:47   ` Alex Bennée
2016-05-09  9:39     ` Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 02/50] include: move CPU-related definitions out of qemu-common.h Paolo Bonzini
2016-04-21  7:53   ` Alex Bennée
2016-04-08 20:28 ` [Qemu-devel] [PATCH 03/50] log: do not use CONFIG_USER_ONLY Paolo Bonzini
2016-04-21 10:20   ` Alex Bennée
2016-04-08 20:28 ` [Qemu-devel] [PATCH 04/50] cpu: make cpu-qom.h only include-able from cpu.h Paolo Bonzini
2016-04-21 10:26   ` Alex Bennée
2016-04-08 20:28 ` [Qemu-devel] [PATCH 05/50] target-alpha: make cpu-qom.h not target specific Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 06/50] target-arm: " Paolo Bonzini
2016-04-21 10:29   ` Alex Bennée
2016-04-08 20:28 ` [Qemu-devel] [PATCH 07/50] target-cris: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 08/50] target-i386: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 09/50] target-lm32: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 10/50] target-m68k: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 11/50] target-microblaze: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 12/50] target-mips: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 13/50] target-ppc: do not use target_ulong in cpu-qom.h Paolo Bonzini
2016-04-18 13:46   ` Markus Armbruster
2016-04-08 20:28 ` [Qemu-devel] [PATCH 14/50] target-ppc: make cpu-qom.h not target specific Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 15/50] target-s390x: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 16/50] target-sh4: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 17/50] target-sparc: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 18/50] target-tricore: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 19/50] target-unicore32: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 20/50] target-xtensa: " Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 21/50] arm: include cpu-qom.h in files that require ARMCPU Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 22/50] m68k: include cpu-qom.h in files that require M68KCPU Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 23/50] sh4: include cpu-qom.h in files that require SuperHCPU Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 24/50] alpha: include cpu-qom.h in files that require AlphaCPU Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 25/50] mips: use MIPSCPU instead of CPUMIPSState Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 26/50] ppc: use PowerPCCPU instead of CPUPPCState Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 27/50] arm: remove useless cpu.h inclusion Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 28/50] explicitly include qom/cpu.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 29/50] explicitly include hw/qdev-core.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 30/50] explicitly include linux/kvm.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 31/50] apic: move target-dependent definitions to cpu.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 32/50] include: poison symbols in osdep.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 33/50] hw: do not use VMSTATE_*TL Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 34/50] hw: move CPU state serialization to migration/cpu.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 35/50] hw: cannot include hw/hw.h from user emulation Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 36/50] cpu: move endian-dependent load/store functions to cpu-all.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 37/50] qemu-common: stop including qemu/bswap.h from qemu-common.h Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 38/50] qemu-common: stop including qemu/host-utils.h " Paolo Bonzini
2016-04-21 10:46   ` Alex Bennée
2016-05-09  9:39     ` Paolo Bonzini
2016-04-08 20:28 ` [Qemu-devel] [PATCH 39/50] gdbstub: remove includes from gdbstub-xml.c Paolo Bonzini
2016-04-18 13:54   ` Markus Armbruster
2016-04-18 14:12     ` Peter Maydell
2016-04-08 20:29 ` [Qemu-devel] [PATCH 40/50] dma: do not depend on kvm_enabled() Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 41/50] s390x: move stuff out of cpu.h Paolo Bonzini
2016-04-11  8:24   ` Cornelia Huck
2016-05-09  9:43     ` Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 42/50] acpi: do not use TARGET_PAGE_SIZE Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 43/50] qemu-common: push cpu.h inclusion out of qemu-common.h Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 44/50] arm: move arm_log_exception into .c file Paolo Bonzini
2016-04-21 10:48   ` Alex Bennée
2016-04-08 20:29 ` [Qemu-devel] [PATCH 45/50] mips: move CP0 functions out of cpu.h Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 46/50] hw: explicitly include qemu/log.h Paolo Bonzini
2016-04-20 18:30   ` Alex Bennée
2016-04-08 20:29 ` [Qemu-devel] [PATCH 47/50] exec: extract exec/tb-context.h Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 48/50] cpu: move exec-all.h inclusion out of cpu.h Paolo Bonzini
2016-04-08 20:29 ` [Qemu-devel] [PATCH 49/50] hw: remove pio_addr_t Paolo Bonzini
2016-04-18 14:01   ` Markus Armbruster
2016-04-08 20:29 ` [Qemu-devel] [PATCH 50/50] hw: clean up hw/hw.h includes Paolo Bonzini
2016-04-18  8:42 ` [Qemu-devel] [PATCH for-2.7 00/49] NEED_CPU_H / cpu.h / hw/hw.h cleanups Markus Armbruster
2016-04-18 14:07 ` Markus Armbruster
2016-05-16 15:35 [Qemu-devel] [PATCH CFT v3 00/50] " Paolo Bonzini
2016-05-16 15:35 ` [Qemu-devel] [PATCH 06/50] target-arm: make cpu-qom.h not target specific Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.