aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-05 17:40:08 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-05 17:40:08 +0000
commit8eca6b1bc770982595db2f7207c65051572436cb (patch)
tree68ca13c0ea9c46ed473bf67aa9cb4e8d525d317c /hw/virtio.h
parent1da92db280961b3949712609b8771f582dab1f4a (diff)
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.h3
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);