Skip to contentSkip to conversation

directory reorganization, fixes and final part

GIT PULL In review Paolo Bonzini 5 participants 22 messages Apr 15, 2013 – Apr 16, 2013

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

Anthony,

The following changes since commit e2ec3f976803b360c70d9ae2ba13852fa5d11665:

qjson: to_json() case QTYPE_QSTRING is buggy, rewrite (2013-04-13 19:40:25 +0000)

are available in the git repository at:

git://github.com/bonzini/qemu.git hw-dirs

for you to fetch changes up to 4355deaaff63d715115fdf1359bfbb7cbc374662:

exec: remove useless declarations from memory-internal.h (2013-04-15 15:17:31 +0200)

----------------------------------------------------------------
Hu Tao (1):
Fix failure to create q35 machine

Jan Kiszka (1):
Add linux-headers to QEMU_INCLUDES

Michael S. Tsirkin (2):
acpi: move declarations from pc.h to acpi.h
acpi.h: make it self contained

Paolo Bonzini (6):
configure: fix TPM logic
tpm: reorganize headers and split hardware part
sysemu: avoid proliferation of include/ subdirectories
include: avoid useless includes of exec/ headers
memory: move core typedefs to qemu/typedefs.h
exec: remove useless declarations from memory-internal.h

Peter Maydell (1):
arm: fix location of some include files

Stefan Weil (1):
hw: Add lost ARM core again

 Makefile.objs                                      |  2 +-
 arch_init.c                                        |  2 +-
 backends/baum.c                                    |  2 +-
 backends/msmouse.c                                 |  2 +-
 backends/rng-egd.c                                 |  4 +-
 backends/rng-random.c                              |  4 +-
 backends/rng.c                                     |  2 +-
 backends/tpm.c                                     | 40 ++++++++++++++-
 bt-host.c                                          |  2 +-
 bt-vhci.c                                          |  2 +-
 configure                                          | 29 +++++++----
 default-configs/arm-softmmu.mak                    |  2 +-
 default-configs/i386-softmmu.mak                   |  5 +-
 default-configs/x86_64-softmmu.mak                 |  5 +-
 dump.c                                             |  6 ++-
 gdbstub.c                                          |  2 +-
 hmp.c                                              |  2 +-
 hw/Makefile.objs                                   |  1 +
 hw/alpha/typhoon.c                                 |  3 +-
 hw/arm/armv7m.c                                    |  2 +-
 hw/arm/boot.c                                      |  2 +-
 hw/arm/collie.c                                    |  4 +-
 hw/arm/exynos4210.c                                |  2 +-
 hw/arm/exynos4_boards.c                            |  2 +-
 hw/arm/gumstix.c                                   |  2 +-
 hw/arm/highbank.c                                  |  4 +-
 hw/arm/integratorcp.c                              |  4 +-
 hw/arm/kzm.c                                       |  4 +-
 hw/arm/mainstone.c                                 |  4 +-
 hw/arm/musicpal.c                                  |  4 +-
 hw/arm/nseries.c                                   |  4 +-
 hw/arm/omap1.c                                     |  2 +-
 hw/arm/omap2.c                                     |  4 +-
 hw/arm/omap_sx1.c                                  |  2 +-
 hw/arm/palm.c                                      |  4 +-
 hw/arm/pic_cpu.c                                   |  2 +-
 hw/arm/pxa2xx.c                                    |  2 +-
 hw/arm/realview.c                                  |  4 +-
 hw/arm/spitz.c                                     |  4 +-
 hw/arm/stellaris.c                                 |  4 +-
 hw/arm/strongarm.c                                 |  4 +-
 hw/arm/tosa.c                                      |  4 +-
 hw/arm/versatilepb.c                               |  4 +-
 hw/arm/vexpress.c                                  |  4 +-
 hw/arm/xilinx_zynq.c                               |  2 +-
 hw/arm/z2.c                                        |  4 +-
 hw/block/m25p80.c                                  |  2 +-
 hw/bt/core.c                                       |  2 +-
 hw/bt/hci-csr.c                                    |  4 +-
 hw/bt/hci.c                                        |  2 +-
 hw/char/cadence_uart.c                             |  2 +-
 hw/char/debugcon.c                                 |  2 +-
 hw/char/escc.c                                     |  2 +-
 hw/char/etraxfs_ser.c                              |  2 +-
 hw/char/exynos4210_uart.c                          |  2 +-
 hw/char/grlib_apbuart.c                            |  2 +-
 hw/char/imx_serial.c                               |  2 +-
 hw/char/ipoctal232.c                               |  2 +-
 hw/char/lm32_juart.c                               |  2 +-
 hw/char/lm32_uart.c                                |  2 +-
 hw/char/mcf_uart.c                                 |  2 +-
 hw/char/milkymist-uart.c                           |  2 +-
 hw/char/omap_uart.c                                |  2 +-
 hw/char/parallel.c                                 |  2 +-
 hw/char/pl011.c                                    |  2 +-
 hw/char/sclpconsole.c                              |  2 +-
 hw/char/serial.c                                   |  2 +-
 hw/char/sh_serial.c                                |  2 +-
 hw/char/spapr_vty.c                                |  2 +-
 hw/char/virtio-console.c                           |  2 +-
 hw/char/xen_console.c                              |  2 +-
 hw/char/xilinx_uartlite.c                          |  2 +-
 hw/core/qdev-properties-system.c                   |  2 +-
 hw/core/qdev-properties.c                          |  2 +-
 hw/display/blizzard.c                              |  2 +-
 hw/display/sm501.c                                 |  2 +-
 hw/display/tc6393xb.c                              |  2 +-
 hw/display/xenfb.c                                 |  2 +-
 hw/i386/pc.c                                       |  1 +
 hw/i386/pc_piix.c                                  |  1 +
 hw/ide/ahci.c                                      |  1 -
 hw/ide/internal.h                                  |  1 -
 hw/input/stellaris_input.c                         |  2 +-
 hw/input/tsc2005.c                                 |  2 +-
 hw/input/tsc210x.c                                 |  2 +-
 hw/intc/armv7m_nvic.c                              |  2 +-
 hw/isa/pc87312.c                                   |  2 +-
 hw/lm32/lm32_boards.c                              |  2 +-
 hw/lm32/milkymist.c                                |  2 +-
 hw/microblaze/petalogix_ml605_mmu.c                |  2 +-
 hw/microblaze/petalogix_s3adsp1800_mmu.c           |  2 +-
 hw/mips/mips_fulong2e.c                            |  2 +-
 hw/mips/mips_malta.c                               |  2 +-
 hw/misc/cbus.c                                     |  2 +-
 hw/misc/ivshmem.c                                  |  2 +-
 hw/net/lan9118.c                                   |  2 +-
 hw/net/smc91c111.c                                 |  2 +-
 hw/net/vmxnet_tx_pkt.c                             |  2 +-
 hw/net/xgmac.c                                     |  2 +-
 hw/ppc/spapr_events.c                              |  2 +-
 hw/ppc/spapr_rtas.c                                |  2 +-
 hw/ppc/virtex_ml507.c                              |  2 +-
 hw/sh4/r2d.c                                       |  2 +-
 hw/sparc/leon3.c                                   |  2 +-
 hw/timer/tusb6010.c                                |  2 +-
 {tpm => hw/tpm}/Makefile.objs                      |  4 --
 {tpm => hw/tpm}/tpm_int.h                          | 37 +-------------
 {tpm => hw/tpm}/tpm_passthrough.c                  | 22 ++++++--
 {tpm => hw/tpm}/tpm_tis.c                          |  4 +-
 {tpm => hw/tpm}/tpm_tis.h                          |  5 --
 hw/usb/ccid-card-emulated.c                        |  2 +-
 hw/usb/ccid-card-passthru.c                        |  2 +-
 hw/usb/dev-bluetooth.c                             |  2 +-
 hw/usb/dev-serial.c                                |  2 +-
 hw/usb/libhw.c                                     |  2 +-
 hw/usb/redirect.c                                  |  2 +-
 hw/virtio/virtio-rng.c                             |  2 +-
 hw/xen/xen_backend.c                               |  2 +-
 hw/xtensa/xtensa_lx60.c                            |  2 +-
 include/exec/memory-internal.h                     |  6 ---
 include/exec/memory.h                              |  5 --
 include/hw/acpi/acpi.h                             | 13 +++++
 include/hw/{ => arm}/arm.h                         |  0
 include/hw/{arm => }/devices.h                     |  0
 include/hw/i386/pc.h                               |  8 ---
 include/hw/virtio/virtio-rng.h                     |  4 +-
 include/qemu/typedefs.h                            |  4 ++
 include/{bt => sysemu}/bt.h                        |  0
 include/{char => sysemu}/char.h                    |  0
 include/{qemu => sysemu}/rng-random.h              |  0
 include/{qemu => sysemu}/rng.h                     |  0
 include/{tpm => sysemu}/tpm.h                      |  2 -
 include/{backends/tpm.h => sysemu/tpm_backend.h}   | 42 +++++++++++++++-
 .../sysemu/tpm_backend_int.h                       |  0
 kvm-stub.c                                         |  1 -
 monitor.c                                          |  4 +-
 net/slirp.c                                        |  2 +-
 qemu-char.c                                        |  2 +-
 qmp.c                                              |  2 +-
 qtest.c                                            |  2 +-
 slirp/slirp.c                                      |  2 +-
 spice-qemu-char.c                                  |  2 +-
 target-arm/arm-semi.c                              |  2 +-
 target-arm/kvm.c                                   |  2 +-
 target-ppc/kvm_ppc.h                               |  2 -
 tpm/tpm.c => tpm.c                                 | 21 ++------
 tpm/tpm_backend.c                                  | 58 ----------------------
 translate-all.c                                    |  5 +-
 ui/console.c                                       |  2 +-
 ui/gtk.c                                           |  2 +-
 util/event_notifier-posix.c                        |  2 +-
 vl.c                                               |  6 +--
 xen-all.c                                          |  2 +-
 153 files changed, 297 insertions(+), 319 deletions(-)
 rename {tpm => hw/tpm}/Makefile.objs (55%)
 rename {tpm => hw/tpm}/tpm_int.h (50%)
 rename {tpm => hw/tpm}/tpm_passthrough.c (96%)
 rename {tpm => hw/tpm}/tpm_tis.c (99%)
 rename {tpm => hw/tpm}/tpm_tis.h (96%)
 rename include/hw/{ => arm}/arm.h (100%)
 rename include/hw/{arm => }/devices.h (100%)
 rename include/{bt => sysemu}/bt.h (100%)
 rename include/{char => sysemu}/char.h (100%)
 rename include/{qemu => sysemu}/rng-random.h (100%)
 rename include/{qemu => sysemu}/rng.h (100%)
 rename include/{tpm => sysemu}/tpm.h (82%)
 rename include/{backends/tpm.h => sysemu/tpm_backend.h} (77%)
 rename tpm/tpm_backend.h => include/sysemu/tpm_backend_int.h (100%)
 rename tpm/tpm.c => tpm.c (93%)
 delete mode 100644 tpm/tpm_backend.c
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/12 arm: fix location of some include files

From: Peter Maydell <[email protected]>

The recent rearrangement of include files had some minor errors:
devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/

Move these two headers to correct this.

