mbox series

[00/13] fix --without-default-devices build and (mostly) tests

Message ID 20240509170044.190795-1-pbonzini@redhat.com
Headers show
Series fix --without-default-devices build and (mostly) tests | expand

Message

Paolo Bonzini May 9, 2024, 5 p.m. UTC
The recent change to make boards "default y" made them go away from
a --without-default-devices build, because the boards are not anymore
enabled explicitly in configs/devices/.

This is a problem for some targets that were not fully ready for this
and have generic target code that needs symbols from boards or devices.
The more complicated ones are s390x and i386.  In some cases some
components simply have to be required by target/ARCH/, but often
it is better to move some code around, associating it with boards
instead of targets or vice versa.

--without-default-devices builds in practice will always use a
custom config, but let's keep things tidy.  This series does
this for s390x (patches 1 to 5) and x86 (patches 6 to 12).  As a
small addendum, patch 13 fixes qtest for ARM (32- and 64-bit) on a
--without-default-devices build.

The series seems huge, but it's mostly code movement.  Patch 10
in particular moves board building code, which is unrelated to the
X86MachineState superclass and has many dependencies on NUMA or
hw/i386/pc-sysfw.c.

I suspect that there are more issues, for example when building
a CONFIG_MICROVM-only binary.  Fixing builds without boards on vanilla
upstream configs is the more pressing problem, though.

Patches 6 and 7 were tested with the Avocado Xen-on-KVM tests.

Paolo


Paolo Bonzini (13):
  s390x: move s390_cpu_addr2state to target/s390x/sigp.c
  s390_flic: add migration-enabled property
  s390: move css_migration_enabled from machine to css.c
  s390x: select correct components for no-board build
  tests/qtest: s390x: fix operation in a build without any boards or
    devices
  xen: initialize legacy backends from xen_bus_init()
  xen: register legacy backends via xen_backend_init
  i386: correctly select code in hw/i386 that depends on other
    components
  i386: pc: remove unnecessary MachineClass overrides
  hw/i386: split x86.c in multiple parts
  hw/i386: move rtc-reset-reinjection command out of hw/rtc
  i386: select correct components for no-board build
  tests/qtest: arm: fix operation in a build without any boards or
    devices

 include/hw/i386/x86.h               |   10 +-
 include/hw/rtc/mc146818rtc.h        |    2 +-
 include/hw/s390x/css.h              |    6 +
 include/hw/s390x/s390-virtio-ccw.h  |    7 -
 include/hw/s390x/s390_flic.h        |    1 +
 include/hw/xen/xen-legacy-backend.h |   14 +-
 include/hw/xen/xen_pvdev.h          |    1 -
 hw/9pfs/xen-9p-backend.c            |    8 +-
 hw/display/xenfb.c                  |    8 +-
 hw/i386/fw_cfg.c                    |    2 +
 hw/i386/monitor.c                   |   46 ++
 hw/i386/pc.c                        |    4 -
 hw/i386/x86-common.c                | 1007 +++++++++++++++++++++++++
 hw/i386/x86-cpu.c                   |   97 +++
 hw/i386/x86.c                       | 1058 +--------------------------
 hw/intc/ioapic-stub.c               |   29 +
 hw/intc/s390_flic.c                 |    6 +-
 hw/rtc/mc146818rtc.c                |   12 +-
 hw/s390x/css.c                      |   10 +-
 hw/s390x/s390-virtio-ccw.c          |   32 +-
 hw/usb/xen-usb.c                    |   14 +-
 hw/xen/xen-bus.c                    |    4 +
 hw/xen/xen-hvm-common.c             |    2 -
 hw/xen/xen-legacy-backend.c         |   16 -
 hw/xenpv/xen_machine_pv.c           |    5 +-
 target/s390x/sigp.c                 |   17 +
 tests/qtest/arm-cpu-features.c      |    4 +
 tests/qtest/drive_del-test.c        |    7 +-
 tests/qtest/migration-test.c        |    6 +
 tests/qtest/numa-test.c             |    4 +
 .gitlab-ci.d/buildtest.yml          |    4 +-
 hw/i386/meson.build                 |    7 +-
 hw/intc/meson.build                 |    2 +-
 target/i386/Kconfig                 |    1 +
 target/s390x/Kconfig                |    2 +
 35 files changed, 1289 insertions(+), 1166 deletions(-)
 create mode 100644 hw/i386/monitor.c
 create mode 100644 hw/i386/x86-common.c
 create mode 100644 hw/i386/x86-cpu.c
 create mode 100644 hw/intc/ioapic-stub.c