From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Laurent Vivier" <laurent@vivier.eu>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Andrew Baumann" <Andrew.Baumann@microsoft.com>,
"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
qemu-arm@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Joel Stanley" <joel@jms.id.au>
Subject: [RFC PATCH 18/18] hw/core/qdev: Display warning for devices missing migration state
Date: Fri, 3 Jul 2020 22:19:11 +0200 [thread overview]
Message-ID: <20200703201911.26573-19-f4bug@amsat.org> (raw)
In-Reply-To: <20200703201911.26573-1-f4bug@amsat.org>
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
next prev parent reply other threads:[~2020-07-03 20:27 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 20:18 [PATCH 00/18] hw: Mark the device with no migratable fields Philippe Mathieu-Daudé
2020-07-03 20:18 ` [PATCH 01/18] migration/vmstate: Document vmstate_dummy Philippe Mathieu-Daudé
2020-07-16 9:22 ` Dr. David Alan Gilbert
2020-07-16 9:52 ` Daniel P. Berrangé
2020-07-16 10:00 ` Philippe Mathieu-Daudé
2020-07-03 20:18 ` [PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate Philippe Mathieu-Daudé
2020-07-09 19:00 ` Peter Maydell
2020-08-05 10:47 ` Dr. David Alan Gilbert
2020-07-03 20:18 ` [PATCH 03/18] hw/core/qdev: Add vmstate_qdev_no_state_to_migrate Philippe Mathieu-Daudé
2020-07-03 20:18 ` [PATCH 04/18] hw/arm/armv7m: Mark the device with no migratable fields Philippe Mathieu-Daudé
2020-07-09 19:03 ` Peter Maydell
2020-07-03 20:18 ` [PATCH 05/18] hw/arm/aspeed_soc: " Philippe Mathieu-Daudé
2020-07-03 20:18 ` [PATCH 06/18] hw/arm/bcm283x: Mark devices " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 07/18] hw/arm/msf2-soc: Mark the device " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 08/18] hw/core/split-irq: " Philippe Mathieu-Daudé
2020-07-09 19:04 ` Peter Maydell
2020-07-03 20:19 ` [PATCH 09/18] hw/cpu/a9mpcore: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 10/18] hw/cpu/cluster: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 11/18] hw/usb/hcd-ohci: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 12/18] hw/intc/arm_gicv2m: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 13/18] hw/misc/armsse-cpuid: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 14/18] hw/misc/iotkit-sysinfo: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 15/18] hw/misc/unimp: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 16/18] hw/nubus/mac-nubus-bridge: " Philippe Mathieu-Daudé
2020-07-03 20:19 ` [PATCH 17/18] hw/sparc64/sun4u: Mark devices " Philippe Mathieu-Daudé
2020-07-03 20:19 ` Philippe Mathieu-Daudé [this message]
2020-07-09 19:14 ` [RFC PATCH 18/18] hw/core/qdev: Display warning for devices missing migration state Peter Maydell
2021-01-17 17:28 ` Philippe Mathieu-Daudé
2020-07-03 21:02 ` [PATCH 00/18] hw: Mark the device with no migratable fields no-reply
2020-07-09 19:19 ` Peter Maydell
2021-01-14 15:49 ` Philippe Mathieu-Daudé
2021-01-18 7:33 ` Laurent Vivier
2021-01-18 9:22 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200703201911.26573-19-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=Andrew.Baumann@microsoft.com \
--cc=andrew@aj.id.au \
--cc=atar4qemu@gmail.com \
--cc=berrange@redhat.com \
--cc=clg@kaod.org \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=joel@jms.id.au \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=sundeep.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).