---
 hw/alpha/typhoon.c                       | 2 +-
 hw/arm/armv7m.c                          | 2 +-
 hw/arm/boot.c                            | 2 +-
 hw/arm/collie.c                          | 4 ++--
 hw/arm/exynos4210.c                      | 2 +-
 hw/arm/exynos4_boards.c                  | 2 +-
 hw/arm/gumstix.c                         | 2 +-
 hw/arm/highbank.c                        | 4 ++--
 hw/arm/integratorcp.c                    | 4 ++--
 hw/arm/kzm.c                             | 4 ++--
 hw/arm/mainstone.c                       | 4 ++--
 hw/arm/musicpal.c                        | 4 ++--
 hw/arm/nseries.c                         | 4 ++--
 hw/arm/omap1.c                           | 2 +-
 hw/arm/omap2.c                           | 2 +-
 hw/arm/omap_sx1.c                        | 2 +-
 hw/arm/palm.c                            | 4 ++--
 hw/arm/pic_cpu.c                         | 2 +-
 hw/arm/realview.c                        | 4 ++--
 hw/arm/spitz.c                           | 4 ++--
 hw/arm/stellaris.c                       | 4 ++--
 hw/arm/strongarm.c                       | 2 +-
 hw/arm/tosa.c                            | 4 ++--
 hw/arm/versatilepb.c                     | 4 ++--
 hw/arm/vexpress.c                        | 4 ++--
 hw/arm/xilinx_zynq.c                     | 2 +-
 hw/arm/z2.c                              | 4 ++--
 hw/block/m25p80.c                        | 2 +-
 hw/display/blizzard.c                    | 2 +-
 hw/display/sm501.c                       | 2 +-
 hw/display/tc6393xb.c                    | 2 +-
 hw/input/stellaris_input.c               | 2 +-
 hw/input/tsc2005.c                       | 2 +-
 hw/input/tsc210x.c                       | 2 +-
 hw/intc/armv7m_nvic.c                    | 2 +-
 hw/lm32/lm32_boards.c                    | 2 +-
 hw/lm32/milkymist.c                      | 2 +-
 hw/microblaze/petalogix_ml605_mmu.c      | 2 +-
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +-
 hw/misc/cbus.c                           | 2 +-
 hw/net/lan9118.c                         | 2 +-
 hw/net/smc91c111.c                       | 2 +-
 hw/ppc/virtex_ml507.c                    | 2 +-
 hw/sh4/r2d.c                             | 2 +-
 hw/timer/tusb6010.c                      | 2 +-
 include/hw/{ => arm}/arm.h               | 0
 include/hw/{arm => }/devices.h           | 0
 target-arm/arm-semi.c                    | 2 +-
 target-arm/kvm.c                         | 2 +-
 49 files changed, 62 insertions(+), 62 deletions(-)
 rename include/hw/{ => arm}/arm.h (100%)
 rename include/hw/{arm => }/devices.h (100%)
hw/alpha/typhoon.c +1 -1
index faec8dc..68420f4 100644
@@ -9,7 +9,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "hw/hw.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "sysemu/sysemu.h"
 #include "alpha_sys.h"
 #include "exec/address-spaces.h"
hw/arm/armv7m.c +1 -1
index a4bdd5f..2ae3576 100644
@@ -8,7 +8,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/loader.h"
 #include "elf.h"
 
hw/arm/boot.c +1 -1
index c79c590..e9c0945 100644
@@ -9,7 +9,7 @@
 
 #include "config.h"
 #include "hw/hw.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
hw/arm/collie.c +2 -2
index 5420bb4..a19857a 100644
@@ -11,9 +11,9 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/boards.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "strongarm.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/block/flash.h"
 #include "sysemu/blockdev.h"
 #include "exec/address-spaces.h"
hw/arm/exynos4210.c +1 -1
index 78b8b74..c8101d3 100644
@@ -24,7 +24,7 @@
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/loader.h"
 #include "hw/arm/exynos4210.h"
 #include "hw/usb/hcd-ehci.h"
hw/arm/exynos4_boards.c +1 -1
index ba14a1f..74f110b 100644
@@ -24,7 +24,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 #include "net/net.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "exec/address-spaces.h"
 #include "hw/arm/exynos4210.h"
 #include "hw/boards.h"
hw/arm/gumstix.c +1 -1
index 4d800c9..b8cab10 100644
@@ -38,7 +38,7 @@
 #include "hw/arm/pxa.h"
 #include "net/net.h"
 #include "hw/block/flash.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "sysemu/blockdev.h"
 #include "exec/address-spaces.h"
hw/arm/highbank.c +2 -2
index 58f73c1..0fd9465 100644
@@ -18,8 +18,8 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "hw/loader.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
hw/arm/integratorcp.c +2 -2
index 8d0fb75..cca2971 100644
@@ -8,9 +8,9 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "net/net.h"
 #include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
hw/arm/kzm.c +2 -2
index 46264cd..cf90f5d 100644
@@ -16,8 +16,8 @@
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
 #include "hw/hw.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
hw/arm/mainstone.c +2 -2
index b78e6f0..260e314 100644
@@ -13,9 +13,9 @@
  */
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "net/net.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
 #include "sysemu/blockdev.h"
hw/arm/musicpal.c +2 -2
index 97b1340..d2247fa 100644
@@ -10,8 +10,8 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
hw/arm/nseries.c +2 -2
index ba8dc3e..4976438 100644
@@ -21,12 +21,12 @@
 #include "qemu-common.h"
 #include "sysemu/sysemu.h"
 #include "hw/arm/omap.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/irq.h"
 #include "ui/console.h"
 #include "hw/boards.h"
 #include "hw/i2c/i2c.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/block/flash.h"
 #include "hw/hw.h"
 #include "hw/bt.h"
hw/arm/omap1.c +1 -1
index 17caa61..f59f0f2 100644
@@ -17,7 +17,7 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "hw/hw.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
 #include "hw/arm/soc_dma.h"
hw/arm/omap2.c +1 -1
index 010c483..a4b4146 100644
@@ -20,7 +20,7 @@
 
 #include "sysemu/blockdev.h"
 #include "hw/hw.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
 #include "qemu/timer.h"
hw/arm/omap_sx1.c +1 -1
index aa85602..e421ece 100644
@@ -29,7 +29,7 @@
 #include "ui/console.h"
 #include "hw/arm/omap.h"
 #include "hw/boards.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/block/flash.h"
 #include "sysemu/blockdev.h"
 #include "exec/address-spaces.h"
hw/arm/palm.c +2 -2
index 0bc11ae..b13d810 100644
@@ -22,8 +22,8 @@
 #include "ui/console.h"
 #include "hw/arm/omap.h"
 #include "hw/boards.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
 
hw/arm/pic_cpu.c +1 -1
index 787767f..875280a 100644
@@ -8,7 +8,7 @@
  */
 
 #include "hw/hw.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "sysemu/kvm.h"
 
 /* Input 0 is IRQ and input 1 is FIQ.  */
hw/arm/realview.c +2 -2
index afd52d3..feabfc5 100644
@@ -8,9 +8,9 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/arm/primecell.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/pci/pci.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
hw/arm/spitz.c +2 -2
index fa434dc..c42668a 100644
@@ -12,14 +12,14 @@
 
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "sysemu/sysemu.h"
 #include "hw/pcmcia.h"
 #include "hw/i2c/i2c.h"
 #include "hw/ssi.h"
 #include "hw/block/flash.h"
 #include "qemu/timer.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/arm/sharpsl.h"
 #include "ui/console.h"
 #include "block/block.h"
hw/arm/stellaris.c +2 -2
index 952087c..2b61e3c 100644
@@ -9,8 +9,8 @@
 
 #include "hw/sysbus.h"
 #include "hw/ssi.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "qemu/timer.h"
 #include "hw/i2c/i2c.h"
 #include "net/net.h"
hw/arm/strongarm.c +1 -1
index 5873a3c..75a813e 100644
@@ -29,7 +29,7 @@
 #include "hw/sysbus.h"
 #include "strongarm.h"
 #include "qemu/error-report.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "char/char.h"
 #include "sysemu/sysemu.h"
 #include "hw/ssi.h"
hw/arm/tosa.c +2 -2
index c4362d4..47818a5 100644
@@ -13,8 +13,8 @@
 
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "hw/arm/sharpsl.h"
 #include "hw/pcmcia.h"
 #include "block/block.h"
hw/arm/versatilepb.c +2 -2
index d9be604..25c665a 100644
@@ -8,8 +8,8 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
hw/arm/vexpress.c +2 -2
index 96e0985..a077c62 100644
@@ -22,9 +22,9 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "hw/arm/primecell.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
hw/arm/xilinx_zynq.c +1 -1
index 8d65f79..41505c3 100644
@@ -16,7 +16,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "net/net.h"
 #include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
hw/arm/z2.c +2 -2
index 3e27208..07a127b 100644
@@ -13,8 +13,8 @@
 
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
-#include "hw/arm.h"
-#include "hw/arm/devices.h"
+#include "hw/arm/arm.h"
+#include "hw/devices.h"
 #include "hw/i2c/i2c.h"
 #include "hw/ssi.h"
 #include "hw/boards.h"
hw/block/m25p80.c +1 -1
index cd560e3..55e9d0d 100644
@@ -24,7 +24,7 @@
 #include "hw/hw.h"
 #include "sysemu/blockdev.h"
 #include "hw/ssi.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 
 #ifdef M25P80_ERR_DEBUG
 #define DB_PRINT(...) do { \
hw/display/blizzard.c +1 -1
index 175c5cd..de7ccf8 100644
@@ -20,7 +20,7 @@
 
 #include "qemu-common.h"
 #include "ui/console.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
 
hw/display/sm501.c +1 -1
index 6b660ac..9878df4 100644
@@ -26,7 +26,7 @@
 #include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "ui/console.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-addr.h"
 #include "qemu/range.h"
hw/display/tc6393xb.c +1 -1
index e252ce9..178a21f 100644
@@ -11,7 +11,7 @@
  * GNU GPL, version 2 or (at your option) any later version.
  */
 #include "hw/hw.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/block/flash.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
