diff options
author | Paolo Bonzini | 2016-08-01 10:25:05 +0200 |
---|---|---|
committer | Paolo Bonzini | 2016-08-03 18:44:56 +0200 |
commit | 0b646f44d9976c33aee78b0427d1b357dde5dd50 (patch) | |
tree | b62ebc3c9f5d91b9ec7a7319d521d2571b33c56e /hw/scsi/mptsas.c | |
parent | qdist: return "(empty)" instead of NULL when printing an empty dist (diff) | |
download | qemu-0b646f44d9976c33aee78b0427d1b357dde5dd50.tar.gz qemu-0b646f44d9976c33aee78b0427d1b357dde5dd50.tar.xz qemu-0b646f44d9976c33aee78b0427d1b357dde5dd50.zip |
mptsas: really fix migration compatibility
Commit 2e2aa316 removed internal flag msi_in_use, but it
existed in vmstate. Restore it for migration to older QEMU
versions.
Reported-by: Amit Shah <amit.shah@redhat.com>
Suggested-by: Amit Shah <amit.shah@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Amit Shah <amit.shah@redhat.com>
Cc: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/mptsas.c')
-rw-r--r-- | hw/scsi/mptsas.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c index bebe5130fe..0e0a22f696 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/mptsas.c @@ -1295,6 +1295,8 @@ static void mptsas_scsi_init(PCIDevice *dev, Error **errp) /* With msi=auto, we fall back to MSI off silently */ error_free(err); + /* Only used for migration. */ + s->msi_in_use = (ret == 0); } memory_region_init_io(&s->mmio_io, OBJECT(s), &mptsas_mmio_ops, s, @@ -1370,7 +1372,7 @@ static const VMStateDescription vmstate_mptsas = { .post_load = mptsas_post_load, .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, MPTSASState), - VMSTATE_UNUSED(sizeof(bool)), /* Was msi_in_use */ + VMSTATE_BOOL(msi_in_use, MPTSASState), VMSTATE_UINT32(state, MPTSASState), VMSTATE_UINT8(who_init, MPTSASState), VMSTATE_UINT8(doorbell_state, MPTSASState), |