aboutsummaryrefslogtreecommitdiff
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-07-11 16:06:46 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-07-15 21:26:26 +0300
commit488f069bd1f3aeb6ee748acb02b7581831bcb3f8 (patch)
tree2a696b07fe49fe6e76293d4882fa0467e2d29338 /include/hw/virtio/virtio.h
parentb1be42803b31a913bab65bab563a8760ad2e7f7f (diff)
downloadqemu-488f069bd1f3aeb6ee748acb02b7581831bcb3f8.zip
qemu-488f069bd1f3aeb6ee748acb02b7581831bcb3f8.tar.gz
qemu-488f069bd1f3aeb6ee748acb02b7581831bcb3f8.tar.bz2
virtio-net: add feature bit for any header s/g
Old qemu versions required that 1st s/g entry is the header. Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup" removed this limitation but a feature bit is needed so guests know it's safe to lay out header differently. This patch applies on top and adds such a feature bit to QEMU. It is set by default for virtio-net. virtio net header inline with the data is beneficial for latency and small packet bandwidth - guest driver code utilizing this feature has been acked but missed 3.11 by a narrow margin, it's pending for 3.12. This feature bit is cleared by default when compatibility with old machine types is requested. Other performance-sensitive devices (blk and scsi) don't yet support arbitrary s/g layouts, so we only set this bit for virtio-net for now. There are plans to allow arbitrary layouts there, but no code has been posted yet. Cc: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index a6c5c53..5d1d2be 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -43,6 +43,8 @@
/* We notify when the ring is completely used, even if the guest is suppressing
* callbacks */
#define VIRTIO_F_NOTIFY_ON_EMPTY 24
+/* Can the device handle any descriptor layout? */
+#define VIRTIO_F_ANY_LAYOUT 27
/* We support indirect buffer descriptors */
#define VIRTIO_RING_F_INDIRECT_DESC 28
/* The Guest publishes the used index for which it expects an interrupt