Skip to contentSkip to conversation

hw/pcie: fix the generic pcie root port to support migration

PATCH Superseded Marcel Apfelbaum 2 participants 3 messages Jun 7, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/pcie: fix the generic pcie root port to support migration

Add msix state to pcie-root-ports's vmstate
in order to support migration.

---
 hw/pci-bridge/gen_pcie_root_port.c | 1 +
 1 file changed, 1 insertion(+)
hw/pci-bridge/gen_pcie_root_port.c +1 -0
index 8ebffa8..d24aa8a 100644
@@ -54,6 +54,7 @@ static const VMStateDescription vmstate_rp_dev = {
         VMSTATE_PCI_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
         VMSTATE_STRUCT(parent_obj.parent_obj.parent_obj.exp.aer_log,
                        PCIESlot, 0, vmstate_pcie_aer_log, PCIEAERLog),
+        VMSTATE_MSIX(parent_obj.parent_obj, PCIEPort),
         VMSTATE_END_OF_LIST()
     }
 };
Signature · 1 line
2.9.4
#1 lore raw
Quoted 13 lines · * Marcel Apfelbaum ([email protected]) wrote:

Add msix state to pcie-root-ports's vmstate
in order to support migration.

---
 hw/pci-bridge/gen_pcie_root_port.c | 1 +
 1 file changed, 1 insertion(+)
hw/pci-bridge/gen_pcie_root_port.c +0 -0
index 8ebffa8..d24aa8a 100644

hw/pci-bridge/gen_pcie_root_port.c static const VMStateDescription vmstate_rp_dev = { · line 57

Quoted 4 lines
hw/pci-bridge/gen_pcie_root_port.c +1 -0
@@ -54,6 +54,7 @@ static const VMStateDescription vmstate_rp_dev = {
         VMSTATE_PCI_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
         VMSTATE_STRUCT(parent_obj.parent_obj.parent_obj.exp.aer_log,
                        PCIESlot, 0, vmstate_pcie_aer_log, PCIEAERLog),
+        VMSTATE_MSIX(parent_obj.parent_obj, PCIEPort),

That will cause a failure of migration from/to 2.9. Doesn't that need to be tied to the machine-type in a subsection?

Dave

Quoted 6 lines
hw/pci-bridge/gen_pcie_root_port.c +0 -0
         VMSTATE_END_OF_LIST()
     }
 };
Signature · 1 line
2.9.4

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

#2 lore raw
Quoted 9 lines · Dr. David Alan Gilbert
Quoted 8 lines · * Marcel Apfelbaum ([email protected]) wrote:

Add msix state to pcie-root-ports's vmstate
in order to support migration.

---
  hw/pci-bridge/gen_pcie_root_port.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 13 lines

hw/pci-bridge/gen_pcie_root_port.c static const VMStateDescription vmstate_rp_dev = { · line 57

Quoted 9 lines
hw/pci-bridge/gen_pcie_root_port.c +1 -0
index 8ebffa8..d24aa8a 100644
@@ -54,6 +54,7 @@ static const VMStateDescription vmstate_rp_dev = {
          VMSTATE_PCI_DEVICE(parent_obj.parent_obj.parent_obj, PCIESlot),
          VMSTATE_STRUCT(parent_obj.parent_obj.parent_obj.exp.aer_log,
                         PCIESlot, 0, vmstate_pcie_aer_log, PCIEAERLog),
+        VMSTATE_MSIX(parent_obj.parent_obj, PCIEPort),

That will cause a failure of migration from/to 2.9. Doesn't that need to be tied to the machine-type in a subsection?

Hi Dave,

Thanks for the review,
I'll repost with the fix.

Thanks,
Marcel

Quoted 11 lines

Dave

Quoted 6 lines
hw/pci-bridge/gen_pcie_root_port.c +0 -0
          VMSTATE_END_OF_LIST()
      }
  };
Signature · 1 line
2.9.4

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