lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Nov 2017 23:27:00 +0000
From:   "Zhang, Tina" <tina.zhang@...el.com>
To:     Gerd Hoffmann <kraxel@...hat.com>
CC:     "Tian, Kevin" <kevin.tian@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
        "joonas.lahtinen@...ux.intel.com" <joonas.lahtinen@...ux.intel.com>,
        "kwankhede@...dia.com" <kwankhede@...dia.com>,
        "zhenyuw@...ux.intel.com" <zhenyuw@...ux.intel.com>,
        "chris@...is-wilson.co.uk" <chris@...is-wilson.co.uk>,
        "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
        "Lv, Zhiyuan" <zhiyuan.lv@...el.com>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "Yuan, Hang" <hang.yuan@...el.com>,
        "intel-gvt-dev@...ts.freedesktop.org" 
        <intel-gvt-dev@...ts.freedesktop.org>,
        "Wang, Zhi A" <zhi.a.wang@...el.com>
Subject: RE: [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g

And here is the "git diff" of (git://git.kraxel.org/qemu), which is used to test this version:

diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index 1cdc926..06234b2 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -36,7 +36,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
                                            uint32_t plane_type)
 {
     struct vfio_device_gfx_plane_info plane;
-    struct vfio_device_gfx_dmabuf_fd gfd;
+    int dmabuf_fd;
     VFIODMABuf *dmabuf;
     static int errcnt;
     int ret;
@@ -84,11 +84,10 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
         }
     }

-    memset(&gfd, 0, sizeof(gfd));
-    gfd.argsz = sizeof(gfd);
-    gfd.dmabuf_id = plane.dmabuf_id;
-    ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_GFX_DMABUF, &gfd);
-    if (ret < 0) {
+
+
+    dmabuf_fd = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_GFX_DMABUF, &plane.dmabuf_id);
+    if (dmabuf_fd < 0) {
         fprintf(stderr, "(%d) ioctl VFIO_DEVICE_GET_GFX_DMABUF: %s\r",
                 ++errcnt, strerror(errno));
         return NULL;
@@ -103,7 +102,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
             (plane.drm_format >> 16) & 0xff,
             (plane.drm_format >> 24) & 0xff,
             (plane_type == DRM_PLANE_TYPE_PRIMARY) ? "primary" : "cursor",
-            gfd.dmabuf_fd);
+            dmabuf_fd);

     dmabuf = g_new0(VFIODMABuf, 1);
     dmabuf->dmabuf_id  = plane.dmabuf_id;
@@ -111,7 +110,7 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev,
     dmabuf->buf.height = plane.height;
     dmabuf->buf.stride = plane.stride;
     dmabuf->buf.fourcc = plane.drm_format;
-    dmabuf->buf.fd     = gfd.dmabuf_fd;
+    dmabuf->buf.fd     = dmabuf_fd;

     QTAILQ_INSERT_HEAD(&vdev->dmabufs, dmabuf, next);
     return dmabuf;
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
index c80bb5e..aee81f2 100644
--- a/linux-headers/linux/vfio.h
+++ b/linux-headers/linux/vfio.h
@@ -536,6 +536,8 @@ struct vfio_device_gfx_plane_info {
        __u32 size;     /* size of plane in bytes, align on page*/
        __u32 x_pos;    /* horizontal position of cursor plane, upper left corner in pixels */
        __u32 y_pos;    /* vertical position of cursor plane, upper left corner in lines*/
+       __u32 x_hot;
+       __u32 y_hot;
        union {
                __u32 region_index;     /* region index */
                __u32 dmabuf_id;        /* dma-buf id */


Thanks.

BR,
Tina

> -----Original Message-----
> From: Zhang, Tina
> Sent: Friday, November 10, 2017 7:20 AM
> To: 'Gerd Hoffmann' <kraxel@...hat.com>
> Cc: Tian, Kevin <kevin.tian@...el.com>; linux-kernel@...r.kernel.org; intel-
> gfx@...ts.freedesktop.org; joonas.lahtinen@...ux.intel.com;
> kwankhede@...dia.com; zhenyuw@...ux.intel.com; chris@...is-wilson.co.uk;
> alex.williamson@...hat.com; Lv, Zhiyuan <zhiyuan.lv@...el.com>;
> daniel@...ll.ch; Yuan, Hang <hang.yuan@...el.com>; intel-gvt-
> dev@...ts.freedesktop.org; Wang, Zhi A <zhi.a.wang@...el.com>
> Subject: RE: [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g
> 
> 
> 
> > -----Original Message-----
> > From: intel-gvt-dev
> > [mailto:intel-gvt-dev-bounces@...ts.freedesktop.org] On Behalf Of Gerd
> > Hoffmann
> > Sent: Thursday, November 9, 2017 10:10 PM
> > To: Zhang, Tina <tina.zhang@...el.com>
> > Cc: Tian, Kevin <kevin.tian@...el.com>; linux-kernel@...r.kernel.org;
> > intel- gfx@...ts.freedesktop.org; joonas.lahtinen@...ux.intel.com;
> > kwankhede@...dia.com; zhenyuw@...ux.intel.com;
> > chris@...is-wilson.co.uk; alex.williamson@...hat.com; Lv, Zhiyuan
> > <zhiyuan.lv@...el.com>; daniel@...ll.ch; Yuan, Hang
> > <hang.yuan@...el.com>; intel-gvt- dev@...ts.freedesktop.org; Wang, Zhi
> > A <zhi.a.wang@...el.com>
> > Subject: Re: [PATCH v17 0/6] drm/i915/gvt: Dma-buf support for GVT-g
> >
> > On Thu, Nov 09, 2017 at 05:33:56PM +0800, Tina Zhang wrote:
> > > v16->v17:
> > > 1) modify VFIO_DEVICE_GET_GFX_DMABUF interface. (Alex)
> > > 2) add comments for x_hot/y_hot. (Gerd)
> >
> > Hmm, doesn't apply cleanly here.
> > Tried 4.14-rc8 + gem proxy v2 + this series.
> > Seems the patches depend on unmerged gvt changes.
> > Do you have a git branch somewhere?
> Please use this:
> https://github.com/intel/gvt-linux.git
> branch: topic/dmabuf
> Thanks.
> 
> BR,
> Tina
> >
> > thanks,
> >   Gerd
> >
> > _______________________________________________
> > intel-gvt-dev mailing list
> > intel-gvt-dev@...ts.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

Powered by blists - more mailing lists