mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
pcie_sriov: Register VFs after migration
pcie_sriov doesn't have code to restore its state after migration, but
igb, which uses pcie_sriov, naively claimed its migration capability.
Add code to register VFs after migration and fix igb migration.
Fixes: 3a977deebe
("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20250116-reuse-v20-11-7cb370606368@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
5e7dd17e43
commit
f9efcd4711
3 changed files with 16 additions and 0 deletions
|
@ -803,10 +803,17 @@ static bool migrate_is_not_pcie(void *opaque, int version_id)
|
|||
return !pci_is_express((PCIDevice *)opaque);
|
||||
}
|
||||
|
||||
static int pci_post_load(void *opaque, int version_id)
|
||||
{
|
||||
pcie_sriov_pf_post_load(opaque);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_pci_device = {
|
||||
.name = "PCIDevice",
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 1,
|
||||
.post_load = pci_post_load,
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_INT32_POSITIVE_LE(version_id, PCIDevice),
|
||||
VMSTATE_BUFFER_UNSAFE_INFO_TEST(config, PCIDevice,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue