]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
virtio_pci: fix virtio spec compliance on restore
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Oct 2014 00:10:29 +0000 (10:40 +1030)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:02:19 +0000 (19:02 +0100)
commita5f37e6cb8c60f4a066ca9d2d4bcb6af002af4eb
treed438607ad685213495ef044f9dfc1afd6a0ea7cf
parentff6fe80314fb2b131503835ce59b5ba9210d5864
virtio_pci: fix virtio spec compliance on restore

commit 6fbc198cf623944ab60a1db6d306a4d55cdd820d upstream.

On restore, virtio pci does the following:
+ set features
+ init vqs etc - device can be used at this point!
+ set ACKNOWLEDGE,DRIVER and DRIVER_OK status bits

This is in violation of the virtio spec, which
requires the following order:
- ACKNOWLEDGE
- DRIVER
- init vqs
- DRIVER_OK

This behaviour will break with hypervisors that assume spec compliant
behaviour.  It seems like a good idea to have this patch applied to
stable branches to reduce the support butden for the hypervisors.

Cc: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/virtio/virtio_pci.c