Received: from eggs.gnu.org ([2001:4830:134:3::10]:60435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLa9Z-0006oj-BM for qemu-devel@nongnu.org; Wed, 11 Feb 2015 11:28:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLa9V-0004ll-B0 for qemu-devel@nongnu.org; Wed, 11 Feb 2015 11:28:41 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:58005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLa9V-0004ld-6C for qemu-devel@nongnu.org; Wed, 11 Feb 2015 11:28:37 -0500 Received: by mail-wg0-f49.google.com with SMTP id l18so4559660wgh.8 for ; Wed, 11 Feb 2015 08:28:36 -0800 (PST) From: Baptiste Reynal Date: Wed, 11 Feb 2015 17:28:06 +0100 Message-Id: <1423672089-13464-2-git-send-email-b.reynal@virtualopensystems.com> In-Reply-To: <1423672089-13464-1-git-send-email-b.reynal@virtualopensystems.com> References: <1423672089-13464-1-git-send-email-b.reynal@virtualopensystems.com> Subject: [Qemu-devel] [RFC PATCH v2 1/4] linux-headers update List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvmarm@lists.cs.columbia.edu, qemu-devel@nongnu.org Cc: tech@virtualopensystems.com, Baptiste Reynal Add VFIO device property constants Signed-off-by: Baptiste Reynal --- linux-headers/linux/vfio.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 58f549c..1d16c12 100644 --- a/linux-headers/linux/vfio.h +++ b/linux-headers/linux/vfio.h @@ -167,6 +167,31 @@ struct vfio_device_info { #define VFIO_DEVICE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 7) /** + * VFIO_DEVICE_GET_DEV_PROPERTY - _IOR(VFIO_TYPE, VFIO_BASE + 16, + * struct vfio_devtree_info) + * + * Retrieve a device property, e.g. from a device tree if available. + * Caller will initialize data[] with a single string with the requested + * devicetree property name, and type depending on whether a array of strings + * or an array of u32 values is expected. On success, data[] will be extended + * with the requested information, either as an array of u32, or with a list + * of strings separated by the NULL terminating character. + * Return: 0 on success, -errno on failure. + */ +struct vfio_dev_property { + __u32 argsz; + __u32 type; +#define VFIO_DEV_PROPERTY_TYPE_STRINGS 0 +#define VFIO_DEV_PROPERTY_TYPE_U8 1 +#define VFIO_DEV_PROPERTY_TYPE_U16 2 +#define VFIO_DEV_PROPERTY_TYPE_U32 3 +#define VFIO_DEV_PROPERTY_TYPE_U64 4 + __u32 length; + __u8 data[]; +}; +#define VFIO_DEVICE_GET_DEV_PROPERTY _IO(VFIO_TYPE, VFIO_BASE + 17) + +/** * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8, * struct vfio_region_info) * -- 2.3.0