From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750902AbdE2HUb convert rfc822-to-8bit (ORCPT ); Mon, 29 May 2017 03:20:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58296 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbdE2HUa (ORCPT ); Mon, 29 May 2017 03:20:30 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 61225448D6E Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 61225448D6E Message-ID: <1496042420.21582.3.camel@redhat.com> Subject: Re: [PATCH v6 4/6] vfio: Define vfio based vgpu's dma-buf operations From: Gerd Hoffmann To: Xiaoguang Chen , alex.williamson@redhat.com, chris@chris-wilson.co.uk, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, zhenyuw@linux.intel.com, zhiyuan.lv@intel.com, intel-gvt-dev@lists.freedesktop.org, zhi.a.wang@intel.com, kevin.tian@intel.com Date: Mon, 29 May 2017 09:20:20 +0200 In-Reply-To: <1495874332-2851-5-git-send-email-xiaoguang.chen@intel.com> References: <1495874332-2851-1-git-send-email-xiaoguang.chen@intel.com> <1495874332-2851-5-git-send-email-xiaoguang.chen@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 29 May 2017 07:20:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +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; };