diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-05 17:40:08 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-05 17:40:08 +0000 |
commit | c7ebfce598e259e48491e61fcad516909abd11de (patch) | |
tree | 68ca13c0ea9c46ed473bf67aa9cb4e8d525d317c /hw/virtio.h | |
parent | cf6daa1e510f936e5827157677f9fef3ee1bd20d (diff) | |
download | qemu-c7ebfce598e259e48491e61fcad516909abd11de.tar.gz qemu-c7ebfce598e259e48491e61fcad516909abd11de.tar.bz2 qemu-c7ebfce598e259e48491e61fcad516909abd11de.zip |
Fix oops on 2.6.25 guest (Rusty Russell)
I believe this is behind the following:
https://bugs.edge.launchpad.net/ubuntu/jaunty/+source/linux/+bug/331128
virtio_pci in 2.6.25 didn't do feature negotiation correctly: it acked every
bit. Fortunately, we can detect this.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6975 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/virtio.h')
-rw-r--r-- | hw/virtio.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/virtio.h b/hw/virtio.h index 18c7a1a7c7..cce8a47475 100644 --- a/hw/virtio.h +++ b/hw/virtio.h @@ -32,6 +32,8 @@ /* We notify when the ring is completely used, even if the guest is supressing * callbacks */ #define VIRTIO_F_NOTIFY_ON_EMPTY 24 +/* A guest should never accept this. It implies negotiation is broken. */ +#define VIRTIO_F_BAD_FEATURE 30 /* from Linux's linux/virtio_ring.h */ @@ -82,6 +84,7 @@ struct VirtIODevice size_t config_len; void *config; uint32_t (*get_features)(VirtIODevice *vdev); + uint32_t (*bad_features)(VirtIODevice *vdev); void (*set_features)(VirtIODevice *vdev, uint32_t val); void (*get_config)(VirtIODevice *vdev, uint8_t *config); void (*set_config)(VirtIODevice *vdev, const uint8_t *config); |