Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-19 Thread Kirti Wankhede
.uk; Lv, Zhiyuan <zhiyuan...@intel.com>; intel-gvt- >>> d...@lists.freedesktop.org; Wang, Zhi A <zhi.a.w...@intel.com> >>> Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf >>> operation >>> >>> Hi, >>> >>>> No need

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-19 Thread Kirti Wankhede
Tina >>> ; Tian, Kevin ; linux- >>> ker...@vger.kernel.org; intel-...@lists.freedesktop.org; >>> alex.william...@redhat.com; zhen...@linux.intel.com; chris@chris- >>> wilson.co.uk; Lv, Zhiyuan ; intel-gvt- >>> d...@lists.freedesktop.org; Wang, Zhi A >&g

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-19 Thread Gerd Hoffmann
reedesktop.org; Wang, Zhi A <zhi.a.w...@intel.com> > > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf > > operation > > > >   Hi, > > > > > No need of flag here. If vGPU driver is not loaded in the guest, > > > there > >

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-19 Thread Gerd Hoffmann
; > ker...@vger.kernel.org; intel-...@lists.freedesktop.org; > > alex.william...@redhat.com; zhen...@linux.intel.com; chris@chris- > > wilson.co.uk; Lv, Zhiyuan ; intel-gvt- > > d...@lists.freedesktop.org; Wang, Zhi A > > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf > >

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-18 Thread Zhang, Tina
- > ker...@vger.kernel.org; intel-...@lists.freedesktop.org; > alex.william...@redhat.com; zhen...@linux.intel.com; chris@chris- > wilson.co.uk; Lv, Zhiyuan <zhiyuan...@intel.com>; intel-gvt- > d...@lists.freedesktop.org; Wang, Zhi A <zhi.a.w...@intel.com> > Subject: Re: [PATCH v10] vfio: ABI

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-18 Thread Zhang, Tina
inux.intel.com; chris@chris- > wilson.co.uk; Lv, Zhiyuan ; intel-gvt- > d...@lists.freedesktop.org; Wang, Zhi A > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > Hi, > > > No need of flag here. If vGPU driver is not loaded in the guest,

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-17 Thread Gerd Hoffmann
Hi, > No need of flag here. If vGPU driver is not loaded in the guest, > there > is no surface being managed by vGPU, in that case this size will be > zero. Ok, we certainly have the same situation with intel. When the guest driver is not loaded (yet) there is no valid surface. We should

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-17 Thread Gerd Hoffmann
Hi, > No need of flag here. If vGPU driver is not loaded in the guest, > there > is no surface being managed by vGPU, in that case this size will be > zero. Ok, we certainly have the same situation with intel. When the guest driver is not loaded (yet) there is no valid surface. We should

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 5:35 PM, Gerd Hoffmann wrote: > Hi, > >> There could be only two planes, one DRM_PLANE_TYPE_PRIMARY and one >> DRM_PLANE_TYPE_CURSOR. >> Steps from gfx_update for region case would be: >> - VFIO_DEVICE_QUERY_GFX_PLANE with plane_type = >> DRM_PLANE_TYPE_PRIMARY > >> - if

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 5:35 PM, Gerd Hoffmann wrote: > Hi, > >> There could be only two planes, one DRM_PLANE_TYPE_PRIMARY and one >> DRM_PLANE_TYPE_CURSOR. >> Steps from gfx_update for region case would be: >> - VFIO_DEVICE_QUERY_GFX_PLANE with plane_type = >> DRM_PLANE_TYPE_PRIMARY > >> - if

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
On Fri, 2017-07-14 at 15:45 +0530, Kirti Wankhede wrote: > > On 7/14/2017 3:31 PM, Gerd Hoffmann wrote: > >   Hi, > > > > > In case when VFIO region is used to provide surface to QEMU, > > > plane_id > > > would be region index, > > > > Then we should name it "region_index" not "plane_id". > >

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
On Fri, 2017-07-14 at 15:45 +0530, Kirti Wankhede wrote: > > On 7/14/2017 3:31 PM, Gerd Hoffmann wrote: > >   Hi, > > > > > In case when VFIO region is used to provide surface to QEMU, > > > plane_id > > > would be region index, > > > > Then we should name it "region_index" not "plane_id". > >

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
Hi, > There could be only two planes, one DRM_PLANE_TYPE_PRIMARY and one > DRM_PLANE_TYPE_CURSOR. > Steps from gfx_update for region case would be: > - VFIO_DEVICE_QUERY_GFX_PLANE with plane_type = > DRM_PLANE_TYPE_PRIMARY > - if vfio_device_gfx_plane_info.size > 0, read region for primary >

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
Hi, > There could be only two planes, one DRM_PLANE_TYPE_PRIMARY and one > DRM_PLANE_TYPE_CURSOR. > Steps from gfx_update for region case would be: > - VFIO_DEVICE_QUERY_GFX_PLANE with plane_type = > DRM_PLANE_TYPE_PRIMARY > - if vfio_device_gfx_plane_info.size > 0, read region for primary >

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 3:31 PM, Gerd Hoffmann wrote: > Hi, > >> In case when VFIO region is used to provide surface to QEMU, plane_id >> would be region index, > > Then we should name it "region_index" not "plane_id". > >> for example region 10 could be used for primary >> surface and region 11 could

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 3:31 PM, Gerd Hoffmann wrote: > Hi, > >> In case when VFIO region is used to provide surface to QEMU, plane_id >> would be region index, > > Then we should name it "region_index" not "plane_id". > >> for example region 10 could be used for primary >> surface and region 11 could

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
uan...@intel.com>; intel-gvt- >> d...@lists.freedesktop.org; Wang, Zhi A <zhi.a.w...@intel.com> >> Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation >> >> >> >> On 7/12/2017 1:10 PM, Daniel Vetter wrote: >>> On Wed, Jul 12, 20

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
ann >> ; Tian, Kevin ; linux- >> ker...@vger.kernel.org; intel-...@lists.freedesktop.org; >> alex.william...@redhat.com; zhen...@linux.intel.com; chris@chris- >> wilson.co.uk; Lv, Zhiyuan ; intel-gvt- >> d...@lists.freedesktop.org; Wang, Zhi A >> Subject: Re: [PAT

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
Hi, > In case when VFIO region is used to provide surface to QEMU, plane_id > would be region index, Then we should name it "region_index" not "plane_id". > for example region 10 could be used for primary > surface and region 11 could be used for cursor surface. So in that > case, > mdev

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
Hi, > In case when VFIO region is used to provide surface to QEMU, plane_id > would be region index, Then we should name it "region_index" not "plane_id". > for example region 10 could be used for primary > surface and region 11 could be used for cursor surface. So in that > case, > mdev

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-13 Thread Zhang, Tina
; Cc: Tian, Kevin <kevin.t...@intel.com>; > >>> linux-kernel@vger.kernel.org; intel- g...@lists.freedesktop.org; > >>> alex.william...@redhat.com; zhen...@linux.intel.com; > >>> ch...@chris-wilson.co.uk; Kirti Wankhede <kwankh...@nvidia.com>; Lv, >

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-13 Thread Zhang, Tina
lists.freedesktop.org; > alex.william...@redhat.com; zhen...@linux.intel.com; chris@chris- > wilson.co.uk; Lv, Zhiyuan ; intel-gvt- > d...@lists.freedesktop.org; Wang, Zhi A > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > > > On 7/12/2017 1:10 PM,

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-12 Thread Kirti Wankhede
ntel.com; ch...@chris-wilson.co.uk; Kirti Wankhede >>> <kwankh...@nvidia.com>; Lv, Zhiyuan <zhiyuan...@intel.com>; >>> dan...@ffwll.ch; Zhang, Tina <tina.zh...@intel.com>; intel-gvt- >>> d...@lists.freedesktop.org; Wang, Zhi A <zhi.a.w...@intel.c

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-12 Thread Kirti Wankhede
Kirti Wankhede >>> ; Lv, Zhiyuan ; >>> dan...@ffwll.ch; Zhang, Tina ; intel-gvt- >>> d...@lists.freedesktop.org; Wang, Zhi A >>> Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation >>> >>> On Tue, Jul 11, 2017 at 08:14:08AM +020

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-12 Thread Daniel Vetter
.com>; Lv, Zhiyuan <zhiyuan...@intel.com>; > > dan...@ffwll.ch; Zhang, Tina <tina.zh...@intel.com>; intel-gvt- > > d...@lists.freedesktop.org; Wang, Zhi A <zhi.a.w...@intel.com> > > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf ope

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-12 Thread Daniel Vetter
gt; d...@lists.freedesktop.org; Wang, Zhi A > > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > > > On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > +struct vfio_device_qu

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhenyu Wang
On 2017.07.11 11:12:36 +0200, Daniel Vetter wrote: > On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > +struct vfio_device_query_gfx_plane { > > > > + __u32 argsz; > > > > + __u32 flags; > > > > + struct vfio_device_gfx_plane_info plane_info; >

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhenyu Wang
On 2017.07.11 11:12:36 +0200, Daniel Vetter wrote: > On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > +struct vfio_device_query_gfx_plane { > > > > + __u32 argsz; > > > > + __u32 flags; > > > > + struct vfio_device_gfx_plane_info plane_info; >

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
intel.com>; kra...@redhat.com > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > On Thu, Jul 06, 2017 at 06:29:55AM +0800, Tina Zhang wrote: > > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query > > and get the plan and its re

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
eedesktop.org; kwankh...@nvidia.com; zhen...@linux.intel.com; > ch...@chris-wilson.co.uk; alex.william...@redhat.com; Lv, Zhiyuan > ; dan...@ffwll.ch; intel-gvt-...@lists.freedesktop.org; > Wang, Zhi A ; kra...@redhat.com > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation >

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
an...@intel.com>; Wang, Zhi A <zhi.a.w...@intel.com>; Tian, Kevin > <kevin.t...@intel.com>; dan...@ffwll.ch; kwankh...@nvidia.com > Cc: intel-...@lists.freedesktop.org; intel-gvt-...@lists.freedesktop.org; > linux- > ker...@vger.kernel.org > Subject: Re:

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
n...@ffwll.ch; kwankh...@nvidia.com > Cc: intel-...@lists.freedesktop.org; intel-gvt-...@lists.freedesktop.org; > linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > > +/** > > + * VFIO_DEVICE_

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
ntel-gvt- > d...@lists.freedesktop.org; Wang, Zhi A <zhi.a.w...@intel.com> > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > +struct vfio_dev

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
top.org; alex.william...@redhat.com; > zhen...@linux.intel.com; ch...@chris-wilson.co.uk; Kirti Wankhede > ; Lv, Zhiyuan ; > dan...@ffwll.ch; Zhang, Tina ; intel-gvt- > d...@lists.freedesktop.org; Wang, Zhi A > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation >

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
v, > Zhiyuan <zhiyuan...@intel.com>; Wang, Zhi A <zhi.a.w...@intel.com>; Tian, > Kevin <kevin.t...@intel.com>; dan...@ffwll.ch > Cc: intel-...@lists.freedesktop.org; intel-gvt-...@lists.freedesktop.org; > linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v10] vfio:

RE: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
ian, > Kevin ; dan...@ffwll.ch > Cc: intel-...@lists.freedesktop.org; intel-gvt-...@lists.freedesktop.org; > linux- > ker...@vger.kernel.org > Subject: Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation > > > > On 7/6/2017 3:59 AM, Tina Zhang wrote: > > A

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Daniel Vetter
On Thu, Jul 06, 2017 at 06:29:55AM +0800, Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. > > The dma-buf's life cycle is handled by user mode and tracked by kernel. > The returned fd in struct

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Daniel Vetter
On Thu, Jul 06, 2017 at 06:29:55AM +0800, Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. > > The dma-buf's life cycle is handled by user mode and tracked by kernel. > The returned fd in struct

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Daniel Vetter
On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > Hi, > > > > +struct vfio_device_query_gfx_plane { > > > + __u32 argsz; > > > + __u32 flags; > > > + struct vfio_device_gfx_plane_info plane_info; > > > + __u32 plane_type; > > > + __s32 fd; /* dma-buf fd */ > > > + __u32 plane_id;

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Daniel Vetter
On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > Hi, > > > > +struct vfio_device_query_gfx_plane { > > > + __u32 argsz; > > > + __u32 flags; > > > + struct vfio_device_gfx_plane_info plane_info; > > > + __u32 plane_type; > > > + __s32 fd; /* dma-buf fd */ > > > + __u32 plane_id;

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Gerd Hoffmann
Hi, > > +struct vfio_device_query_gfx_plane { > > + __u32 argsz; > > + __u32 flags; > > + struct vfio_device_gfx_plane_info plane_info; > > + __u32 plane_type; > > + __s32 fd; /* dma-buf fd */ > > + __u32 plane_id; > > +}; > > + > > It would be better to have comment here about

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Gerd Hoffmann
Hi, > > +struct vfio_device_query_gfx_plane { > > + __u32 argsz; > > + __u32 flags; > > + struct vfio_device_gfx_plane_info plane_info; > > + __u32 plane_type; > > + __s32 fd; /* dma-buf fd */ > > + __u32 plane_id; > > +}; > > + > > It would be better to have comment here about

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Gerd Hoffmann
> +/** > + * VFIO_DEVICE_QUERY_GFX_PLANE - _IOW(VFIO_TYPE, VFIO_BASE + 14, > + *   struct vfio_device_query_gfx_plane) > + * Return: 0 on success, -errno on failure. > + */ > + > +struct vfio_device_gfx_plane_info { > + __u64 start; > + __u64 drm_format_mod; > +

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Gerd Hoffmann
> +/** > + * VFIO_DEVICE_QUERY_GFX_PLANE - _IOW(VFIO_TYPE, VFIO_BASE + 14, > + *   struct vfio_device_query_gfx_plane) > + * Return: 0 on success, -errno on failure. > + */ > + > +struct vfio_device_gfx_plane_info { > + __u64 start; > + __u64 drm_format_mod; > +

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-06 Thread Kirti Wankhede
On 7/6/2017 3:59 AM, Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. > > The dma-buf's life cycle is handled by user mode and tracked by kernel. > The returned fd in struct vfio_device_query_gfx_plane can

Re: [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-06 Thread Kirti Wankhede
On 7/6/2017 3:59 AM, Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. > > The dma-buf's life cycle is handled by user mode and tracked by kernel. > The returned fd in struct vfio_device_query_gfx_plane can