From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <anatoly.burakov@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 7D0F77ED7
 for <dev@dpdk.org>; Wed, 26 Apr 2017 10:15:33 +0200 (CEST)
Received: from orsmga002.jf.intel.com ([10.7.209.21])
 by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 26 Apr 2017 01:15:32 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.37,253,1488873600"; d="scan'208";a="79024853"
Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23])
 by orsmga002.jf.intel.com with ESMTP; 26 Apr 2017 01:15:31 -0700
Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by
 IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Wed, 26 Apr 2017 09:15:29 +0100
Received: from irsmsx109.ger.corp.intel.com ([169.254.13.12]) by
 irsmsx111.ger.corp.intel.com ([169.254.2.58]) with mapi id 14.03.0319.002;
 Wed, 26 Apr 2017 09:15:30 +0100
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH dpdk v2] vfio/ppc64/spapr: Use correct
 structures	for add/remove windows
Thread-Index: AQHSvmQkom14PYxD/0W0k8qikAxmSaHXTZUg
Date: Wed, 26 Apr 2017 08:15:29 +0000
Message-ID: <C6ECDF3AB251BE4894318F4E4512369782210A11@IRSMSX109.ger.corp.intel.com>
References: <20170426080641.23676-1-aik@ozlabs.ru>
In-Reply-To: <20170426080641.23676-1-aik@ozlabs.ru>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ctpclassification: CTP_IC
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmFhNmZlNjgtOTgyZi00MzA4LWJmZGUtMzFiM2NkMmQ0MmJmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Imp4YmQ1eDg0d1hkSTkxMnVmazl4Q1BVaFZoVHROdHhIQmI3XC8ycFVTbUFrPSJ9
dlp-product: dlpe-windows
dlp-version: 10.0.102.7
dlp-reaction: no-action
x-originating-ip: [163.33.239.180]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH dpdk v2] vfio/ppc64/spapr: Use correct
 structures	for add/remove windows
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Apr 2017 08:15:34 -0000

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Alexey
> Kardashevskiy
> Sent: Wednesday, April 26, 2017 9:07 AM
> To: dev@dpdk.org
> Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
> Subject: [dpdk-dev] [PATCH dpdk v2] vfio/ppc64/spapr: Use correct
> structures for add/remove windows
>=20
> If Linux UAPI headers in the system do not have
> VFIO_SPAPR_TCE_v2_IOMMU defined, DPDK define necessary structures
> itself. However the existing definitions are different from ones pushed t=
o
> the mainline kernel.
>=20
> This copies structures passed via VFIO_IOMMU_SPAPR_TCE_CREATE and
> VFIO_IOMMU_SPAPR_TCE_REMOVE ioctls.
>=20
> No change in behaviour is expected if installed linux UAPI headers have
> knowledge of VFIO_SPAPR_TCE_v2_IOMMU.
>=20
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> Changes:
> v2:
> * changed commit log after I realized that the linux UAPI headers are
> currently used and if a distro is quite fresh, it has everything defined =
correctly
> ---
>  lib/librte_eal/linuxapp/eal/eal_vfio.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>=20
> diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h
> b/lib/librte_eal/linuxapp/eal/eal_vfio.h
> index 239ac4d8d..4a0283cb4 100644
> --- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
> +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
> @@ -69,13 +69,21 @@ struct vfio_iommu_spapr_register_memory {
>=20
>  struct vfio_iommu_spapr_tce_create {
>  	uint32_t argsz;
> +	uint32_t flags;
> +	/* in */
>  	uint32_t page_shift;
> +	uint32_t __resv1;
>  	uint64_t window_size;
>  	uint32_t levels;
> +	uint32_t __resv2;
> +	/* out */
> +	uint64_t start_addr;
>  };
>=20
>  struct vfio_iommu_spapr_tce_remove {
>  	uint32_t argsz;
> +	uint32_t flags;
> +	/* in */
>  	uint64_t start_addr;
>  };
>=20
> --
> 2.11.0

That was quite an oversight on my part!..

Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>