aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-01-02 12:07:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-01-02 12:07:50 -0800
commitd7e19bd882c23109853ac67f414024c816edc8b9 (patch)
tree9a302460f9aaa477d8203bd681261e1c1960aa4a /include
parentMerge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit (diff)
parentvhost: relax used address alignment (diff)
downloadlinux-dev-d7e19bd882c23109853ac67f414024c816edc8b9.tar.xz
linux-dev-d7e19bd882c23109853ac67f414024c816edc8b9.zip
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull vhost cleanup and virtio bugfix "There's a single change here, fixing a vhost bug where vhost initialization fails due to used ring alignment check being too strict" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vhost: relax used address alignment virtio_ring: document alignment requirements
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/virtio_ring.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h
index 61c818a7fe70..a3318f31e8e7 100644
--- a/include/uapi/linux/virtio_ring.h
+++ b/include/uapi/linux/virtio_ring.h
@@ -101,6 +101,13 @@ struct vring {
struct vring_used *used;
};
+/* Alignment requirements for vring elements.
+ * When using pre-virtio 1.0 layout, these fall out naturally.
+ */
+#define VRING_AVAIL_ALIGN_SIZE 2
+#define VRING_USED_ALIGN_SIZE 4
+#define VRING_DESC_ALIGN_SIZE 16
+
/* The standard layout for the ring is a continuous chunk of memory which looks
* like this. We assume num is a power of 2.
*