mbox series

[RFC,v2,00/20] hw: Mark the device with no migratable fields

Message ID 20210117192446.23753-1-f4bug@amsat.org (mailing list archive)
Headers show
Series hw: Mark the device with no migratable fields | expand

Message

Philippe Mathieu-Daudé Jan. 17, 2021, 7:24 p.m. UTC
Since v1:
- Tried to address Dave and Daniel comments
- Added Peter R-b
- Handle GPEX device

This is a proof-of-concept after chatting with Peter Maydell
on IRC last year.

Introduce the vmstate_no_state_to_migrate structure, and
a reference to it: vmstate_qdev_no_state_to_migrate.
Use this reference in devices with no fields to migrate.

This is useful to catch devices missing vmstate, such:
- ads7846
- mcf-uart
- mcf-fec
- versatile_i2c
- ...

v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg719788.html

Philippe Mathieu-Daudé (20):
  migration/vmstate: Restrict vmstate_dummy to user-mode
  hw/core/qdev: Add vmstate_qdev_no_state_to_migrate
  hw/arm/armv7m: Mark the device with no migratable fields
  hw/arm/aspeed_soc: Mark the device with no migratable fields
  hw/arm/bcm283x: Mark devices with no migratable fields
  hw/arm/msf2-soc: Mark the device with no migratable fields
  hw/core/split-irq: Mark the device with no migratable fields
  hw/cpu/a9mpcore: Mark the device with no migratable fields
  hw/cpu/cluster: Mark the device with no migratable fields
  hw/usb/hcd-ohci: Mark the device with no migratable fields
  hw/intc/arm_gicv2m: Mark the device with no migratable fields
  hw/misc/armsse-cpuid: Mark the device with no migratable fields
  hw/misc/iotkit-sysinfo: Mark the device with no migratable fields
  hw/misc/unimp: Mark the device with no migratable fields
  hw/nubus/mac-nubus-bridge: Mark the device with no migratable fields
  hw/sparc64/sun4u: Mark devices with no migratable fields
  hw/pci-host/gpex: Mark device with no migratable fields
  hw/core/qdev: Display warning for devices missing migration state
  stubs/vmstate: Add VMSTATE_END_OF_LIST to vmstate_user_mode_cpu_dummy
  migration/vmstate: Simplify vmstate for user-mode CPU

 configure                    | 10 ++++++++++
 meson.build                  |  1 +
 hw/usb/hcd-ohci.h            |  2 ++
 include/hw/arm/bcm2836.h     |  5 +++--
 include/hw/arm/msf2-soc.h    | 11 ++++++-----
 include/hw/core/cpu.h        |  2 +-
 include/hw/cpu/a9mpcore.h    |  3 ++-
 include/hw/qdev-core.h       |  2 ++
 include/migration/vmstate.h  |  2 +-
 hw/arm/armv7m.c              |  1 +
 hw/arm/aspeed_soc.c          |  1 +
 hw/arm/bcm2835_peripherals.c |  1 +
 hw/arm/bcm2836.c             |  1 +
 hw/arm/msf2-soc.c            |  1 +
 hw/core/qdev.c               |  8 ++++++++
 hw/core/split-irq.c          |  1 +
 hw/cpu/a9mpcore.c            |  1 +
 hw/cpu/cluster.c             |  1 +
 hw/intc/arm_gicv2m.c         |  2 ++
 hw/misc/armsse-cpuid.c       |  1 +
 hw/misc/iotkit-sysinfo.c     |  1 +
 hw/misc/unimp.c              |  1 +
 hw/nubus/mac-nubus-bridge.c  |  1 +
 hw/pci-host/gpex.c           |  1 +
 hw/sparc64/sun4u.c           |  6 +++++-
 hw/usb/hcd-ohci.c            |  1 +
 migration/vmstate.c          |  7 +++++++
 stubs/vmstate.c              |  7 ++++++-
 28 files changed, 70 insertions(+), 12 deletions(-)