hw/input/stellaris_input.c +1 -1
index f83fc3f..4e40792 100644
@@ -7,7 +7,7 @@
  * This code is licensed under the GPL.
  */
 #include "hw/hw.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "ui/console.h"
 
 typedef struct {
hw/input/tsc2005.c +1 -1
index 34ee1fb..a771cd5 100644
@@ -21,7 +21,7 @@
 #include "hw/hw.h"
 #include "qemu/timer.h"
 #include "ui/console.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 
 #define TSC_CUT_RESOLUTION(value, p)	((value) >> (16 - (p ? 12 : 10)))
 
hw/input/tsc210x.c +1 -1
index e6c217c..9b854e7 100644
@@ -24,7 +24,7 @@
 #include "qemu/timer.h"
 #include "ui/console.h"
 #include "hw/arm/omap.h"	/* For I2SCodec and uWireSlave */
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 
 #define TSC_DATA_REGISTERS_PAGE		0x0
 #define TSC_CONTROL_REGISTERS_PAGE	0x1
hw/intc/armv7m_nvic.c +1 -1
index 67dbe68..25fa43c 100644
@@ -12,7 +12,7 @@
 
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #include "exec/address-spaces.h"
 #include "gic_internal.h"
 
hw/lm32/lm32_boards.c +1 -1
index 6555a97..1ca9498 100644
@@ -20,7 +20,7 @@
 #include "hw/sysbus.h"
 #include "hw/hw.h"
 #include "hw/block/flash.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "sysemu/blockdev.h"
hw/lm32/milkymist.c +1 -1
index d02ca0c..cca9374 100644
@@ -21,7 +21,7 @@
 #include "hw/hw.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
hw/microblaze/petalogix_ml605_mmu.c +1 -1
index f61818b..ae7ff44 100644
@@ -30,7 +30,7 @@
 #include "net/net.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/xilinx.h"
 #include "sysemu/blockdev.h"
hw/microblaze/petalogix_s3adsp1800_mmu.c +1 -1
index eedd60e..7c258f0 100644
@@ -28,7 +28,7 @@
 #include "net/net.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "hw/xilinx.h"
 #include "sysemu/blockdev.h"
hw/misc/cbus.c +1 -1
index 3d9027f..29b467b 100644
@@ -22,7 +22,7 @@
 
 #include "qemu-common.h"
 #include "hw/irq.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "sysemu/sysemu.h"
 
 //#define DEBUG
hw/net/lan9118.c +1 -1
index 04cf267..403fb86 100644
@@ -12,7 +12,7 @@
 
 #include "hw/sysbus.h"
 #include "net/net.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "sysemu/sysemu.h"
 #include "hw/ptimer.h"
 /* For crc32 */
hw/net/smc91c111.c +1 -1
index f659256..c2feae6 100644
@@ -9,7 +9,7 @@
 
 #include "hw/sysbus.h"
 #include "net/net.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 /* For crc32 */
 #include <zlib.h>
 
hw/ppc/virtex_ml507.c +1 -1
index 92b4394..6728ba7 100644
@@ -27,7 +27,7 @@
 #include "hw/char/serial.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/boards.h"
 #include "sysemu/device_tree.h"
 #include "hw/loader.h"
hw/sh4/r2d.c +1 -1
index fe82bd6..3e4818e 100644
@@ -26,7 +26,7 @@
 #include "hw/sysbus.h"
 #include "hw/hw.h"
 #include "hw/sh4/sh.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/pci/pci.h"
hw/timer/tusb6010.c +1 -1
index 533938a..50edc06 100644
@@ -23,7 +23,7 @@
 #include "hw/usb.h"
 #include "hw/arm/omap.h"
 #include "hw/irq.h"
-#include "hw/arm/devices.h"
+#include "hw/devices.h"
 #include "hw/sysbus.h"
 
 typedef struct TUSBState {
include/hw/arm/arm.h renamed from include/hw/arm.h +0 -0
similarity index 100%
rename from include/hw/arm.h
rename to include/hw/arm/arm.h
include/hw/devices.h renamed from include/hw/arm/devices.h +0 -0
similarity index 100%
rename from include/hw/arm/devices.h
rename to include/hw/devices.h
target-arm/arm-semi.c +1 -1
index 77718c4..f0637a4 100644
@@ -34,7 +34,7 @@
 #else
 #include "qemu-common.h"
 #include "exec/gdbstub.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 #endif
 
 #define TARGET_SYS_OPEN        0x01
target-arm/kvm.c +1 -1
index 6bfb103..d8acace 100644
@@ -21,7 +21,7 @@
 #include "sysemu/kvm.h"
 #include "kvm_arm.h"
 #include "cpu.h"
-#include "hw/arm.h"
+#include "hw/arm/arm.h"
 
 const KVMCapabilityInfo kvm_arch_required_capabilities[] = {
     KVM_CAP_LAST_INFO
Signature · 1 line
1.8.1.4
#2 lore raw

PATCH 2/12 Add linux-headers to QEMU_INCLUDES

In reply to Paolo Bonzini

From: Jan Kiszka <[email protected]>

virtio/dataplane/vring.c requires the Linux headers and is built for all targets. So we need to add the corresponding include to QEMU_INCLUDES to avoid that outdated distribution headers are used.

---
 configure | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
configure +1 -4
index 73df181..258c82a 100755
@@ -544,6 +544,7 @@ Haiku)
   if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
     audio_possible_drivers="$audio_possible_drivers fmod"
   fi
+  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
 ;;
 esac
 
@@ -4227,10 +4228,6 @@ else
 fi
 includes="-I\$(SRC_PATH)/tcg $includes"
 
-if test "$linux" = "yes" ; then
-  includes="-I\$(SRC_PATH)/linux-headers $includes"
-fi
-
 for i in $ARCH $TARGET_BASE_ARCH ; do
   case "$i" in
   alpha)
Signature · 1 line
1.8.1.4
#3 lore raw

PATCH 3/12 Fix failure to create q35 machine

In reply to Paolo Bonzini

From: Hu Tao <[email protected]>

This is a regression introduced by c0907c9e6417c. How to reproduce:

$ qemu-system-x86_64 -nodefaults -vnc :0 -M q35
qemu-system-x86_64: Unknown device 'q35-pcihost' for default sysbus
Aborted (core dumped)
---
 default-configs/i386-softmmu.mak   | 2 +-
 default-configs/x86_64-softmmu.mak | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
default-configs/i386-softmmu.mak +1 -1
index 4ac0694..6d9d364 100644
@@ -42,6 +42,6 @@ CONFIG_ISA_TESTDEV=y
 CONFIG_VMPORT=y
 CONFIG_SGA=y
 CONFIG_LPC_ICH9=y
-CONFIG_Q35=y
+CONFIG_PCI_Q35=y
 CONFIG_APIC=y
 CONFIG_IOAPIC=y
default-configs/x86_64-softmmu.mak +1 -1
index bf4091c..3b06310 100644
@@ -42,6 +42,6 @@ CONFIG_ISA_TESTDEV=y
 CONFIG_VMPORT=y
 CONFIG_SGA=y
 CONFIG_LPC_ICH9=y
-CONFIG_Q35=y
+CONFIG_PCI_Q35=y
 CONFIG_APIC=y
 CONFIG_IOAPIC=y
Signature · 1 line
1.8.1.4
#4 lore raw

PATCH 4/12 hw: Add lost ARM core again

In reply to Paolo Bonzini

From: Stefan Weil <[email protected]>

Commit 0434e30afb6175212389811e0b28b948eb3c1e40 accidentally removed the compilation of arm11mpcore.c.

---
 default-configs/arm-softmmu.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
default-configs/arm-softmmu.mak +1 -1
index 31725a9..27cbe3d 100644
@@ -34,8 +34,8 @@ CONFIG_PFLASH_CFI02=y
 CONFIG_MICRODRIVE=y
 CONFIG_USB_MUSB=y
 
-CONFIG_ARM5MPCORE=y
 CONFIG_ARM9MPCORE=y
+CONFIG_ARM11MPCORE=y
 CONFIG_ARM15MPCORE=y
 
 CONFIG_ARM_GIC=y
Signature · 1 line
1.8.1.4
#5 lore raw

PATCH 5/12 acpi: move declarations from pc.h to acpi.h

In reply to Paolo Bonzini

From: "Michael S. Tsirkin" <[email protected]>

Functions defined in acpi/ should be declared in
acpi.h

---
 arch_init.c            | 1 +
 hw/i386/pc.c           | 1 +
 hw/i386/pc_piix.c      | 1 +
 include/hw/acpi/acpi.h | 7 +++++++
 include/hw/i386/pc.h   | 8 --------
 5 files changed, 10 insertions(+), 8 deletions(-)
arch_init.c +1 -0
index 769ce77..fba0889 100644
@@ -49,6 +49,7 @@
 #include "qmp-commands.h"
 #include "trace.h"
 #include "exec/cpu-all.h"
+#include "hw/acpi/acpi.h"
 
 #ifdef DEBUG_ARCH_INIT
 #define DPRINTF(fmt, ...) \
hw/i386/pc.c +1 -0
index 8d75b34..0d6e72b 100644
@@ -52,6 +52,7 @@
 #include "sysemu/arch_init.h"
 #include "qemu/bitmap.h"
 #include "qemu/config-file.h"
+#include "hw/acpi/acpi.h"
 
 /* debug PC/ISA interrupts */
 //#define DEBUG_IRQ
hw/i386/pc_piix.c +1 -0
index cff8013..943758a 100644
@@ -43,6 +43,7 @@
 #include "hw/xen/xen.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
+#include "hw/acpi/acpi.h"
 #include "cpu.h"
 #ifdef CONFIG_XEN
 #  include <xen/hvm/hvm_info_table.h>
include/hw/acpi/acpi.h +7 -0
index e18ef28..4cd52c1 100644
@@ -154,4 +154,11 @@ void acpi_gpe_reset(ACPIREGS *ar);
 void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val);
 uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr);
 
+/* acpi.c */
+extern int acpi_enabled;
+extern char unsigned *acpi_tables;
+extern size_t acpi_tables_len;
+
+void acpi_table_add(const QemuOpts *opts, Error **errp);
+
 #endif /* !QEMU_HW_ACPI_H */
include/hw/i386/pc.h +0 -8
index 5d40914..9bcc819 100644
@@ -107,14 +107,6 @@ void cpu_smm_register(cpu_set_smm_t callback, void *arg);
 
 void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name);
 
-/* acpi.c */
-extern int acpi_enabled;
-extern char unsigned *acpi_tables;
-extern size_t acpi_tables_len;
-
-void acpi_bios_init(void);
-void acpi_table_add(const QemuOpts *opts, Error **errp);
-
 /* acpi_piix.c */
 
 i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
Signature · 1 line
1.8.1.4
#6 lore raw

PATCH 6/12 acpi.h: make it self contained

In reply to Paolo Bonzini

From: "Michael S. Tsirkin" <[email protected]>

Headers shouldn't assume another header is included, pull in everything necessary.

---
 include/hw/acpi/acpi.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/hw/acpi/acpi.h +6 -0
index 4cd52c1..635be7b 100644
@@ -19,6 +19,12 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#include "qapi/error.h"
+#include "qemu/typedefs.h"
+#include "qemu/notify.h"
+#include "qemu/option.h"
+#include "exec/memory.h"
+
 /* from linux include/acpi/actype.h */
 /* Default ACPI register widths */
 
Signature · 1 line
1.8.1.4
#7 lore raw

PATCH 7/12 configure: fix TPM logic

In reply to Paolo Bonzini

A non-native i386 or x86_64 emulator should not have TPM passthrough support, since the TPM is only present for those hosts.

---
 configure                          | 24 ++++++++++++++++++------
 default-configs/i386-softmmu.mak   |  3 +--
 default-configs/x86_64-softmmu.mak |  3 +--
 tpm/Makefile.objs                  |  4 +---
 4 files changed, 21 insertions(+), 13 deletions(-)
configure +18 -6
index 258c82a..1c1e369 100755
@@ -2337,6 +2337,15 @@ EOF
 fi
 
 ##########################################
+# TPM passthrough is only on x86 Linux
+
+if test "$targetos" = Linux && test "$cpu" = i386 -o "$cpu" = x86_64; then
+  tpm_passthrough=$tpm
+else
+  tpm_passthrough=no
+fi
+
+##########################################
 # adjust virtio-blk-data-plane based on linux-aio
 
 if test "$virtio_blk_data_plane" = "yes" -a \
@@ -3436,6 +3445,7 @@ echo "virtio-blk-data-plane $virtio_blk_data_plane"
 echo "gcov              $gcov_tool"
 echo "gcov enabled      $gcov"
 echo "TPM support       $tpm"
+echo "TPM passthrough   $tpm_passthrough"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -3811,6 +3821,14 @@ bsd)
 ;;
 esac
 
+# TPM passthrough support?
+if test "$tpm" = "yes"; then
+  echo 'CONFIG_TPM=$(CONFIG_SOFTMMU)' >> $config_host_mak
+  if test "$tpm_passthrough" = "yes"; then
+    echo "CONFIG_TPM_PASSTHROUGH=y" >> $config_host_mak
+  fi
+fi
+
 # use default implementation for tracing backend-specific routines
 trace_default=yes
 echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
@@ -4338,12 +4356,6 @@ if test "$gprof" = "yes" ; then
   fi
 fi
 
-if test "$tpm" = "yes"; then
-  if test "$target_softmmu" = "yes" ; then
-    echo "CONFIG_TPM=y" >> $config_host_mak
-  fi
-fi
-
 if test "$ARCH" = "tci"; then
   linker_script=""
 else
default-configs/i386-softmmu.mak +1 -2
index 6d9d364..368a776 100644
@@ -27,8 +27,7 @@ CONFIG_HPET=y
 CONFIG_APPLESMC=y
 CONFIG_I8259=y
 CONFIG_PFLASH_CFI01=y
-CONFIG_TPM_TIS=y
-CONFIG_TPM_PASSTHROUGH=y
+CONFIG_TPM_TIS=$(CONFIG_TPM)
 CONFIG_PCI_HOTPLUG=y
 CONFIG_MC146818RTC=y
 CONFIG_PAM=y
default-configs/x86_64-softmmu.mak +1 -2
index 3b06310..2711b83 100644
@@ -27,8 +27,7 @@ CONFIG_HPET=y
 CONFIG_APPLESMC=y
 CONFIG_I8259=y
 CONFIG_PFLASH_CFI01=y
-CONFIG_TPM_TIS=y
-CONFIG_TPM_PASSTHROUGH=y
+CONFIG_TPM_TIS=$(CONFIG_TPM)
 CONFIG_PCI_HOTPLUG=y
 CONFIG_MC146818RTC=y
 CONFIG_PAM=y
tpm/Makefile.objs +1 -3
index 8676824..366e4a7 100644
@@ -1,6 +1,4 @@
 common-obj-y = tpm.o
-ifeq ($(CONFIG_TPM),y)
-common-obj-y += tpm_backend.o
+common-obj-$(CONFIG_TPM) += tpm_backend.o
 common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o
 common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
-endif
Signature · 1 line
1.8.1.4
#8 lore raw

Re: [Qemu-devel] [PATCH 07/12] configure: fix TPM logic

configure echo "virtio-blk-data-plane $virtio_blk_data_plane" · line 3451

Quoted 13 lines · Paolo Bonzini
configure +1 -0
index 258c82a..1c1e369 100755
@@ -3436,6 +3445,7 @@ echo "virtio-blk-data-plane $virtio_blk_data_plane"
 echo "gcov              $gcov_tool"
 echo "gcov enabled      $gcov"
 echo "TPM support       $tpm"
+echo "TPM passthrough   $tpm_passthrough"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"

(tiny merge conflict with 0a12ec87)

configure +0 -0
diff --cc configure
index a97bf31,1c1e369..0000000
@@@ -3503,7 -3445,7 +3513,8 @@@ echo "virtio-blk-data-plane $virtio_blk
  echo "gcov              $gcov_tool"
  echo "gcov enabled      $gcov"
  echo "TPM support       $tpm"
+ echo "TPM passthrough   $tpm_passthrough"
 +echo "libssh2 support   $libssh2"

if test "$sdl_too_old" = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"

#9 lore raw

Re: [Qemu-devel] [PATCH 07/12] configure: fix TPM logic

In reply to Paolo Bonzini
Quoted 1 line · Paolo Bonzini

+if test "$targetos" = Linux && test "$cpu" = i386 -o "$cpu" = x86_64; then

