Jason Baron 1de5345927 pcie: drop version_id field for live migration
While testing q35 live migration, I found that the migration would abort with
the following error: "Unknown savevm section type 76".

The error is due to this check failing in 'vmstate_load_state()':

    while(field->name) {
        if ((field->field_exists &&
             field->field_exists(opaque, version_id)) ||
            (!field->field_exists &&
             field->version_id <= version_id)) {

The VMSTATE_PCIE_DEVICE() currently has a 'version_id' set to 2. However,
'version_id' in the above check is 1. And thus we fail to load the pcie device
field. Further the code returns to 'qemu_loadvm_state()' which produces the
error that I saw.

I'm proposing to fix this by simply dropping the 'version_id' field from
VMSTATE_PCIE_DEVICE(). VMSTATE_PCI_DEVICE() defines no such field and further
the vmstate_pcie_device that VMSTATE_PCI_DEVICE() refers to is already
versioned. Thus, any versioning issues could be detected at the vmsd level.

Taking a step back, I think that the 'field->version_id' should be compared
against a saved version number for the field not the 'version_id'. Futhermore,
once vmstate_load_state() is called recursively on another vmsd, the check of:

    if (version_id > vmsd->version_id) {
        return -EINVAL;
    }

Will never fail since version_id is always equal to vmsd->version_id. So I'm
wondering why we aren't storing the vmsd version id of the source in the
migration stream?

This patch also renames the 'name' field of vmstate_pcie_device from:
PCIDevice -> PCIEDevice to differentiate it from vmstate_pci_device.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-09-07 09:02:44 +03:00
2012-06-21 20:04:24 +00:00
2012-08-09 18:34:57 +00:00
2012-08-28 20:38:39 +02:00
2012-08-20 11:05:08 -03:00
2012-08-13 16:10:18 -03:00
2012-08-28 20:38:39 +02:00
2012-08-06 19:31:55 -05:00
2012-08-30 16:36:21 -05:00
2012-09-07 09:02:44 +03:00
2012-07-07 09:04:42 +00:00
2011-11-07 10:57:36 -06:00
2009-09-12 07:36:22 +00:00
2009-05-13 20:54:26 +01:00
2012-04-19 16:51:47 +02:00
2011-12-02 10:50:57 +00:00
2011-08-27 15:42:35 +00:00
2012-08-04 15:51:23 +00:00
2012-08-13 13:20:50 -03:00
2011-09-16 08:26:31 -05:00
2012-01-13 10:37:00 +00:00
2009-03-10 21:43:35 +00:00
2010-11-01 00:54:06 +03:00
2012-05-14 07:27:24 +02:00
2012-03-12 10:30:23 +00:00
2012-08-14 19:01:26 +00:00
2012-08-02 18:12:17 +02:00
2012-03-30 08:14:11 -05:00
2012-08-15 15:18:54 +01:00
2012-01-10 09:36:43 +01:00
2012-03-07 13:03:51 +00:00
2012-04-01 20:30:23 +02:00
2012-03-14 22:20:27 +01:00
2012-08-16 13:41:16 -05:00
2012-07-28 09:23:11 +00:00
2012-03-14 22:20:27 +01:00
2009-09-12 07:36:22 +00:00
2012-08-13 14:17:53 -03:00
2012-06-25 15:37:15 +02:00
2011-12-02 10:50:57 +00:00
2012-07-27 21:13:04 +00:00
2012-03-14 22:20:27 +01:00
2011-12-02 10:50:57 +00:00
2011-08-27 15:42:35 +00:00
2011-08-27 15:42:35 +00:00
2012-05-08 14:30:09 -03:00
2011-10-16 13:13:05 +02:00
2012-08-21 15:16:29 -05:00
2012-03-19 15:17:21 +02:00
2011-06-14 03:08:57 +02:00
2011-12-09 11:25:22 +00:00
2011-12-02 10:50:57 +00:00
2012-05-10 08:33:34 -05:00
2012-03-15 10:39:52 -03:00
2012-08-08 13:51:12 +02:00
2011-08-27 15:42:35 +00:00
2012-02-15 09:39:21 -06:00
2012-02-17 08:33:32 -06:00
2012-02-17 08:33:32 -06:00
2012-08-03 18:28:37 -05:00
2012-07-10 18:27:33 +02:00
2012-08-08 13:51:12 +02:00
2011-02-09 10:33:54 +02:00
2012-01-13 10:55:56 -06:00
2012-01-10 18:23:58 +01:00
2012-04-07 14:00:45 +00:00
2012-01-10 18:23:58 +01:00
2009-11-17 08:49:39 -06:00
2010-07-01 14:27:13 -03:00
2012-02-03 10:41:08 -06:00
2012-07-14 11:53:03 +00:00
2012-07-14 11:53:03 +00:00
2010-05-19 12:45:54 -03:00
2012-04-15 21:25:16 +02:00
2012-04-07 14:00:45 +00:00
2012-08-16 13:41:16 -05:00
2012-08-16 13:41:16 -05:00
2011-03-13 14:44:22 +00:00
2011-12-15 09:20:50 -06:00
2011-12-06 10:07:04 +00:00
2012-08-13 14:17:53 -03:00
2012-08-13 14:17:53 -03:00
2009-11-17 08:49:38 -06:00
2010-05-19 12:45:54 -03:00
2010-10-01 10:12:43 -03:00
2012-08-16 13:41:15 -05:00
2012-08-16 13:41:15 -05:00
2010-05-19 12:45:54 -03:00
2010-05-19 12:45:54 -03:00
2012-04-24 09:50:31 -05:00
2010-09-18 05:53:14 +00:00
2011-12-11 17:50:43 -06:00
2011-10-01 09:31:08 +00:00
2011-08-27 15:42:35 +00:00
2010-03-14 22:04:50 +01:00
2011-10-31 21:52:17 +01:00
2012-06-22 10:34:21 +01:00
2008-12-04 11:29:42 +00:00
2009-10-01 16:12:16 -05:00
2012-08-09 18:34:57 +00:00
2012-09-05 11:44:53 -05:00
2011-08-27 15:42:35 +00:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
Description
No description provided
Readme 518 MiB
Languages
C 83%
C++ 7.7%
Python 3%
Dylan 2.2%
Shell 1.8%
Other 2.1%