[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 18/18] hw/core/qdev: Display warning for devices missing migr
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 18/18] hw/core/qdev: Display warning for devices missing migration state |
Date: |
Fri, 3 Jul 2020 22:19:11 +0200 |
When built with --enable-qdev-debug, QEMU displays warnings
listing devices missing migration state:
$ qemu-system-arm -S -M spitz
qemu-system-arm: warning: missing migration state for type:
'pxa270-c0-arm-cpu'
qemu-system-arm: warning: missing migration state for type: 'serial'
qemu-system-arm: warning: missing migration state for type: 'pxa2xx-pcmcia'
qemu-system-arm: warning: missing migration state for type: 'pxa2xx-pcmcia'
qemu-system-arm: warning: missing migration state for type: 'pxa2xx-i2c-slave'
qemu-system-arm: warning: missing migration state for type: 'pxa2xx-i2c-slave'
qemu-system-arm: warning: missing migration state for type: 'ads7846'
qemu-system-arm: warning: missing migration state for type: 'max1111'
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
RFC because there might be something simpler than --enable-qdev-debug.
configure | 9 +++++++++
hw/core/qdev.c | 5 +++++
2 files changed, 14 insertions(+)
diff --git a/configure b/configure
index 8a65240d4a..d38efd5605 100755
--- a/configure
+++ b/configure
@@ -441,6 +441,7 @@ edk2_blobs="no"
pkgversion=""
pie=""
qom_cast_debug="yes"
+qdev_debug="no"
trace_backends="log"
trace_file="trace"
spice=""
@@ -1124,6 +1125,10 @@ for opt do
;;
--enable-qom-cast-debug) qom_cast_debug="yes"
;;
+ --disable-qdev-debug) qdev_debug="no"
+ ;;
+ --enable-qdev-debug) qdev_debug="yes"
+ ;;
--disable-virtfs) virtfs="no"
;;
--enable-virtfs) virtfs="yes"
@@ -6966,6 +6971,7 @@ echo "gcov enabled $gcov"
echo "TPM support $tpm"
echo "libssh support $libssh"
echo "QOM debugging $qom_cast_debug"
+echo "QDEV debugging $qdev_debug"
echo "Live block migration $live_block_migration"
echo "lzo support $lzo"
echo "snappy support $snappy"
@@ -7594,6 +7600,9 @@ fi
if test "$qom_cast_debug" = "yes" ; then
echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak
fi
+if test "$qdev_debug" = "yes" ; then
+ echo "CONFIG_QDEV_DEBUG=y" >> $config_host_mak
+fi
if test "$rbd" = "yes" ; then
echo "CONFIG_RBD=m" >> $config_host_mak
echo "RBD_CFLAGS=$rbd_cflags" >> $config_host_mak
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 0d18bc6d93..c2da1e0509 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -932,6 +932,11 @@ static void device_set_realized(Object *obj, bool value,
Error **errp)
&local_err) < 0) {
goto post_realize_fail;
}
+ } else {
+#ifdef CONFIG_QDEV_DEBUG
+ warn_report("missing migration state for type: '%s'",
+ object_get_typename(OBJECT(dev)));
+#endif
}
/*
--
2.21.3
- [PATCH 08/18] hw/core/split-irq: Mark the device with no migratable fields, (continued)
- [PATCH 08/18] hw/core/split-irq: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 09/18] hw/cpu/a9mpcore: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 10/18] hw/cpu/cluster: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 11/18] hw/usb/hcd-ohci: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 12/18] hw/intc/arm_gicv2m: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 15/18] hw/misc/unimp: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 13/18] hw/misc/armsse-cpuid: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 14/18] hw/misc/iotkit-sysinfo: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [PATCH 16/18] hw/nubus/mac-nubus-bridge: Mark the device with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- [RFC PATCH 18/18] hw/core/qdev: Display warning for devices missing migration state,
Philippe Mathieu-Daudé <=
- [PATCH 17/18] hw/sparc64/sun4u: Mark devices with no migratable fields, Philippe Mathieu-Daudé, 2020/07/03
- Re: [PATCH 00/18] hw: Mark the device with no migratable fields, no-reply, 2020/07/03
- Re: [PATCH 00/18] hw: Mark the device with no migratable fields, Peter Maydell, 2020/07/09