When the bmdma transfering ended, the unit were set to -1(0xFF), but after migration ide_pci_post_load() would change it to 1. This is not intended and it also would break the migration stability that we could not get exactly the same exec file before and after migration.
So this patch drop the ide_pci_post_load() and it would also make possible to debugging of migration through comparing the exec files. Signed-off-by: Jason Wang <jasow...@redhat.com> I'm not sure whether this is the best way to handle this issue. Should we still care about the migration from old guest? --- hw/ide/pci.c | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index ec90f26..b9ef122 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -186,25 +186,11 @@ static const VMStateDescription vmstate_bmdma = { } }; -static int ide_pci_post_load(void *opaque, int version_id) -{ - PCIIDEState *d = opaque; - int i; - - for(i = 0; i < 2; i++) { - /* current versions always store 0/1, but older version - stored bigger values. We only need last bit */ - d->bmdma[i].unit &= 1; - } - return 0; -} - const VMStateDescription vmstate_ide_pci = { .name = "ide", .version_id = 3, .minimum_version_id = 0, .minimum_version_id_old = 0, - .post_load = ide_pci_post_load, .fields = (VMStateField []) { VMSTATE_PCI_DEVICE(dev, PCIIDEState), VMSTATE_STRUCT_ARRAY(bmdma, PCIIDEState, 2, 0,