Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-15 Thread Alex Williamson
On Mon, 15 May 2017 03:36:50 + "Chen, Xiaoguang" wrote: > Hi Alex and Gerd, > > >-Original Message- > >From: Alex Williamson [mailto:alex.william...@redhat.com] > >Sent: Saturday, May 13, 2017 12:38 AM > >To: Gerd Hoffmann > >Cc: Chen,

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-14 Thread Chen, Xiaoguang
Hi Alex and Gerd, >-Original Message- >From: Alex Williamson [mailto:alex.william...@redhat.com] >Sent: Saturday, May 13, 2017 12:38 AM >To: Gerd Hoffmann >Cc: Chen, Xiaoguang ; Tian, Kevin >;

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-12 Thread Alex Williamson
On Fri, 12 May 2017 06:56:03 + "Chen, Xiaoguang" wrote: > Hi Gerd, > > >-Original Message- > >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > >Behalf Of Gerd Hoffmann > >Sent: Thursday, May 11, 2017 9:28 PM > >To: Chen,

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-12 Thread Alex Williamson
On Fri, 12 May 2017 11:12:05 +0200 Gerd Hoffmann wrote: > Hi, > > > If the contents of the framebuffer change or if the parameters of the > > framebuffer change? I can't image that creating a new dmabuf fd for > > every visual change within the framebuffer would be

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-12 Thread Gerd Hoffmann
Hi, > If the contents of the framebuffer change or if the parameters of the > framebuffer change? I can't image that creating a new dmabuf fd for > every visual change within the framebuffer would be efficient, but I > don't have any concept of what a dmabuf actually does. Ok, some

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-12 Thread Chen, Xiaoguang
Hi Gerd, >-Original Message- >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On >Behalf Of Gerd Hoffmann >Sent: Thursday, May 11, 2017 9:28 PM >To: Chen, Xiaoguang >Cc: Tian, Kevin ;

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Chen, Xiaoguang
>-Original Message- >From: Alex Williamson [mailto:alex.william...@redhat.com] >Sent: Friday, May 12, 2017 10:58 AM >To: Chen, Xiaoguang >Cc: Gerd Hoffmann ; Tian, Kevin ; >intel-gfx@lists.freedesktop.org;

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Alex Williamson
On Fri, 12 May 2017 02:12:10 + "Chen, Xiaoguang" wrote: > Hi Alex and Gerd, > > >-Original Message- > >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > >Behalf Of Alex Williamson > >Sent: Thursday, May 11, 2017 11:45 PM > >To:

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Chen, Xiaoguang
Hi Alex and Gerd, >-Original Message- >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On >Behalf Of Alex Williamson >Sent: Thursday, May 11, 2017 11:45 PM >To: Gerd Hoffmann >Cc: Tian, Kevin ;

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Alex Williamson
On Thu, 11 May 2017 15:27:53 +0200 Gerd Hoffmann wrote: > Hi, > > > While read the framebuffer region we have to tell the vendor driver which > > framebuffer we want to read? There are two framebuffers now in KVMGT that > > is primary and cursor. > > There are two methods

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Gerd Hoffmann
Hi, > While read the framebuffer region we have to tell the vendor driver which > framebuffer we want to read? There are two framebuffers now in KVMGT that is > primary and cursor. > There are two methods to implement this: > 1) write the plane id first and then read the framebuffer. > 2)

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-11 Thread Chen, Xiaoguang
Hi Alex, >-Original Message- >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On >Behalf Of Alex Williamson >Sent: Friday, May 05, 2017 11:11 PM >To: Gerd Hoffmann >Cc: Tian, Kevin ; intel-gfx@lists.freedesktop.org; linux-

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-05 Thread Alex Williamson
On Fri, 05 May 2017 08:55:31 +0200 Gerd Hoffmann wrote: > Hi, > > > > >>Hmm, that looks like a rather strange way to return a file descriptor. > > > >> > > > >>What is the reason to not use ioctls on the vfio file handle, like > > > >>older version of these patches did?

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-05 Thread Gerd Hoffmann
Hi, > > >>Hmm, that looks like a rather strange way to return a file descriptor. > > >> > > >>What is the reason to not use ioctls on the vfio file handle, like > > >>older version of these patches did? > > >If I understood correctly that Alex prefer not to change the ioctls on the > > >vfio

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-04 Thread Alex Williamson
On Thu, 4 May 2017 03:09:40 + "Chen, Xiaoguang" wrote: > Hi Alex, do you have any comments for this interface? > > >-Original Message- > >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > >Behalf Of Chen, Xiaoguang > >Sent:

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-03 Thread Chen, Xiaoguang
Hi Alex, do you have any comments for this interface? >-Original Message- >From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On >Behalf Of Chen, Xiaoguang >Sent: Wednesday, May 03, 2017 9:39 AM >To: Gerd Hoffmann >Cc: Tian, Kevin

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-02 Thread Chen, Xiaoguang
>-Original Message- >From: Gerd Hoffmann [mailto:kra...@redhat.com] >Sent: Tuesday, May 02, 2017 5:51 PM >To: Chen, Xiaoguang >Cc: alex.william...@redhat.com; intel-gfx@lists.freedesktop.org; intel-gvt- >d...@lists.freedesktop.org; Wang, Zhi A

Re: [Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-05-02 Thread Gerd Hoffmann
On Fr, 2017-04-28 at 17:35 +0800, Xiaoguang Chen wrote: > +static size_t intel_vgpu_reg_rw_gvtg(struct intel_vgpu *vgpu, char > *buf, > + size_t count, loff_t *ppos, bool iswrite) > +{ > + unsigned int i = VFIO_PCI_OFFSET_TO_INDEX(*ppos) - > +

[Intel-gfx] [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf

2017-04-28 Thread Xiaoguang Chen
GVT-g will create an anonymous fd and a vfio device region to deliver the fd to QEMU. QEMU can do ioctl using this fd to query/generate dmabuf on an intel vgpu. Signed-off-by: Xiaoguang Chen --- drivers/gpu/drm/i915/gvt/gvt.c | 2 + drivers/gpu/drm/i915/gvt/gvt.h