qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vms


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate
Date: Wed, 20 Jul 2011 14:51:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Red Hat/3.1.11-2.el6_1 Thunderbird/3.1.11

On 07/20/11 14:40, Peter Maydell wrote:
On 20 July 2011 11:09, Gerd Hoffmann<address@hidden>  wrote:
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -283,7 +283,12 @@ int qdev_init(DeviceState *dev)
         qdev_free(dev);
         return rc;
     }
-    if (dev->info->vmsd) {
+    if (dev->info->vmsd == NULL) {
+        /* TODO: fixup qemu source code, then make this an assert() */
+        error_report("WARNING: device %s has no vmstate\n", dev->info->name);
+    } else if (dev->info->vmsd == VMSD_NONE) {
+        /* device doesn't need vmstate */;
+    } else {

I would prefer it if we didn't add this sort of targeted-at-qemu-developers
warning unless there was a reasonable period of time before the next release
where devices which provoke the warning message can be fixed. In particular,
should we postpone putting in the warning message until after 0.15 branches?

Agree, makes sense to postpone that one to 0.16-devel, otherwise we'll just bug the users for no reason.

Pushed migration.2 branch with that patch dropped.

cheers,
  Gerd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]