summary refs log tree commit diff stats
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-07-16 13:25:08 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-07-19 12:58:46 +0100
commit6ce69d1c7741c0ad524e4cad6dca31e782108a65 (patch)
treede2f0e260a882410a21659f83090ab5627d751ee /include/hw/virtio/virtio.h
parente63c0ba1bce0b3cc7037c6c2d327267a585534ec (diff)
downloadfocaccia-qemu-6ce69d1c7741c0ad524e4cad6dca31e782108a65.tar.gz
focaccia-qemu-6ce69d1c7741c0ad524e4cad6dca31e782108a65.zip
virtio: Support transports which can specify the vring alignment
Support virtio transports which can specify the vring alignment
(ie where the guest communicates this to the host) by providing
a new virtio_queue_set_align() function. (The default alignment
remains as before.)

Transports which wish to make use of this must set the
has_variable_vring_alignment field in their VirtioBusClass
struct to true; they can then change the alignment via
virtio_queue_set_align().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 65f378d198..d7e9e0fc8a 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -202,6 +202,7 @@ void virtio_queue_set_addr(VirtIODevice *vdev, int n, hwaddr addr);
 hwaddr virtio_queue_get_addr(VirtIODevice *vdev, int n);
 void virtio_queue_set_num(VirtIODevice *vdev, int n, int num);
 int virtio_queue_get_num(VirtIODevice *vdev, int n);
+void virtio_queue_set_align(VirtIODevice *vdev, int n, int align);
 void virtio_queue_notify(VirtIODevice *vdev, int n);
 uint16_t virtio_queue_vector(VirtIODevice *vdev, int n);
 void virtio_queue_set_vector(VirtIODevice *vdev, int n, uint16_t vector);