qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 2/3] linux-headers: sync vhost.h


From: Greg Kurz
Subject: [Qemu-devel] [PATCH v2 2/3] linux-headers: sync vhost.h
Date: Thu, 02 Apr 2015 16:04:07 +0200
User-agent: StGit/0.17-dirty

This patch brings the cross-endian vhost API to QEMU.

Signed-off-by: Greg Kurz <address@hidden>
---
 linux-headers/linux/vhost.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index c656f61..e040bcb 100644
--- a/linux-headers/linux/vhost.h
+++ b/linux-headers/linux/vhost.h
@@ -47,6 +47,11 @@ struct vhost_vring_addr {
        __u64 log_guest_addr;
 };
 
+struct vhost_vring_endian {
+       unsigned int index;
+       bool is_big_endian;
+};
+
 struct vhost_memory_region {
        __u64 guest_phys_addr;
        __u64 memory_size; /* bytes */
@@ -103,6 +108,9 @@ struct vhost_memory {
 /* Get accessor: reads index, writes value in num */
 #define VHOST_GET_VRING_BASE _IOWR(VHOST_VIRTIO, 0x12, struct 
vhost_vring_state)
 
+/* Set endianness for the ring (legacy virtio only) */
+#define VHOST_SET_VRING_ENDIAN_LEGACY _IOW(VHOST_VIRTIO, 0x13, struct 
vhost_vring_endian)
+
 /* The following ioctls use eventfd file descriptors to signal and poll
  * for events. */
 
@@ -126,6 +134,8 @@ struct vhost_memory {
 #define VHOST_F_LOG_ALL 26
 /* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
 #define VHOST_NET_F_VIRTIO_NET_HDR 27
+/* the vring endianness can be explicitely set (legacy virtio only). */
+#define VHOST_F_SET_ENDIAN_LEGACY 28
 
 /* VHOST_SCSI specific definitions */
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]