From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5779EA04B5; Fri, 6 Nov 2020 23:16:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1AC95100C; Fri, 6 Nov 2020 23:16:31 +0100 (CET) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 6EFD1F64 for ; Fri, 6 Nov 2020 23:16:28 +0100 (CET) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A6M3BAu112390; Fri, 6 Nov 2020 17:16:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=xq7Nd9yY2ALwqNBCV4FLMLqd9ISpKFEGFKF7EiA75PM=; b=nqI+kIhtW8d2TbiuPXpietEWz2e6/N72ULdv4WtKuKTgsHV8ounmKPXwqkC88Kpc5+4z YEAOWuWIzPKfv2PPSh5quZTo1FQ/3qXp3yLL1RBEPu+Gm91lI2kV12eaRcyjnSDk2EAK NFBnnmE1DHvNRLSEwbFlgOt9GXd8OkOPCXUjsv/fKdDoBrYcQ5hp+g3v/ClfbeLbiPLc NVAvvsVHKwk4NYWU6QhKiMFgRYlEzdlOx86QJdvjD8Yzmbg66r4oe9GLuPuYm6YDRKLD EdDzN4hJckPBVXqzGPvMpfnyuU6WSJVRnNN+zNjqlqM+JT+FBOjdymFeEls0BIFZeHHB Fg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 34m7rf7t6k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Nov 2020 17:16:25 -0500 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0A6M3KIH112709; Fri, 6 Nov 2020 17:16:24 -0500 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 34m7rf7t65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Nov 2020 17:16:24 -0500 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0A6M7uG4013851; Fri, 6 Nov 2020 22:16:23 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma04dal.us.ibm.com with ESMTP id 34h02mt37g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Nov 2020 22:16:23 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0A6MGGGi38666816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Nov 2020 22:16:16 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC1036A0A5; Fri, 6 Nov 2020 22:16:21 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ABC996A0A7; Fri, 6 Nov 2020 22:16:21 +0000 (GMT) Received: from Davids-MBP.randomparity.org (unknown [9.211.58.42]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 6 Nov 2020 22:16:21 +0000 (GMT) To: Thomas Monjalon Cc: dev@dpdk.org, anatoly.burakov@intel.com, david.marchand@redhat.com References: <20201015172305.105717-1-drc@linux.vnet.ibm.com> <1866859.44BVCP9YqW@thomas> <19f7c0b2-9179-5587-c0c8-e9f417cfc64f@linux.vnet.ibm.com> <4279961.Ez0r9NPIs3@thomas> From: David Christensen Message-ID: Date: Fri, 6 Nov 2020 14:16:21 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <4279961.Ez0r9NPIs3@thomas> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-06_06:2020-11-05, 2020-11-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 impostorscore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011060151 Subject: Re: [dpdk-dev] [PATCH v5 1/1] vfio: modify spapr iommu support to use static window sizing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/4/20 11:12 PM, Thomas Monjalon wrote: > 04/11/2020 23:25, David Christensen: >> On 11/4/20 1:02 PM, Thomas Monjalon wrote: >>> 04/11/2020 22:00, David Christensen: >>>> >>>> On 11/4/20 11:43 AM, Thomas Monjalon wrote: >>>>>> Signed-off-by: David Christensen >>>>>> Acked-by: Anatoly Burakov >>>>>> --- >>>>>> -#ifdef VFIO_IOMMU_SPAPR_INFO_DDW >>>>>> - /* try possible page_shift and levels for workaround */ >>>>>> + /* if at first we don't succeed, try more levels */ >>>>>> uint32_t levels; >>>>>> >>>>>> - for (levels = create->levels + 1; >>>>>> + for (levels = create.levels + 1; >>>>>> ret && levels <= info.ddw.levels; levels++) { >>>>> >>>>> There is a compilation failure with ppc64le-power8-linux-gcc: >>>>> error: ‘struct vfio_iommu_spapr_tce_info’ has no member named ‘ddw’ >>>> >>>> How did you find that error? It builds locally for me on a POWER system >>>> with Meson/gcc and there were no build failures on Travis >>>> (https://travis-ci.com/github/drchristensen/dpdk/builds/198047029) when >>>> I checked it against AMD64/ARM systems. The code is PPC specific but it >>>> will build on all architectures (there are no IFDEFs around it). >>> >>> Remember, I cross-build with test-meson-builds.sh >>> Is it an issue of my toolchain? >> >> What distro/gcc version are you using? I'll try it locally on an x86. > > I am using powerpc64le-power8--glibc--stable-2018.11-1 from > https://toolchains.bootlin.com/releases_powerpc64le-power8.html Here's what I found: - Builds correctly on a RHEL 8.2 POWER9 host with gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5) and kernel 4.18.0 - Builds correctly on an Ubuntu 18.04.5 POWER9 host with gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 and kernel 4.15.0. - Build fails on an Ubuntu 18.04.5 AMD64 host with your POWER8 toolchain and the devtools/test-meson-builds.sh script. It appears that the VFIO header file in your toolchain: powerpc64le-buildroot-linux-gnu/sysroot/usr/include/linux/vfio.h is from the 4.1.49 kernel, but the sPAPR v2 IOMMU support wasn't added until the 4.2.0 kernel (https://lkml.org/lkml/2015/4/25/56). The update added the ddw member to the vfio_iommu_spapr_tce_info structure. I'll submit a new patch which skips testing additional levels unless kernel 4.2.0 or later is used. Dave