|
@@ -101,6 +101,13 @@ struct vring {
|
|
struct vring_used *used;
|
|
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
|
|
/* The standard layout for the ring is a continuous chunk of memory which looks
|
|
* like this. We assume num is a power of 2.
|
|
* like this. We assume num is a power of 2.
|
|
*
|
|
*
|