[Intel-gfx] [PATCH v6 4/6] vfio: Define vfio based vgpu's dma-buf operations

Chen, Xiaoguang xiaoguang.chen at intel.com
Thu Jun 1 03:01:28 UTC 2017


Hi Kirti,

>-----Original Message-----
>From: Kirti Wankhede [mailto:kwankhede at nvidia.com]
>Sent: Thursday, June 01, 2017 1:23 AM
>To: Chen, Xiaoguang <xiaoguang.chen at intel.com>; Gerd Hoffmann
><kraxel at redhat.com>; alex.williamson at redhat.com; chris at chris-wilson.co.uk;
>intel-gfx at lists.freedesktop.org; linux-kernel at vger.kernel.org;
>zhenyuw at linux.intel.com; Lv, Zhiyuan <zhiyuan.lv at intel.com>; intel-gvt-
>dev at lists.freedesktop.org; Wang, Zhi A <zhi.a.wang at intel.com>; Tian, Kevin
><kevin.tian at intel.com>
>Subject: Re: [PATCH v6 4/6] vfio: Define vfio based vgpu's dma-buf operations
>
>
>
>On 5/31/2017 11:48 AM, Chen, Xiaoguang wrote:
>> Hi,
>>
>>> -----Original Message-----
>>> From: Gerd Hoffmann [mailto:kraxel at redhat.com]
>>> Sent: Monday, May 29, 2017 3:20 PM
>>> To: Chen, Xiaoguang <xiaoguang.chen at intel.com>;
>>> alex.williamson at redhat.com; chris at chris-wilson.co.uk; intel-
>>> gfx at lists.freedesktop.org; linux-kernel at vger.kernel.org;
>>> zhenyuw at linux.intel.com; Lv, Zhiyuan <zhiyuan.lv at intel.com>;
>>> intel-gvt- dev at lists.freedesktop.org; Wang, Zhi A
>>> <zhi.a.wang at intel.com>; Tian, Kevin <kevin.tian at intel.com>
>>> Subject: Re: [PATCH v6 4/6] vfio: Define vfio based vgpu's dma-buf
>>> operations
>>>
>>>> +struct vfio_vgpu_dmabuf_info {
>>>> +	__u32 argsz;
>>>> +	__u32 flags;
>>>> +	struct vfio_vgpu_plane_info plane_info;
>>>> +	__s32 fd;
>>>> +	__u32 pad;
>>>> +};
>>>
>>> Hmm, now you have argsz and flags twice in vfio_vgpu_dmabuf_info ...
>>>
>>> I think we should have something like this:
>>>
>>> struct vfio_vgpu_plane_info {
>>>         __u64 start;
>>>         __u64 drm_format_mod;
>>>         __u32 drm_format;
>>>         __u32 width;
>>>         __u32 height;
>>>         __u32 stride;
>>>         __u32 size;
>>>         __u32 x_pos;
>>>         __u32 y_pos;
>>>        __u32 padding;
>>> };
>>>
>>> struct vfio_vgpu_query_plane {
>>> 	__u32 argsz;
>>> 	__u32 flags;
>>> 	struct vfio_vgpu_plane_info plane_info;
>>>        __u32 plane_id;
>>>        __u32 padding;
>>> };
>>>
>>> struct vfio_vgpu_create_dmabuf {
>>> 	__u32 argsz;
>>> 	__u32 flags;
>>> 	struct vfio_vgpu_plane_info plane_info;
>>>        __u32 plane_id;
>>>        __s32 fd;
>>> };
>> Good suggestion will apply in the next version.
>> Thanks for review :)
>>
>
>Can you define what are the expected values of 'flags' would be?
Flags is not used in this case.  It is defined to follow the rules of vfio ioctls.

>
>Thanks,
>Kirti
>
>> Chenxg.
>>


More information about the Intel-gfx mailing list