Skip to contentSkip to conversation

Migration: Add i82801b11 migration data

PATCH In review Dr. David Alan Gilbert (git) 4 participants 6 messages Apr 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Migration: Add i82801b11 migration data

From: "Dr. David Alan Gilbert" <[email protected]>

The i82801b11 bridge didn't have a vmsd and thus didn't send any migration data, including that of its parent PCIBridge object. The symptom being if the guest used any devices behind the bridge the guest crashed (mostly with various interrupt related issues).

Note: This will cause migration from old qemus that used this device to explicitly fail during migration as opposed to the guest crashing.

---
 hw/pci-bridge/i82801b11.c | 9 +++++++++
 1 file changed, 9 insertions(+)
hw/pci-bridge/i82801b11.c +9 -0
index 5c40708..2404e7e 100644
@@ -78,6 +78,14 @@ err_bridge:
     return rc;
 }
 
+static const VMStateDescription i82801b11_bridge_dev_vmstate = {
+    .name = "i82801b11_bridge",
+    .fields = (VMStateField[]) {
+        VMSTATE_PCI_DEVICE(parent_obj, PCIBridge),
+        VMSTATE_END_OF_LIST()
+    }
+};
+
 static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
 {
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
@@ -89,6 +97,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
     k->revision = ICH9_D2P_A2_REVISION;
     k->init = i82801b11_bridge_initfn;
     k->config_write = pci_bridge_write_config;
+    dc->vmsd = &i82801b11_bridge_dev_vmstate;
     set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
 }
 
Signature · 1 line
2.5.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 37 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The i82801b11 bridge didn't have a vmsd and thus didn't send any migration data, including that of its parent PCIBridge object. The symptom being if the guest used any devices behind the bridge the guest crashed (mostly with various interrupt related issues).

Note: This will cause migration from old qemus that used this device to explicitly fail during migration as opposed to the guest crashing.

---
  hw/pci-bridge/i82801b11.c | 9 +++++++++
  1 file changed, 9 insertions(+)
hw/pci-bridge/i82801b11.c +8 -0
index 5c40708..2404e7e 100644
@@ -78,6 +78,14 @@ err_bridge:
      return rc;
  }
 
+static const VMStateDescription i82801b11_bridge_dev_vmstate = {
+    .name = "i82801b11_bridge",
+    .fields = (VMStateField[]) {
+        VMSTATE_PCI_DEVICE(parent_obj, PCIBridge),
+        VMSTATE_END_OF_LIST()
+    }
+};
+
  static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
  {
      PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);

hw/pci-bridge/i82801b11.c static void i82801b11_bridge_class_init(ObjectClass *klass, void *data) · line 103

Quoted 7 lines
hw/pci-bridge/i82801b11.c +1 -0
@@ -89,6 +97,7 @@ static void i82801b11_bridge_class_init(ObjectClass *klass, void *data)
      k->revision = ICH9_D2P_A2_REVISION;
      k->init = i82801b11_bridge_initfn;
      k->config_write = pci_bridge_write_config;
+    dc->vmsd = &i82801b11_bridge_dev_vmstate;
      set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
  }
 

If this patch was enough we got lucky :)
Is not too late to make it to 2.6, right?

Thanks,
Marcel

#2 lore raw
Quoted 9 lines · Marcel Apfelbaum
Quoted 8 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The i82801b11 bridge didn't have a vmsd and thus didn't send any migration data, including that of its parent PCIBridge object. The symptom being if the guest used any devices behind the bridge the guest crashed (mostly with various interrupt related issues).

Quoted 5 lines
Quoted 2 lines

Note: This will cause migration from old qemus that used this device to explicitly fail during migration as opposed to the guest crashing.

If this patch was enough we got lucky :)
Is not too late to make it to 2.6, right?

You should add a line to
http://wiki.qemu.org/Planning/2.6#Known_issues
for things you think should be fixed for 2.6...

thanks
-- PMM

#3 lore raw
Quoted 13 lines · * Peter Maydell ([email protected]) wrote:
Quoted 11 lines · Marcel Apfelbaum
Quoted 10 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The i82801b11 bridge didn't have a vmsd and thus didn't send any migration data, including that of its parent PCIBridge object. The symptom being if the guest used any devices behind the bridge the guest crashed (mostly with various interrupt related issues).

Note: This will cause migration from old qemus that used this device to explicitly fail during migration as opposed to the guest crashing.

Quoted 6 lines
Quoted 2 lines

If this patch was enough we got lucky :)
Is not too late to make it to 2.6, right?

You should add a line to
http://wiki.qemu.org/Planning/2.6#Known_issues
for things you think should be fixed for 2.6...

It would be nice for it to be in 2.6, however it's not actually a 2.6 regression, it's been broken forever, but the difference is that libvirt started using that bridge for q35 recently.

Dave

Quoted 2 lines

thanks
-- PMM

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#4 lore raw
Quoted 3 lines · Dr. David Alan Gilbert

It would be nice for it to be in 2.6, however it's not actually a 2.6 regression, it's been broken forever, but the difference is that libvirt started using that bridge for q35 recently.

I think we should fix it, hard freeze is not limited to regressions.

Paolo

#5 lore raw
In reply to Peter Maydell
Quoted 13 lines · Peter Maydell
Quoted 11 lines · Marcel Apfelbaum
Quoted 10 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

The i82801b11 bridge didn't have a vmsd and thus didn't send any migration data, including that of its parent PCIBridge object. The symptom being if the guest used any devices behind the bridge the guest crashed (mostly with various interrupt related issues).

Note: This will cause migration from old qemus that used this device to explicitly fail during migration as opposed to the guest crashing.

Quoted 7 lines
Quoted 2 lines

If this patch was enough we got lucky :)
Is not too late to make it to 2.6, right?

You should add a line to
http://wiki.qemu.org/Planning/2.6#Known_issues
for things you think should be fixed for 2.6...

Done.

Thanks,
Marcel

Quoted 3 lines

thanks
-- PMM