From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5DK5-0002Jm-Af for qemu-devel@nongnu.org; Wed, 17 Jun 2015 09:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5DJz-0003BK-R9 for qemu-devel@nongnu.org; Wed, 17 Jun 2015 09:24:09 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:38463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5DJz-0003As-HF for qemu-devel@nongnu.org; Wed, 17 Jun 2015 09:24:03 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 17 Jun 2015 14:24:02 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 46A822190063 for ; Wed, 17 Jun 2015 14:23:38 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5HDNxsj25952328 for ; Wed, 17 Jun 2015 13:23:59 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5HDNxHG025505 for ; Wed, 17 Jun 2015 07:23:59 -0600 From: Greg Kurz Date: Wed, 17 Jun 2015 15:23:29 +0200 Message-ID: <20150617132329.6560.8229.stgit@bahia.lab.toulouse-stg.fr.ibm.com> In-Reply-To: <20150617132323.6560.29432.stgit@bahia.lab.toulouse-stg.fr.ibm.com> References: <20150617132323.6560.29432.stgit@bahia.lab.toulouse-stg.fr.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 1/6] linux-headers: sync vhost.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Cornelia Huck , Thomas Huth , qemu-devel@nongnu.org, Stefan Hajnoczi , Jason Wang This patch brings the cross-endian vhost API to QEMU. Signed-off-by: Greg Kurz --- linux-headers/linux/vhost.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c656f61cfc75..ead86db91a08 100644 --- a/linux-headers/linux/vhost.h +++ b/linux-headers/linux/vhost.h @@ -103,6 +103,20 @@ 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 the vring byte order in num. Valid values are VHOST_VRING_LITTLE_ENDIAN + * or VHOST_VRING_BIG_ENDIAN (other values return -EINVAL). + * The byte order cannot be changed while the device is active: trying to do so + * returns -EBUSY. + * This is a legacy only API that is simply ignored when VIRTIO_F_VERSION_1 is + * set. + * Not all kernel configurations support this ioctl, but all configurations that + * support SET also support GET. + */ +#define VHOST_VRING_LITTLE_ENDIAN 0 +#define VHOST_VRING_BIG_ENDIAN 1 +#define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state) +#define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state) + /* The following ioctls use eventfd file descriptors to signal and poll * for events. */