test -o is deprecated by POSIX; better to use
if test ... && ( test ... || test ... ); then

in new code.

thanks
-- PMM

#10 lore raw

Re: [Qemu-devel] [PATCH 07/12] configure: fix TPM logic

Il 15/04/2013 18:09, Peter Maydell ha scritto:

Quoted 5 lines
Quoted 1 line
Quoted 1 line

+if test "$targetos" = Linux && test "$cpu" = i386 -o "$cpu" = x86_64; then

test -o is deprecated by POSIX; better to use
if test ... && ( test ... || test ... ); then

in new code.

True, on the other hand "(.*test" has no match at all in configure; and since we know that $cpu does not begin with a dash, it is portable in practice.

I would agree with you, but it looks like convention trumps the suggested practice.

Paolo

#11 lore raw

Re: [Qemu-devel] [PATCH 07/12] configure: fix TPM logic

Quoted 5 lines · Paolo Bonzini

Il 15/04/2013 18:09, Peter Maydell ha scritto:

Quoted 4 lines
Quoted 1 line
Quoted 1 line

+if test "$targetos" = Linux && test "$cpu" = i386 -o "$cpu" = x86_64; then

test -o is deprecated by POSIX; better to use
if test ... && ( test ... || test ... ); then

Quoted 8 lines
Quoted 1 line

in new code.

True, on the other hand "(.*test" has no match at all in configure; and since we know that $cpu does not begin with a dash, it is portable in practice.

I would agree with you, but it looks like convention trumps the suggested practice.

I've been consistently saying this in code review for all new shell code for some time now. You just happen to have the first example of X && (Y || Z); most of configure's conditionals are not that complex.

-- PMM

#12 lore raw

Re: [Qemu-devel] [PATCH 07/12] configure: fix TPM logic

In reply to Paolo Bonzini
Quoted 5 lines · Paolo Bonzini

A non-native i386 or x86_64 emulator should not have TPM passthrough support, since the TPM is only present for those hosts.

Breaks the build for me:

make: Entering directory `/work/armbru/qemu/bld-x86'
make[1]: *** No rule to make target ../tpm/tpm_tis.o', needed by qemu-system-x86_64'. make[1]: Target `all' not remade because of errors.
make: *** [subdir-x86_64-softmmu] Error 2
make: Target `all' not remade because of errors.
make: Leaving directory `/work/armbru/qemu/bld-x86'

Workaround: drop --enable-tpm.

#13 lore raw

Re: [Qemu-devel] [PATCH 07/12] configure: fix TPM logic

Il 16/04/2013 10:28, Markus Armbruster ha scritto:

Quoted 10 lines

Breaks the build for me:

make: Entering directory `/work/armbru/qemu/bld-x86'
make[1]: *** No rule to make target ../tpm/tpm_tis.o', needed by qemu-system-x86_64'. make[1]: Target `all' not remade because of errors.
make: *** [subdir-x86_64-softmmu] Error 2
make: Target `all' not remade because of errors.
make: Leaving directory `/work/armbru/qemu/bld-x86'

Workaround: drop --enable-tpm.

I had a stale .o in my build directory. Sending patch, BTW why isn't TPM enabled by default?

Paolo

#14 lore raw

PATCH 8/12 tpm: reorganize headers and split hardware part

In reply to Paolo Bonzini

The TPM subsystem does not have a full front-end/back-end separation. The sole available backend, tpm_passthrough, depends on the data structures of the sole available frontend, tpm_tis.

However, we can at least try to split the user interface (tpm.c) from the implementation (hw/tpm). The patches makes tpm.c not include tpm_int.h, which is shared between tpm_tis.c and tpm_passthrough.c; instead it moves more stuff to tpm_backend.h.

---
 Makefile.objs                                      |  2 +-
 backends/tpm.c                                     | 38 +++++++++++++-
 hw/Makefile.objs                                   |  1 +
 {tpm => hw/tpm}/Makefile.objs                      |  2 -
 {tpm => hw/tpm}/tpm_int.h                          | 37 +-------------
 {tpm => hw/tpm}/tpm_passthrough.c                  | 20 +++++++-
 {tpm => hw/tpm}/tpm_tis.c                          |  2 +-
 {tpm => hw/tpm}/tpm_tis.h                          |  5 --
 include/backends/tpm.h                             | 42 +++++++++++++++-
 include/{tpm => sysemu}/tpm.h                      |  2 -
 .../sysemu/tpm_backend_int.h                       |  0
 monitor.c                                          |  2 +-
 tpm/tpm.c => tpm.c                                 | 19 +------
 tpm/tpm_backend.c                                  | 58 ----------------------
 vl.c                                               |  2 +-
 15 files changed, 104 insertions(+), 128 deletions(-)
 rename {tpm => hw/tpm}/Makefile.objs (61%)
 rename {tpm => hw/tpm}/tpm_int.h (50%)
 rename {tpm => hw/tpm}/tpm_passthrough.c (96%)
 rename {tpm => hw/tpm}/tpm_tis.c (99%)
 rename {tpm => hw/tpm}/tpm_tis.h (96%)
 rename include/{tpm => sysemu}/tpm.h (82%)
 rename tpm/tpm_backend.h => include/sysemu/tpm_backend_int.h (100%)
 rename tpm/tpm.c => tpm.c (93%)
 delete mode 100644 tpm/tpm_backend.c
Makefile.objs +1 -1
index e568c01..a473348 100644
@@ -65,7 +65,7 @@ common-obj-y += bt-host.o bt-vhci.o
 
 common-obj-y += dma-helpers.o
 common-obj-y += vl.o
-common-obj-y += tpm/
+common-obj-y += tpm.o
 
 common-obj-$(CONFIG_SLIRP) += slirp/
 
backends/tpm.c +37 -1
index 28148c2..0580108 100644
@@ -13,8 +13,10 @@
  */
 
 #include "backends/tpm.h"
-#include "tpm/tpm_int.h"
 #include "qapi/qmp/qerror.h"
+#include "sysemu/tpm.h"
+#include "qemu/thread.h"
+#include "sysemu/tpm_backend_int.h"
 
 enum TpmType tpm_backend_get_type(TPMBackend *s)
 {
@@ -137,6 +139,40 @@ static void tpm_backend_instance_init(Object *obj)
                              NULL);
 }
 
