diff options
| author | Dr. David Alan Gilbert | 2016-01-29 14:18:56 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2016-02-04 18:53:02 +0100 |
| commit | 3e996cc58334be1c3f1be524b4f048566eccbb1d (patch) | |
| tree | c0b369fff62b5e6fec82d687892a77125b4a0b2c /linux-headers/linux | |
| parent | Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' int... (diff) | |
| download | qemu-3e996cc58334be1c3f1be524b4f048566eccbb1d.tar.gz qemu-3e996cc58334be1c3f1be524b4f048566eccbb1d.tar.xz qemu-3e996cc58334be1c3f1be524b4f048566eccbb1d.zip | |
Fix virtio migration
I misunderstood the vmstate macro definition when I reworked the
virtio .get/.put.
The VMSTATE_STRUCT_VARRAY_KNOWN, was described as being for "a
variable length array (i.e. _type *_field) but we know the
length". However it actually specified operation for arrays embedded in
the struct (i.e. _type _field[]) since it lacked the VMS_POINTER
flag. This caused offset calculation to be completely off, examining and
potentially sending random data instead of the VirtQueue content.
Replace the otherwise unused VMSTATE_STRUCT_VARRAY_KNOWN with a
VMSTATE_STRUCT_VARRAY_POINTER_KNOWN that includes the VMS_POINTER flag
(so now actually doing what it advertises) and use it in the virtio
migration code.
Fixes and description as per Sascha's suggestions/debug.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reported-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Tested-By: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-By: Sascha Silbe <silbe@linux.vnet.ibm.com>
Fixes: 50e5ae4dc3e4f21e874512f9e87b93b5472d26e0
Fixes: 2cf0148674430b6693c60d42b7eef721bfa9509f
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'linux-headers/linux')
0 files changed, 0 insertions, 0 deletions
