aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-07-22 13:09:25 +0300
committerMichael S. Tsirkin <mst@redhat.com>2015-07-27 09:08:50 +0300
commit5f456073aa9ba54e421aa82dd38e4d40d0a0af85 (patch)
tree7e0073a414617d32dec948c31d0321d591a113ae /include
parentb69b30532e0a80e25449244c01b0cbed000c99a3 (diff)
downloadqemu-5f456073aa9ba54e421aa82dd38e4d40d0a0af85.zip
qemu-5f456073aa9ba54e421aa82dd38e4d40d0a0af85.tar.gz
qemu-5f456073aa9ba54e421aa82dd38e4d40d0a0af85.tar.bz2
virtio: hide legacy features from modern guests
NOTIFY_ON_EMPTY, ANY_LAYOUT and BAD are only valid on the legacy interface. Hide them from modern guests. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 473fb75..0634c15 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -25,6 +25,10 @@
/* A guest should never accept this. It implies negotiation is broken. */
#define VIRTIO_F_BAD_FEATURE 30
+#define VIRTIO_LEGACY_FEATURES ((0x1ULL << VIRTIO_F_BAD_FEATURE) | \
+ (0x1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \
+ (0x1ULL << VIRTIO_F_ANY_LAYOUT))
+
struct VirtQueue;
static inline hwaddr vring_align(hwaddr addr,