+void tpm_backend_thread_deliver_request(TPMBackendThread *tbt)
+{
+   g_thread_pool_push(tbt->pool, (gpointer)TPM_BACKEND_CMD_PROCESS_CMD, NULL);
+}
+
+void tpm_backend_thread_create(TPMBackendThread *tbt,
+                               GFunc func, gpointer user_data)
+{
+    if (!tbt->pool) {
+        tbt->pool = g_thread_pool_new(func, user_data, 1, TRUE, NULL);
+        g_thread_pool_push(tbt->pool, (gpointer)TPM_BACKEND_CMD_INIT, NULL);
+    }
+}
+
+void tpm_backend_thread_end(TPMBackendThread *tbt)
+{
+    if (tbt->pool) {
+        g_thread_pool_push(tbt->pool, (gpointer)TPM_BACKEND_CMD_END, NULL);
+        g_thread_pool_free(tbt->pool, FALSE, TRUE);
+        tbt->pool = NULL;
+    }
+}
+
+void tpm_backend_thread_tpm_reset(TPMBackendThread *tbt,
+                                  GFunc func, gpointer user_data)
+{
+    if (!tbt->pool) {
+        tpm_backend_thread_create(tbt, func, user_data);
+    } else {
+        g_thread_pool_push(tbt->pool, (gpointer)TPM_BACKEND_CMD_TPM_RESET,
+                           NULL);
+    }
+}
+
 static const TypeInfo tpm_backend_info = {
     .name = TYPE_TPM_BACKEND,
     .parent = TYPE_OBJECT,
hw/Makefile.objs +1 -0
index 1cb86fa..b7a1613 100644
@@ -22,6 +22,7 @@ devices-dirs-$(CONFIG_SOFTMMU) += scsi/
 devices-dirs-$(CONFIG_SOFTMMU) += sd/
 devices-dirs-$(CONFIG_SOFTMMU) += ssi/
 devices-dirs-$(CONFIG_SOFTMMU) += timer/
+devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-$(CONFIG_SOFTMMU) += usb/
 devices-dirs-$(CONFIG_SOFTMMU) += virtio/
 devices-dirs-$(CONFIG_SOFTMMU) += watchdog/
hw/tpm/Makefile.objs renamed from tpm/Makefile.objs +0 -2
similarity index 61%
rename from tpm/Makefile.objs
rename to hw/tpm/Makefile.objs
index 366e4a7..99f5983 100644
@@ -1,4 +1,2 @@
-common-obj-y = tpm.o
-common-obj-$(CONFIG_TPM) += tpm_backend.o
 common-obj-$(CONFIG_TPM_TIS) += tpm_tis.o
 common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
hw/tpm/tpm_int.h renamed from tpm/tpm_int.h +1 -36
similarity index 50%
rename from tpm/tpm_int.h
rename to hw/tpm/tpm_int.h
index 340bfd5..08f87cb 100644
@@ -13,7 +13,7 @@
 #define TPM_TPM_INT_H
 
 #include "exec/memory.h"
-#include "tpm/tpm_tis.h"
+#include "tpm_tis.h"
 
 /* overall state of the TPM interface */
 struct TPMState {
@@ -33,32 +33,6 @@ struct TPMState {
 
 #define TPM(obj) OBJECT_CHECK(TPMState, (obj), TYPE_TPM_TIS)
 
-struct TPMDriverOps {
-    enum TpmType type;
-    /* get a descriptive text of the backend to display to the user */
-    const char *(*desc)(void);
-
-    TPMBackend *(*create)(QemuOpts *opts, const char *id);
-    void (*destroy)(TPMBackend *t);
-
-    /* initialize the backend */
-    int (*init)(TPMBackend *t, TPMState *s, TPMRecvDataCB *datacb);
-    /* start up the TPM on the backend */
-    int (*startup_tpm)(TPMBackend *t);
-    /* returns true if nothing will ever answer TPM requests */
-    bool (*had_startup_error)(TPMBackend *t);
-
-    size_t (*realloc_buffer)(TPMSizedBuffer *sb);
-
-    void (*deliver_request)(TPMBackend *t);
-
-    void (*reset)(TPMBackend *t);
-
-    void (*cancel_cmd)(TPMBackend *t);
-
-    bool (*get_tpm_established_flag)(TPMBackend *t);
-};
-
 struct tpm_req_hdr {
     uint16_t tag;
     uint32_t len;
@@ -83,13 +57,4 @@ struct tpm_resp_hdr {
 
 #define TPM_ORD_GetTicks          0xf1
 
-TPMBackend *qemu_find_tpm(const char *id);
-int tpm_register_model(enum TpmModel model);
-int tpm_register_driver(const TPMDriverOps *tdo);
-void tpm_display_backend_drivers(void);
-const TPMDriverOps *tpm_get_backend_driver(const char *type);
-void tpm_write_fatal_error_response(uint8_t *out, uint32_t out_len);
-
-extern const TPMDriverOps tpm_passthrough_driver;
-
 #endif /* TPM_TPM_INT_H */
hw/tpm/tpm_passthrough.c renamed from tpm/tpm_passthrough.c +18 -2
similarity index 96%
rename from tpm/tpm_passthrough.c
rename to hw/tpm/tpm_passthrough.c
index 1fdd66d..5781277 100644
@@ -31,8 +31,8 @@
 #include "tpm_int.h"
 #include "hw/hw.h"
 #include "hw/i386/pc.h"
+#include "sysemu/tpm_backend_int.h"
 #include "tpm_tis.h"
-#include "tpm_backend.h"
 
 /* #define DEBUG_TPM */
 
@@ -48,6 +48,8 @@
 #define TPM_PASSTHROUGH(obj) \
     OBJECT_CHECK(TPMPassthruState, (obj), TYPE_TPM_PASSTHROUGH)
 
+static const TPMDriverOps tpm_passthrough_driver;
+
 /* data structures */
 typedef struct TPMPassthruThreadParams {
     TPMState *tpm_state;
@@ -96,6 +98,20 @@ static uint32_t tpm_passthrough_get_size_from_buffer(const uint8_t *buf)
     return be32_to_cpu(resp->len);
 }
 
+/*
+ * Write an error message in the given output buffer.
+ */
+static void tpm_write_fatal_error_response(uint8_t *out, uint32_t out_len)
+{
+    if (out_len >= sizeof(struct tpm_resp_hdr)) {
+        struct tpm_resp_hdr *resp = (struct tpm_resp_hdr *)out;
+
+        resp->tag = cpu_to_be16(TPM_TAG_RSP_COMMAND);
+        resp->len = cpu_to_be32(sizeof(struct tpm_resp_hdr));
+        resp->errcode = cpu_to_be32(TPM_FAIL);
+    }
+}
+
 static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
                                         const uint8_t *in, uint32_t in_len,
                                         uint8_t *out, uint32_t out_len)
@@ -512,7 +528,7 @@ static void tpm_passthrough_destroy(TPMBackend *tb)
     g_free(tpm_pt->tpm_dev);
 }
 
-const TPMDriverOps tpm_passthrough_driver = {
+static const TPMDriverOps tpm_passthrough_driver = {
     .type                     = TPM_TYPE_PASSTHROUGH,
     .desc                     = tpm_passthrough_create_desc,
     .create                   = tpm_passthrough_create,
hw/tpm/tpm_tis.c renamed from tpm/tpm_tis.c +1 -1
similarity index 99%
rename from tpm/tpm_tis.c
rename to hw/tpm/tpm_tis.c
index f0a45846..faa3cec 100644
@@ -26,7 +26,7 @@
 #include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/pci/pci_ids.h"
-#include "tpm/tpm_tis.h"
+#include "tpm_tis.h"
 #include "qemu-common.h"
 
 /*#define DEBUG_TIS */
hw/tpm/tpm_tis.h renamed from tpm/tpm_tis.h +0 -5
similarity index 96%
rename from tpm/tpm_tis.h
rename to hw/tpm/tpm_tis.h
index 1be4ddc..916152a 100644
@@ -35,11 +35,6 @@
 #define TYPE_TPM_TIS                "tpm-tis"
 
 
-struct TPMSizedBuffer {
-    uint32_t size;
-    uint8_t  *buffer;
-};
-
 typedef enum {
     TPM_TIS_STATE_IDLE = 0,
     TPM_TIS_STATE_READY,
include/backends/tpm.h +41 -1

64 lines not on this page · raw message

include/sysemu/tpm.h renamed from include/tpm/tpm.h +0 -2
similarity index 82%
rename from include/tpm/tpm.h
rename to include/sysemu/tpm.h
index 2d457c4..13febdd 100644
@@ -15,8 +15,6 @@
 #include "qemu/option.h"
 
 typedef struct TPMState TPMState;
-typedef struct TPMSizedBuffer TPMSizedBuffer;
-typedef void (TPMRecvDataCB)(TPMState *, uint8_t locty);
 
 int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
 int tpm_init(void);
include/sysemu/tpm_backend_int.h renamed from tpm/tpm_backend.h +0 -0
similarity index 100%
rename from tpm/tpm_backend.h
rename to include/sysemu/tpm_backend_int.h
monitor.c +1 -1
index c897e80..e605822 100644
@@ -47,7 +47,7 @@
 #include "migration/migration.h"
 #include "sysemu/kvm.h"
 #include "qemu/acl.h"
-#include "tpm/tpm.h"
+#include "sysemu/tpm.h"
 #include "qapi/qmp/qint.h"
 #include "qapi/qmp/qfloat.h"
 #include "qapi/qmp/qlist.h"
tpm.c renamed from tpm/tpm.c +2 -17
similarity index 93%
rename from tpm/tpm.c
rename to tpm.c
index 1f4ac8d..1e94314 100644
@@ -16,8 +16,7 @@
 #include "monitor/monitor.h"
 #include "qapi/qmp/qerror.h"
 #include "backends/tpm.h"
-#include "tpm_int.h"
-#include "tpm/tpm.h"
+#include "sysemu/tpm.h"
 #include "qemu/config-file.h"
 #include "qmp-commands.h"
 
@@ -62,20 +61,6 @@ static bool tpm_model_is_registered(enum TpmModel model)
     return false;
 }
 
-/*
- * Write an error message in the given output buffer.
- */
-void tpm_write_fatal_error_response(uint8_t *out, uint32_t out_len)
-{
-    if (out_len >= sizeof(struct tpm_resp_hdr)) {
-        struct tpm_resp_hdr *resp = (struct tpm_resp_hdr *)out;
-
-        resp->tag = cpu_to_be16(TPM_TAG_RSP_COMMAND);
-        resp->len = cpu_to_be32(sizeof(struct tpm_resp_hdr));
-        resp->errcode = cpu_to_be32(TPM_FAIL);
-    }
-}
-
 const TPMDriverOps *tpm_get_backend_driver(const char *type)
 {
     int i;
@@ -109,7 +94,7 @@ int tpm_register_driver(const TPMDriverOps *tdo)
  * Walk the list of available TPM backend drivers and display them on the
  * screen.
  */
-void tpm_display_backend_drivers(void)
+static void tpm_display_backend_drivers(void)
 {
     int i;
 
tpm/tpm_backend.c deleted +0 -58

58 lines not on this page · raw message

vl.c +1 -1
index d694a90..ce7bed7 100644
@@ -139,7 +139,7 @@ int main(int argc, char **argv)
 #include "sysemu/blockdev.h"
 #include "hw/block/block.h"
 #include "migration/block.h"
-#include "tpm/tpm.h"
+#include "sysemu/tpm.h"
 #include "sysemu/dma.h"
 #include "audio/audio.h"
 #include "migration/migration.h"
Signature · 1 line
1.8.1.4
#15 lore raw

Re: [Qemu-devel] [PATCH 08/12] tpm: reorganize headers and split hardware part

Quoted 14 lines · Paolo Bonzini
include/backends/tpm.h +1 -1
index 9e93cc5..a96b110 100644
@@ -18,7 +18,7 @@
 #include "qapi/error.h"
 #include "qapi-types.h"
 #include "qemu/option.h"
-#include "tpm/tpm.h"
+#include "sysemu/tpm.h"
 
 #define TYPE_TPM_BACKEND "tpm-backend"
 #define TPM_BACKEND(obj) \

include/backends/tpm.h line 36

Quoted 7 lines
include/backends/tpm.h +1 -0
@@ -30,6 +30,7 @@
 
 typedef struct TPMBackendClass TPMBackendClass;
 typedef struct TPMBackend TPMBackend;
+typedef struct TPMState TPMState;
 
 typedef struct TPMDriverOps TPMDriverOps;
 

This breaks the build for me:

include/sysemu/tpm_backend.h:33: error: redefinition of typedef 'TPMState' include/sysemu/tpm.h:17: note: previous declaration of 'TPMState' was here

The prev decl. is from 8f0605cc.

"include/sysemu/tpm.h" seems like a "more common" header, so suggesting to drop the typedef from the backend. Anyway the x86_64 default config build completes that way.

Thanks,
Laszlo

include/sysemu/tpm_backend.h +0 -1
index a96b110..4667874 100644
@@ -30,7 +30,6 @@
 
 typedef struct TPMBackendClass TPMBackendClass;
 typedef struct TPMBackend TPMBackend;
-typedef struct TPMState TPMState;
 
 typedef struct TPMDriverOps TPMDriverOps;
#16 lore raw

PATCH 9/12 sysemu: avoid proliferation of include/ subdirectories

In reply to Paolo Bonzini
---
 backends/baum.c                                  | 2 +-
 backends/msmouse.c                               | 2 +-
 backends/rng-egd.c                               | 4 ++--
 backends/rng-random.c                            | 4 ++--
 backends/rng.c                                   | 2 +-
 backends/tpm.c                                   | 2 +-
 bt-host.c                                        | 2 +-
 bt-vhci.c                                        | 2 +-
 gdbstub.c                                        | 2 +-
 hmp.c                                            | 2 +-
 hw/arm/omap2.c                                   | 2 +-
 hw/arm/pxa2xx.c                                  | 2 +-
 hw/arm/strongarm.c                               | 2 +-
 hw/bt/core.c                                     | 2 +-
 hw/bt/hci-csr.c                                  | 4 ++--
 hw/bt/hci.c                                      | 2 +-
 hw/char/cadence_uart.c                           | 2 +-
 hw/char/debugcon.c                               | 2 +-
 hw/char/escc.c                                   | 2 +-
 hw/char/etraxfs_ser.c                            | 2 +-
 hw/char/exynos4210_uart.c                        | 2 +-
 hw/char/grlib_apbuart.c                          | 2 +-
 hw/char/imx_serial.c                             | 2 +-
 hw/char/ipoctal232.c                             | 2 +-
 hw/char/lm32_juart.c                             | 2 +-
 hw/char/lm32_uart.c                              | 2 +-
 hw/char/mcf_uart.c                               | 2 +-
 hw/char/milkymist-uart.c                         | 2 +-
 hw/char/omap_uart.c                              | 2 +-
 hw/char/parallel.c                               | 2 +-
 hw/char/pl011.c                                  | 2 +-
 hw/char/sclpconsole.c                            | 2 +-
 hw/char/serial.c                                 | 2 +-
 hw/char/sh_serial.c                              | 2 +-
 hw/char/spapr_vty.c                              | 2 +-
 hw/char/virtio-console.c                         | 2 +-
 hw/char/xen_console.c                            | 2 +-
 hw/char/xilinx_uartlite.c                        | 2 +-
 hw/core/qdev-properties-system.c                 | 2 +-
 hw/core/qdev-properties.c                        | 2 +-
 hw/display/xenfb.c                               | 2 +-
 hw/isa/pc87312.c                                 | 2 +-
 hw/mips/mips_fulong2e.c                          | 2 +-
 hw/mips/mips_malta.c                             | 2 +-
 hw/misc/ivshmem.c                                | 2 +-
 hw/net/xgmac.c                                   | 2 +-
 hw/ppc/spapr_events.c                            | 2 +-
 hw/ppc/spapr_rtas.c                              | 2 +-
 hw/sparc/leon3.c                                 | 2 +-
 hw/tpm/tpm_passthrough.c                         | 2 +-
 hw/tpm/tpm_tis.c                                 | 2 +-
 hw/usb/ccid-card-emulated.c                      | 2 +-
 hw/usb/ccid-card-passthru.c                      | 2 +-
 hw/usb/dev-bluetooth.c                           | 2 +-
 hw/usb/dev-serial.c                              | 2 +-
 hw/usb/redirect.c                                | 2 +-
 hw/virtio/virtio-rng.c                           | 2 +-
 hw/xen/xen_backend.c                             | 2 +-
 hw/xtensa/xtensa_lx60.c                          | 2 +-
 include/hw/virtio/virtio-rng.h                   | 4 ++--
 include/{bt => sysemu}/bt.h                      | 0
 include/{char => sysemu}/char.h                  | 0
 include/{qemu => sysemu}/rng-random.h            | 0
 include/{qemu => sysemu}/rng.h                   | 0
 include/{backends/tpm.h => sysemu/tpm_backend.h} | 0
 monitor.c                                        | 2 +-
 net/slirp.c                                      | 2 +-
 qemu-char.c                                      | 2 +-
 qmp.c                                            | 2 +-
 qtest.c                                          | 2 +-
 slirp/slirp.c                                    | 2 +-
 spice-qemu-char.c                                | 2 +-
 tpm.c                                            | 2 +-
 ui/console.c                                     | 2 +-
 ui/gtk.c                                         | 2 +-
 util/event_notifier-posix.c                      | 2 +-
 vl.c                                             | 4 ++--
 xen-all.c                                        | 2 +-
 78 files changed, 78 insertions(+), 78 deletions(-)
 rename include/{bt => sysemu}/bt.h (100%)
 rename include/{char => sysemu}/char.h (100%)
 rename include/{qemu => sysemu}/rng-random.h (100%)
 rename include/{qemu => sysemu}/rng.h (100%)
 rename include/{backends/tpm.h => sysemu/tpm_backend.h} (100%)
backends/baum.c +1 -1
index ea9ffe8..4cba79f 100644
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
 #include <brlapi.h>
backends/msmouse.c +1 -1
index 61052fe..0ac05a0 100644
@@ -23,7 +23,7 @@
  */
 #include <stdlib.h>
 #include "qemu-common.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "ui/console.h"
 
 #define MSMOUSE_LO6(n) ((n) & 0x3f)
backends/rng-egd.c +2 -2
index cc6f5ee..9e5a536 100644
@@ -10,8 +10,8 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include "qemu/rng.h"
-#include "char/char.h"
+#include "sysemu/rng.h"
+#include "sysemu/char.h"
 #include "qapi/qmp/qerror.h"
 #include "hw/qdev.h" /* just for DEFINE_PROP_CHR */
 
backends/rng-random.c +2 -2
index acd20af..d5761f2 100644
@@ -10,8 +10,8 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include "qemu/rng-random.h"
-#include "qemu/rng.h"
+#include "sysemu/rng-random.h"
+#include "sysemu/rng.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/main-loop.h"
 
backends/rng.c +1 -1
index 3d33898..85cb83f 100644
@@ -10,7 +10,7 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include "qemu/rng.h"
+#include "sysemu/rng.h"
 #include "qapi/qmp/qerror.h"
 
 void rng_backend_request_entropy(RngBackend *s, size_t size,
backends/tpm.c +1 -1
index 0580108..b735801 100644
@@ -12,7 +12,7 @@
  * Based on backends/rng.c by Anthony Liguori
  */
 
-#include "backends/tpm.h"
+#include "sysemu/tpm_backend.h"
 #include "qapi/qmp/qerror.h"
 #include "sysemu/tpm.h"
 #include "qemu/thread.h"
bt-host.c +1 -1
index 2da3c32..49205bf 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "qemu/main-loop.h"
 
 #ifndef _WIN32
bt-vhci.c +1 -1
index a6a7ab0..e267c8a 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "hw/bt.h"
 #include "qemu/main-loop.h"
 
gdbstub.c +1 -1
index 22ab12c..e80e1d3 100644
@@ -30,7 +30,7 @@
 #include "qemu.h"
 #else
 #include "monitor/monitor.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "sysemu/sysemu.h"
 #include "exec/gdbstub.h"
 #endif
hmp.c +1 -1
index dbe9b90..1675e77 100644
@@ -15,7 +15,7 @@
 
 #include "hmp.h"
 #include "net/net.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/option.h"
 #include "qemu/timer.h"
 #include "qmp-commands.h"
hw/arm/omap2.c +1 -1
index a4b4146..2ff4371 100644
@@ -24,7 +24,7 @@
 #include "hw/arm/omap.h"
 #include "sysemu/sysemu.h"
 #include "qemu/timer.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/block/flash.h"
 #include "hw/arm/soc_dma.h"
 #include "hw/sysbus.h"
hw/arm/pxa2xx.c +1 -1
index bbecc77..24b03a0 100644
@@ -13,7 +13,7 @@
 #include "hw/char/serial.h"
 #include "hw/i2c/i2c.h"
 #include "hw/ssi.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "sysemu/blockdev.h"
 
 static struct {
hw/arm/strongarm.c +1 -1
index 75a813e..4d49306 100644
@@ -30,7 +30,7 @@
 #include "strongarm.h"
 #include "qemu/error-report.h"
 #include "hw/arm/arm.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "sysemu/sysemu.h"
 #include "hw/ssi.h"
 
hw/bt/core.c +1 -1
index 24ef4de..49012e0 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu-common.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "hw/bt.h"
 
 /* Slave implementations can ignore this */
hw/bt/hci-csr.c +2 -2
index 55c819b..16a25cb 100644
@@ -19,10 +19,10 @@
  */
 
 #include "qemu-common.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/timer.h"
 #include "hw/irq.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "hw/bt.h"
 
 struct csrhci_s {
hw/bt/hci.c +1 -1
index a76edea..b53cd5d 100644
@@ -21,7 +21,7 @@
 #include "qemu-common.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "hw/bt.h"
 
 struct bt_hci_s {
hw/char/cadence_uart.c +1 -1
index 421ec99..c2a7834 100644
@@ -17,7 +17,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/timer.h"
 
 #ifdef CADENCE_UART_ERR_DEBUG
hw/char/debugcon.c +1 -1
index 0588eeb..02c9577 100644
@@ -25,7 +25,7 @@
  */
 
 #include "hw/hw.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/isa/isa.h"
 #include "hw/i386/pc.h"
 
hw/char/escc.c +1 -1
index 067b055..c2cb07f 100644
@@ -25,7 +25,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/char/escc.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "ui/console.h"
 #include "trace.h"
 
hw/char/etraxfs_ser.c +1 -1
index b7499d7..11820f5 100644
@@ -23,7 +23,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/log.h"
 
 #define D(x)
hw/char/exynos4210_uart.c +1 -1
index 8b4e72c..5751816 100644
@@ -21,7 +21,7 @@
 
 #include "hw/sysbus.h"
 #include "sysemu/sysemu.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 #include "hw/arm/exynos4210.h"
 
hw/char/grlib_apbuart.c +1 -1
index 62f7990..a64453f 100644
@@ -23,7 +23,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 #include "trace.h"
 
hw/char/imx_serial.c +1 -1
index d7ec209..2a2c230 100644
@@ -20,7 +20,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "sysemu/sysemu.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/arm/imx.h"
 
 //#define DEBUG_SERIAL 1
hw/char/ipoctal232.c +1 -1
index fcd0af3..c9698a6 100644
@@ -10,7 +10,7 @@
 
 #include "ipack.h"
 #include "qemu/bitops.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 /* #define DEBUG_IPOCTAL */
 
hw/char/lm32_juart.c +1 -1
index 93f0d15..839f3eb 100644
@@ -20,7 +20,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "trace.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 #include "hw/lm32/lm32_juart.h"
 
hw/char/lm32_uart.c +1 -1
index 32bc37a..99721ab 100644
@@ -25,7 +25,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "trace.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/error-report.h"
 
 enum {
hw/char/mcf_uart.c +1 -1
index 6724b1b..3ec4705 100644
@@ -7,7 +7,7 @@
  */
 #include "hw/hw.h"
 #include "hw/m68k/mcf.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "exec/address-spaces.h"
 
 typedef struct {
hw/char/milkymist-uart.c +1 -1
index f3bdf69..cbc7d73 100644
@@ -24,7 +24,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "trace.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/error-report.h"
 
 enum {
hw/char/omap_uart.c +1 -1
index 26c1426..5bb36ed 100644
@@ -17,7 +17,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/hw.h"
 #include "hw/arm/omap.h"
 #include "hw/char/serial.h"
hw/char/parallel.c +1 -1
index 863a6fb..b5e867f 100644
@@ -23,7 +23,7 @@
  * THE SOFTWARE.
  */
 #include "hw/hw.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/isa/isa.h"
 #include "hw/i386/pc.h"
 #include "sysemu/sysemu.h"
hw/char/pl011.c +1 -1
index 332d5b9..7079ef6 100644
@@ -8,7 +8,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 typedef struct {
     SysBusDevice busdev;
hw/char/sclpconsole.c +1 -1
index 42ed54c..bcc7893 100644
@@ -18,7 +18,7 @@
 
 #include "hw/s390x/sclp.h"
 #include "hw/s390x/event-facility.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 typedef struct ASCIIConsoleData {
     EventBufferHeader ebh;
hw/char/serial.c +1 -1
index 1151bf1..66b6348 100644
@@ -24,7 +24,7 @@
  */
 
 #include "hw/char/serial.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/timer.h"
 #include "exec/address-spaces.h"
 
hw/char/sh_serial.c +1 -1
index 450c7d8..b328643 100644
@@ -26,7 +26,7 @@
  */
 #include "hw/hw.h"
 #include "hw/sh4/sh.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "exec/address-spaces.h"
 
 //#define DEBUG_SERIAL
hw/char/spapr_vty.c +1 -1
index 9df018a..afcec1f 100644
@@ -1,5 +1,5 @@
 #include "hw/qdev.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
 
hw/char/virtio-console.c +1 -1
index 31f672c..5035030 100644
@@ -10,7 +10,7 @@
  * the COPYING file in the top-level directory.
  */
 
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/error-report.h"
 #include "trace.h"
 #include "hw/virtio/virtio-serial.h"
hw/char/xen_console.c +1 -1
index efc3232..eb7f450 100644
@@ -30,7 +30,7 @@
 #include <sys/mman.h>
 
 #include "hw/hw.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/xen/xen_backend.h"
 
 #include <xen/io/console.h>
hw/char/xilinx_uartlite.c +1 -1
index 079f4d4..3f7e989 100644
@@ -23,7 +23,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 #define DUART(x)
 
hw/core/qdev-properties-system.c +1 -1
index 8c2e152..0eada32 100644
@@ -17,7 +17,7 @@
 #include "hw/block/block.h"
 #include "net/hub.h"
 #include "qapi/visitor.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 static void get_pointer(Object *obj, Visitor *v, Property *prop,
                         const char *(*print)(void *ptr),
hw/core/qdev-properties.c +1 -1
index 9a0872d..ddde18e 100644
@@ -5,7 +5,7 @@
 #include "hw/block/block.h"
 #include "net/hub.h"
 #include "qapi/visitor.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
                                   Error **errp)
hw/display/xenfb.c +1 -1
index 8e42661..e371569 100644
@@ -37,7 +37,7 @@
 
 #include "hw/hw.h"
 #include "ui/console.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/xen/xen_backend.h"
 
 #include <xen/event_channel.h>
hw/isa/pc87312.c +1 -1
index 9f5e185..82f7c80 100644
@@ -27,7 +27,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "trace.h"
 
 
hw/mips/mips_fulong2e.c +1 -1
index 3cf27fa..1aac93a 100644
@@ -30,7 +30,7 @@
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
 #include "hw/pci/pci.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "sysemu/sysemu.h"
 #include "audio/audio.h"
 #include "qemu/log.h"
hw/mips/mips_malta.c +1 -1
index a3e936b..86f42b2 100644
@@ -34,7 +34,7 @@
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
 #include "hw/pci/pci.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/arch_init.h"
 #include "hw/boards.h"
hw/misc/ivshmem.c +1 -1
index f92ce19..a19a6d6 100644
@@ -24,7 +24,7 @@
 #include "migration/migration.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/event_notifier.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 #include <sys/mman.h>
 #include <sys/types.h>
hw/net/xgmac.c +1 -1
index 5275f48..1d9074a 100644
@@ -25,7 +25,7 @@
  */
 
 #include "hw/sysbus.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/log.h"
 #include "net/net.h"
 #include "net/checksum.h"
hw/ppc/spapr_events.c +1 -1
index ff87ac3..c0d7e62 100644
@@ -26,7 +26,7 @@
  */
 #include "cpu.h"
 #include "sysemu/sysemu.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/qdev.h"
 #include "sysemu/device_tree.h"
 
hw/ppc/spapr_rtas.c +1 -1
index b71b59c..8ecaa5f 100644
@@ -26,7 +26,7 @@
  */
 #include "cpu.h"
 #include "sysemu/sysemu.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/qdev.h"
 #include "sysemu/device_tree.h"
 
hw/sparc/leon3.c +1 -1
index 3b27d40..78c77ef 100644
@@ -24,7 +24,7 @@
 #include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
hw/tpm/tpm_passthrough.c +1 -1
index 5781277..416b9b6 100644
@@ -27,7 +27,7 @@
 #include "qemu-common.h"
 #include "qapi/error.h"
 #include "qemu/sockets.h"
-#include "backends/tpm.h"
+#include "sysemu/tpm_backend.h"
 #include "tpm_int.h"
 #include "hw/hw.h"
 #include "hw/i386/pc.h"
hw/tpm/tpm_tis.c +1 -1
index faa3cec..d4d8152 100644
@@ -19,7 +19,7 @@
  * specification.
  */
 
-#include "backends/tpm.h"
+#include "sysemu/tpm_backend.h"
 #include "tpm_int.h"
 #include "block/block.h"
 #include "exec/address-spaces.h"
hw/usb/ccid-card-emulated.c +1 -1
index 29dcd7a..d534c94 100644
@@ -32,7 +32,7 @@
 #include <vcard_emul.h>
 
 #include "qemu/thread.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "monitor/monitor.h"
 #include "ccid.h"
 
hw/usb/ccid-card-passthru.c +1 -1
index 5e017ae..71a45f6 100644
@@ -8,7 +8,7 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/sockets.h"
 #include "monitor/monitor.h"
 #include "ccid.h"
hw/usb/dev-bluetooth.c +1 -1
index 0f8aa48..68cc1d4 100644
@@ -21,7 +21,7 @@
 #include "qemu-common.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "hw/bt.h"
 
 struct USBBtState {
hw/usb/dev-serial.c +1 -1
index 7c314dc..dd0a608 100644
@@ -12,7 +12,7 @@
 #include "qemu/error-report.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 //#define DEBUG_Serial
 
hw/usb/redirect.c +1 -1
index 0ddb081..a594e95 100644
@@ -30,7 +30,7 @@
 #include "monitor/monitor.h"
 #include "sysemu/sysemu.h"
 #include "qemu/iov.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 #include <dirent.h>
 #include <sys/ioctl.h>
hw/virtio/virtio-rng.c +1 -1
index 6079b2a..fcc223a 100644
@@ -14,7 +14,7 @@
 #include "qapi/qmp/qerror.h"
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-rng.h"
-#include "qemu/rng.h"
+#include "sysemu/rng.h"
 
 static bool is_guest_ready(VirtIORNG *vrng)
 {
hw/xen/xen_backend.c +1 -1
index 2a8c9f5..d82ce5d 100644
@@ -35,7 +35,7 @@
 #include <sys/signal.h>
 
 #include "hw/hw.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/log.h"
 #include "hw/xen/xen_backend.h"
 
hw/xtensa/xtensa_lx60.c +1 -1
index 2682eda..650dd31 100644
@@ -36,7 +36,7 @@
 #include "hw/sysbus.h"
 #include "hw/block/flash.h"
 #include "sysemu/blockdev.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "xtensa_bootparam.h"
 
 typedef struct LxBoardDesc {
include/hw/virtio/virtio-rng.h +2 -2
index 3711c97..c9cadc2 100644
@@ -12,8 +12,8 @@
 #ifndef _QEMU_VIRTIO_RNG_H
 #define _QEMU_VIRTIO_RNG_H
 
-#include "qemu/rng.h"
-#include "qemu/rng-random.h"
+#include "sysemu/rng.h"
+#include "sysemu/rng-random.h"
 
 /* The Virtio ID for the virtio rng device */
 #define VIRTIO_ID_RNG    4
include/sysemu/bt.h renamed from include/bt/bt.h +0 -0
similarity index 100%
rename from include/bt/bt.h
rename to include/sysemu/bt.h
include/sysemu/char.h renamed from include/char/char.h +0 -0
similarity index 100%
rename from include/char/char.h
rename to include/sysemu/char.h
include/sysemu/rng-random.h renamed from include/qemu/rng-random.h +0 -0
similarity index 100%
rename from include/qemu/rng-random.h
rename to include/sysemu/rng-random.h
include/sysemu/rng.h renamed from include/qemu/rng.h +0 -0
similarity index 100%
rename from include/qemu/rng.h
rename to include/sysemu/rng.h
include/sysemu/tpm_backend.h renamed from include/backends/tpm.h +0 -0
similarity index 100%
rename from include/backends/tpm.h
rename to include/sysemu/tpm_backend.h
monitor.c +1 -1
index e605822..2909ca1 100644
@@ -33,7 +33,7 @@
 #include "exec/gdbstub.h"
 #include "net/net.h"
 #include "net/slirp.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "ui/qemu-spice.h"
 #include "sysemu/sysemu.h"
 #include "monitor/monitor.h"
net/slirp.c +1 -1
index eabfee6..b3f35d5 100644
@@ -35,7 +35,7 @@
 #include "monitor/monitor.h"
 #include "qemu/sockets.h"
 #include "slirp/libslirp.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
 {
qemu-char.c +1 -1
index eae17fc..14707ea 100644
@@ -26,7 +26,7 @@
 #include "ui/console.h"
 #include "sysemu/sysemu.h"
 #include "qemu/timer.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "hw/usb.h"
 #include "qmp-commands.h"
 
qmp.c +1 -1
index 55b056b..ed6c7ef 100644
@@ -16,7 +16,7 @@
 #include "qemu-common.h"
 #include "sysemu/sysemu.h"
 #include "qmp-commands.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "ui/qemu-spice.h"
 #include "ui/vnc.h"
 #include "sysemu/kvm.h"
qtest.c +1 -1
index b03b68a..3bba3e5 100644
@@ -13,7 +13,7 @@
 
 #include "sysemu/qtest.h"
 #include "hw/qdev.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "exec/ioport.h"
 #include "exec/memory.h"
 #include "hw/irq.h"
slirp/slirp.c +1 -1
index bd9b7cb..80b28ea 100644
@@ -23,7 +23,7 @@
  */
 #include "qemu-common.h"
 #include "qemu/timer.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "slirp.h"
 #include "hw/hw.h"
 
spice-qemu-char.c +1 -1
index 535f955..c9403de 100644
@@ -1,7 +1,7 @@
 #include "config-host.h"
 #include "trace.h"
 #include "ui/qemu-spice.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include <spice.h>
 #include <spice-experimental.h>
 #include <spice/protocol.h>
tpm.c +1 -1
index 1e94314..c91da43 100644
@@ -15,7 +15,7 @@
 
 #include "monitor/monitor.h"
 #include "qapi/qmp/qerror.h"
-#include "backends/tpm.h"
+#include "sysemu/tpm_backend.h"
 #include "sysemu/tpm.h"
 #include "qemu/config-file.h"
 #include "qmp-commands.h"
ui/console.c +1 -1
index e84ba8b..0ed4211 100644
@@ -25,7 +25,7 @@
 #include "ui/console.h"
 #include "qemu/timer.h"
 #include "qmp-commands.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 //#define DEBUG_CONSOLE
 #define DEFAULT_BACKSCROLL 512
ui/gtk.c +1 -1
index 1a6bee6..1e105e2 100644
@@ -62,7 +62,7 @@
 #include "qmp-commands.h"
 #include "x_keymap.h"
 #include "keymaps.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 
 //#define DEBUG_GTK
 
util/event_notifier-posix.c +1 -1
index 713d756..8442c6e 100644
@@ -12,7 +12,7 @@
 
 #include "qemu-common.h"
 #include "qemu/event_notifier.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/main-loop.h"
 
 #ifdef CONFIG_EVENTFD
vl.c +2 -2
index ce7bed7..cdadad0 100644
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
 #include "hw/qdev.h"
 #include "hw/loader.h"
 #include "monitor/qdev.h"
-#include "bt/bt.h"
+#include "sysemu/bt.h"
 #include "net/net.h"
 #include "net/slirp.h"
 #include "monitor/monitor.h"
@@ -134,7 +134,7 @@ int main(int argc, char **argv)
 #include "sysemu/sysemu.h"
 #include "exec/gdbstub.h"
 #include "qemu/timer.h"
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/cache-utils.h"
 #include "sysemu/blockdev.h"
 #include "hw/block/block.h"
xen-all.c +1 -1
index 31f28fc..539a154 100644
@@ -16,7 +16,7 @@
 #include "hw/xen/xen_backend.h"
 #include "qmp-commands.h"
 
-#include "char/char.h"
+#include "sysemu/char.h"
 #include "qemu/range.h"
 #include "sysemu/xen-mapcache.h"
 #include "trace.h"
Signature · 1 line
1.8.1.4
#17 lore raw

PATCH 10/12 include: avoid useless includes of exec/ headers

In reply to Paolo Bonzini

Headers in include/exec/ are for the deepest innards of QEMU, they should almost never be included directly.

---
 arch_init.c            | 1 -
 dump.c                 | 6 +++++-
 hw/alpha/typhoon.c     | 1 -
 hw/ide/ahci.c          | 1 -
 hw/ide/internal.h      | 1 -
 hw/net/vmxnet_tx_pkt.c | 2 +-
 hw/usb/libhw.c         | 2 +-
 kvm-stub.c             | 1 -
 translate-all.c        | 5 ++---
 9 files changed, 9 insertions(+), 11 deletions(-)
arch_init.c +0 -1
index fba0889..92de1bd 100644
@@ -40,7 +40,6 @@
 #include "hw/audio/audio.h"
 #include "sysemu/kvm.h"
 #include "migration/migration.h"
-#include "exec/gdbstub.h"
 #include "hw/i386/smbios.h"
 #include "exec/address-spaces.h"
 #include "hw/audio/pcspk.h"
dump.c +5 -1
index a25f509..b34f143 100644
@@ -23,7 +23,6 @@
 #include "sysemu/memory_mapping.h"
 #include "qapi/error.h"
 #include "qmp-commands.h"
-#include "exec/gdbstub.h"
 
 static uint16_t cpu_convert_to_target16(uint16_t val, int endian)
 {
@@ -268,6 +267,11 @@ static int write_elf64_note(DumpState *s)
     return 0;
 }
 
+static inline int cpu_index(CPUState *cpu)
+{
+    return cpu->cpu_index + 1;
+}
+
 static int write_elf64_notes(DumpState *s)
 {
     CPUArchState *env;
hw/alpha/typhoon.c +0 -1
index 68420f4..1ead187 100644
@@ -7,7 +7,6 @@
  */
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "hw/hw.h"
 #include "hw/devices.h"
 #include "sysemu/sysemu.h"
hw/ide/ahci.c +0 -1
index d0ae8af..3405583 100644
@@ -29,7 +29,6 @@
 
 #include "monitor/monitor.h"
 #include "sysemu/dma.h"
-#include "exec/cpu-common.h"
 #include "internal.h"
 #include <hw/ide/pci.h>
 #include <hw/ide/ahci.h>
hw/ide/internal.h +0 -1
index 2c89b50..0efb2da 100644
@@ -8,7 +8,6 @@
  */
 #include <hw/ide.h>
 #include <hw/isa/isa.h>
-#include "exec/iorange.h"
 #include "sysemu/dma.h"
 #include "sysemu/sysemu.h"
 #include "hw/block/block.h"
hw/net/vmxnet_tx_pkt.c +1 -1
index b1e795b..fc01e4d 100644
@@ -15,6 +15,7 @@
  *
  */
 
+#include "hw/hw.h"
 #include "vmxnet_tx_pkt.h"
 #include "net/eth.h"
 #include "qemu-common.h"
@@ -22,7 +23,6 @@
 #include "net/checksum.h"
 #include "net/tap.h"
 #include "net/net.h"
-#include "exec/cpu-common.h"
 
 enum {
     VMXNET_TX_PKT_VHDR_FRAG = 0,
hw/usb/libhw.c +1 -1
index 75f022f..d2d4b51 100644
@@ -20,7 +20,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
-#include "exec/cpu-common.h"
+#include "hw/hw.h"
 #include "hw/usb.h"
 #include "sysemu/dma.h"
 
kvm-stub.c +0 -1
index 760aadc..f6137d3 100644
@@ -14,7 +14,6 @@
 #include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "cpu.h"
-#include "exec/gdbstub.h"
 #include "sysemu/kvm.h"
 
 KVMState *kvm_state;
translate-all.c +2 -3
index a98c646..08dd038 100644
@@ -35,9 +35,6 @@
 #include "cpu.h"
 #include "disas/disas.h"
 #include "tcg.h"
-#include "qemu/timer.h"
-#include "exec/memory.h"
-#include "exec/address-spaces.h"
 #if defined(CONFIG_USER_ONLY)
 #include "qemu.h"
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@@ -55,6 +52,8 @@
 #include <libutil.h>
 #endif
 #endif
+#else
+#include "exec/address-spaces.h"
 #endif
 
 #include "exec/cputlb.h"
Signature · 1 line
1.8.1.4
#18 lore raw

PATCH 11/12 memory: move core typedefs to qemu/typedefs.h

In reply to Paolo Bonzini
---
 include/exec/memory.h   | 5 -----
 include/qemu/typedefs.h | 4 ++++
 target-ppc/kvm_ppc.h    | 2 --
 3 files changed, 4 insertions(+), 7 deletions(-)
include/exec/memory.h +0 -5
index 2322732..9e88320 100644
@@ -27,7 +27,6 @@
 #include "qemu/int128.h"
 
 typedef struct MemoryRegionOps MemoryRegionOps;
-typedef struct MemoryRegion MemoryRegion;
 typedef struct MemoryRegionPortio MemoryRegionPortio;
 typedef struct MemoryRegionMmio MemoryRegionMmio;
 
@@ -157,8 +156,6 @@ struct MemoryRegionPortio {
 
 #define PORTIO_END_OF_LIST() { }
 
-typedef struct AddressSpace AddressSpace;
-
 /**
  * AddressSpace: describes a mapping of addresses to #MemoryRegion objects
  */
@@ -173,8 +170,6 @@ struct AddressSpace {
     QTAILQ_ENTRY(AddressSpace) address_spaces_link;
 };
 
-typedef struct MemoryRegionSection MemoryRegionSection;
-
 /**
  * MemoryRegionSection: describes a fragment of a #MemoryRegion
  *
include/qemu/typedefs.h +4 -0
index fd532a2..93aae81 100644
@@ -18,6 +18,10 @@ typedef struct DeviceState DeviceState;
 typedef struct BusState BusState;
 typedef struct BusClass BusClass;
 
+typedef struct AddressSpace AddressSpace;
+typedef struct MemoryRegion MemoryRegion;
+typedef struct MemoryRegionSection MemoryRegionSection;
+
 typedef struct NICInfo NICInfo;
 typedef struct HCIInfo HCIInfo;
 typedef struct AudioState AudioState;
target-ppc/kvm_ppc.h +0 -2
index c30b006..6bcc5cc 100644
@@ -9,8 +9,6 @@
 #ifndef __KVM_PPC_H__
 #define __KVM_PPC_H__
 
-#include "exec/memory.h"
-
 #define TYPE_HOST_POWERPC_CPU "host-" TYPE_POWERPC_CPU
 
 void kvmppc_init(void);
Signature · 1 line
1.8.1.4
#19 lore raw

PATCH 12/12 exec: remove useless declarations from memory-internal.h

In reply to Paolo Bonzini
---
 include/exec/memory-internal.h | 6 ------
 1 file changed, 6 deletions(-)
include/exec/memory-internal.h +0 -6
index 977467b..1b156fd 100644
@@ -49,12 +49,6 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr);
 void qemu_ram_free(ram_addr_t addr);
 void qemu_ram_free_from_ptr(ram_addr_t addr);
 
-struct MemoryRegion;
-struct MemoryRegionSection;
-
-void qemu_register_coalesced_mmio(hwaddr addr, ram_addr_t size);
-void qemu_unregister_coalesced_mmio(hwaddr addr, ram_addr_t size);
-
 #define VGA_DIRTY_FLAG       0x01
 #define CODE_DIRTY_FLAG      0x02
 #define MIGRATION_DIRTY_FLAG 0x08
Signature · 1 line
1.8.1.4
#20 lore raw
In reply to Paolo Bonzini

Il 15/04/2013 15:19, Paolo Bonzini ha scritto:

Quoted 6 lines

Anthony,

The following changes since commit e2ec3f976803b360c70d9ae2ba13852fa5d11665:

qjson: to_json() case QTYPE_QSTRING is buggy, rewrite (2013-04-13 19:40:25 +0000)

Quoted 7 lines

are available in the git repository at:

git://github.com/bonzini/qemu.git hw-dirs

for you to fetch changes up to 4355deaaff63d715115fdf1359bfbb7cbc374662:

exec: remove useless declarations from memory-internal.h (2013-04-15 15:17:31 +0200)

Pushed c72dd2d04bd28f7ec6b073316270258684ba5fc3 to the same, diff:

include/sysemu/tpm_backend.h +0 -1
index a96b110..4667874 100644
@@ -30,7 +30,6 @@
 
 typedef struct TPMBackendClass TPMBackendClass;
 typedef struct TPMBackend TPMBackend;
-typedef struct TPMState TPMState;
 
 typedef struct TPMDriverOps TPMDriverOps;
 

The error was not present with GCC 4.7.2.

Paolo

Quoted 196 lines

----------------------------------------------------------------
Hu Tao (1):
Fix failure to create q35 machine

Jan Kiszka (1):
Add linux-headers to QEMU_INCLUDES

Michael S. Tsirkin (2):
acpi: move declarations from pc.h to acpi.h
acpi.h: make it self contained

Paolo Bonzini (6):
configure: fix TPM logic
tpm: reorganize headers and split hardware part
sysemu: avoid proliferation of include/ subdirectories
include: avoid useless includes of exec/ headers
memory: move core typedefs to qemu/typedefs.h
exec: remove useless declarations from memory-internal.h

Peter Maydell (1):
arm: fix location of some include files

Stefan Weil (1):
hw: Add lost ARM core again

 Makefile.objs                                      |  2 +-
 arch_init.c                                        |  2 +-
 backends/baum.c                                    |  2 +-
 backends/msmouse.c                                 |  2 +-
 backends/rng-egd.c                                 |  4 +-
 backends/rng-random.c                              |  4 +-
 backends/rng.c                                     |  2 +-
 backends/tpm.c                                     | 40 ++++++++++++++-
 bt-host.c                                          |  2 +-
 bt-vhci.c                                          |  2 +-
 configure                                          | 29 +++++++----
 default-configs/arm-softmmu.mak                    |  2 +-
 default-configs/i386-softmmu.mak                   |  5 +-
 default-configs/x86_64-softmmu.mak                 |  5 +-
 dump.c                                             |  6 ++-
 gdbstub.c                                          |  2 +-
 hmp.c                                              |  2 +-
 hw/Makefile.objs                                   |  1 +
 hw/alpha/typhoon.c                                 |  3 +-
 hw/arm/armv7m.c                                    |  2 +-
 hw/arm/boot.c                                      |  2 +-
 hw/arm/collie.c                                    |  4 +-
 hw/arm/exynos4210.c                                |  2 +-
 hw/arm/exynos4_boards.c                            |  2 +-
 hw/arm/gumstix.c                                   |  2 +-
 hw/arm/highbank.c                                  |  4 +-
 hw/arm/integratorcp.c                              |  4 +-
 hw/arm/kzm.c                                       |  4 +-
 hw/arm/mainstone.c                                 |  4 +-
 hw/arm/musicpal.c                                  |  4 +-
 hw/arm/nseries.c                                   |  4 +-
 hw/arm/omap1.c                                     |  2 +-
 hw/arm/omap2.c                                     |  4 +-
 hw/arm/omap_sx1.c                                  |  2 +-
 hw/arm/palm.c                                      |  4 +-
 hw/arm/pic_cpu.c                                   |  2 +-
 hw/arm/pxa2xx.c                                    |  2 +-
 hw/arm/realview.c                                  |  4 +-
 hw/arm/spitz.c                                     |  4 +-
 hw/arm/stellaris.c                                 |  4 +-
 hw/arm/strongarm.c                                 |  4 +-
 hw/arm/tosa.c                                      |  4 +-
 hw/arm/versatilepb.c                               |  4 +-
 hw/arm/vexpress.c                                  |  4 +-
 hw/arm/xilinx_zynq.c                               |  2 +-
 hw/arm/z2.c                                        |  4 +-
 hw/block/m25p80.c                                  |  2 +-
 hw/bt/core.c                                       |  2 +-
 hw/bt/hci-csr.c                                    |  4 +-
 hw/bt/hci.c                                        |  2 +-
 hw/char/cadence_uart.c                             |  2 +-
 hw/char/debugcon.c                                 |  2 +-
 hw/char/escc.c                                     |  2 +-
 hw/char/etraxfs_ser.c                              |  2 +-
 hw/char/exynos4210_uart.c                          |  2 +-
 hw/char/grlib_apbuart.c                            |  2 +-
 hw/char/imx_serial.c                               |  2 +-
 hw/char/ipoctal232.c                               |  2 +-
 hw/char/lm32_juart.c                               |  2 +-
 hw/char/lm32_uart.c                                |  2 +-
 hw/char/mcf_uart.c                                 |  2 +-
 hw/char/milkymist-uart.c                           |  2 +-
 hw/char/omap_uart.c                                |  2 +-
 hw/char/parallel.c                                 |  2 +-
 hw/char/pl011.c                                    |  2 +-
 hw/char/sclpconsole.c                              |  2 +-
 hw/char/serial.c                                   |  2 +-
 hw/char/sh_serial.c                                |  2 +-
 hw/char/spapr_vty.c                                |  2 +-
 hw/char/virtio-console.c                           |  2 +-
 hw/char/xen_console.c                              |  2 +-
 hw/char/xilinx_uartlite.c                          |  2 +-
 hw/core/qdev-properties-system.c                   |  2 +-
 hw/core/qdev-properties.c                          |  2 +-
 hw/display/blizzard.c                              |  2 +-
 hw/display/sm501.c                                 |  2 +-
 hw/display/tc6393xb.c                              |  2 +-
 hw/display/xenfb.c                                 |  2 +-
 hw/i386/pc.c                                       |  1 +
 hw/i386/pc_piix.c                                  |  1 +
 hw/ide/ahci.c                                      |  1 -
 hw/ide/internal.h                                  |  1 -
 hw/input/stellaris_input.c                         |  2 +-
 hw/input/tsc2005.c                                 |  2 +-
 hw/input/tsc210x.c                                 |  2 +-
 hw/intc/armv7m_nvic.c                              |  2 +-
 hw/isa/pc87312.c                                   |  2 +-
 hw/lm32/lm32_boards.c                              |  2 +-
 hw/lm32/milkymist.c                                |  2 +-
 hw/microblaze/petalogix_ml605_mmu.c                |  2 +-
 hw/microblaze/petalogix_s3adsp1800_mmu.c           |  2 +-
 hw/mips/mips_fulong2e.c                            |  2 +-
 hw/mips/mips_malta.c                               |  2 +-
 hw/misc/cbus.c                                     |  2 +-
 hw/misc/ivshmem.c                                  |  2 +-
 hw/net/lan9118.c                                   |  2 +-
 hw/net/smc91c111.c                                 |  2 +-
 hw/net/vmxnet_tx_pkt.c                             |  2 +-
 hw/net/xgmac.c                                     |  2 +-
 hw/ppc/spapr_events.c                              |  2 +-
 hw/ppc/spapr_rtas.c                                |  2 +-
 hw/ppc/virtex_ml507.c                              |  2 +-
 hw/sh4/r2d.c                                       |  2 +-
 hw/sparc/leon3.c                                   |  2 +-
 hw/timer/tusb6010.c                                |  2 +-
 {tpm => hw/tpm}/Makefile.objs                      |  4 --
 {tpm => hw/tpm}/tpm_int.h                          | 37 +-------------
 {tpm => hw/tpm}/tpm_passthrough.c                  | 22 ++++++--
 {tpm => hw/tpm}/tpm_tis.c                          |  4 +-
 {tpm => hw/tpm}/tpm_tis.h                          |  5 --
 hw/usb/ccid-card-emulated.c                        |  2 +-
 hw/usb/ccid-card-passthru.c                        |  2 +-
 hw/usb/dev-bluetooth.c                             |  2 +-
 hw/usb/dev-serial.c                                |  2 +-
 hw/usb/libhw.c                                     |  2 +-
 hw/usb/redirect.c                                  |  2 +-
 hw/virtio/virtio-rng.c                             |  2 +-
 hw/xen/xen_backend.c                               |  2 +-
 hw/xtensa/xtensa_lx60.c                            |  2 +-
 include/exec/memory-internal.h                     |  6 ---
 include/exec/memory.h                              |  5 --
 include/hw/acpi/acpi.h                             | 13 +++++
 include/hw/{ => arm}/arm.h                         |  0
 include/hw/{arm => }/devices.h                     |  0
 include/hw/i386/pc.h                               |  8 ---
 include/hw/virtio/virtio-rng.h                     |  4 +-
 include/qemu/typedefs.h                            |  4 ++
 include/{bt => sysemu}/bt.h                        |  0
 include/{char => sysemu}/char.h                    |  0
 include/{qemu => sysemu}/rng-random.h              |  0
 include/{qemu => sysemu}/rng.h                     |  0
 include/{tpm => sysemu}/tpm.h                      |  2 -
 include/{backends/tpm.h => sysemu/tpm_backend.h}   | 42 +++++++++++++++-
 .../sysemu/tpm_backend_int.h                       |  0
 kvm-stub.c                                         |  1 -
 monitor.c                                          |  4 +-
 net/slirp.c                                        |  2 +-
 qemu-char.c                                        |  2 +-
 qmp.c                                              |  2 +-
 qtest.c                                            |  2 +-
 slirp/slirp.c                                      |  2 +-
 spice-qemu-char.c                                  |  2 +-
 target-arm/arm-semi.c                              |  2 +-
 target-arm/kvm.c                                   |  2 +-
 target-ppc/kvm_ppc.h                               |  2 -
 tpm/tpm.c => tpm.c                                 | 21 ++------
 tpm/tpm_backend.c                                  | 58 ----------------------
 translate-all.c                                    |  5 +-
 ui/console.c                                       |  2 +-
 ui/gtk.c                                           |  2 +-
 util/event_notifier-posix.c                        |  2 +-
 vl.c                                               |  6 +--
 xen-all.c                                          |  2 +-
 153 files changed, 297 insertions(+), 319 deletions(-)
 rename {tpm => hw/tpm}/Makefile.objs (55%)
 rename {tpm => hw/tpm}/tpm_int.h (50%)
 rename {tpm => hw/tpm}/tpm_passthrough.c (96%)
 rename {tpm => hw/tpm}/tpm_tis.c (99%)
 rename {tpm => hw/tpm}/tpm_tis.h (96%)
 rename include/hw/{ => arm}/arm.h (100%)
 rename include/hw/{arm => }/devices.h (100%)
 rename include/{bt => sysemu}/bt.h (100%)
 rename include/{char => sysemu}/char.h (100%)
 rename include/{qemu => sysemu}/rng-random.h (100%)
 rename include/{qemu => sysemu}/rng.h (100%)
 rename include/{tpm => sysemu}/tpm.h (82%)
 rename include/{backends/tpm.h => sysemu/tpm_backend.h} (77%)
 rename tpm/tpm_backend.h => include/sysemu/tpm_backend_int.h (100%)
 rename tpm/tpm.c => tpm.c (93%)
 delete mode 100644 tpm/tpm_backend.c