]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio: set low features early on load
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Jul 2016 11:39:10 +0000 (14:39 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 5 Aug 2016 20:23:27 +0000 (15:23 -0500)
commit909d87d347a7a5e08c32cbdb67bb2927fcefbf34
tree955e1d7cf604802f7f744f4b61c2ef433e30f846
parent9566ceeef41ccb5241d340b34776a33450e8f9e5
virtio: set low features early on load

virtio migrates the low 32 feature bits twice, the first copy is there
for compatibility but ever since
019a3edbb25f1571e876f8af1ce4c55412939e5d: ("virtio: make features 64bit
wide") it's ignored on load. This is wrong since virtio_net_load tests
self announcement and guest offloads before the second copy including
high feature bits is loaded.  This means that self announcement, control
vq and guest offloads are all broken after migration.

Fix it up by loading low feature bits: somewhat ugly since high and low
bits become out of sync temporarily, but seems unavoidable for
compatibility.  The right thing to do for new features is probably to
test the host features, anyway.

Fixes: 019a3edbb25f1571e876f8af1ce4c55412939e5d
    ("virtio: make features 64bit wide")
Cc: qemu-stable@nongnu.org
Reported-by: Robin Geuze <robing@transip.nl>
Tested-by: Robin Geuze <robing@transip.nl>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 62cee1a28aada2cce4b0e1fb835d8fc830aed7ac)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c