From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D365C2D0A3 for ; Wed, 4 Nov 2020 19:43:52 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 52612206F9 for ; Wed, 4 Nov 2020 19:43:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52612206F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3C6562BD3; Wed, 4 Nov 2020 20:43:49 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id F1E1929C6 for ; Wed, 4 Nov 2020 20:43:47 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 9F6D75C00DF; Wed, 4 Nov 2020 14:43:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 04 Nov 2020 14:43:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= IljwvV3bEJp9OezIi9mH4sSXKcnWxfzAq5MUFDYViUQ=; b=W0M94vNxRO+CPshH oVqkzc2rhsRMwlY/JFUZWdkMeMVG4L9+kQyZo0JNwmy5wroF+I37nR1TVA4BHyW6 QCJSENdn94OuRvayZtjhRK/24SQsnjN5dD9BTlprlkKon4i+wofDH7E/uvD7S/Vn qrza4gggPPjkuohlAC5IulS03A73y6vwIRSTxMePJuTAeWirPiR8nnRZZrgdfwUx VKL/UcKsn6eHvNm3xJx9jNU8I0welcVr8CdGAaJGwkYMsV3wXQK92JSezDXT0zIq s0wzyECThRU7aXgX55t7xgbBlU/WhA1twpsIuPcIUEvFKd/3E+5VkTfFASP4JltM VR61Wg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=IljwvV3bEJp9OezIi9mH4sSXKcnWxfzAq5MUFDYVi UQ=; b=ZvoRAOiniksEoAAE8jp6Dcut3kNV1dUt0w8JGGscQfcs3WvmYOOh9YvqL cX5wAkKoX+1UAsryb16Y6pZ4eh1W5377jH7FVU9vJpu1djzk1C3CHGepsfsg1JIp YcwuaXN8ZizKig5fyrOemsp1yk6CcTl2vLbSw1/d8youStBI6RC0s2LhKlAYBWNH OIJaTHFyflnQrWi1o8vhDA1RbXDH5erVdR6lzbVtSiJYIKE+JlzE5RIRvyc6bLvk dNq+Vc6rdgep9QwFuGtzq87PII3lS3LKoj4ETop6hr0IwCBQRIaO7E9HQquKqlDe vlKf+05c5Hiz2/ZQqr1CxxauPXBxQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddthedguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhgggfgtsehtqh ertddttdejnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghs sehmohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepkeethedtieevhfeige ejleegudefjeehkeekteeuveeiuedvveeutdejveehveetnecukfhppeejjedrudefgedr vddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 94543306467D; Wed, 4 Nov 2020 14:43:45 -0500 (EST) From: Thomas Monjalon To: David Christensen Cc: dev@dpdk.org, anatoly.burakov@intel.com, david.marchand@redhat.com Date: Wed, 04 Nov 2020 20:43:44 +0100 Message-ID: <4042743.04XgZqB5lT@thomas> In-Reply-To: <20201103220532.176225-2-drc@linux.vnet.ibm.com> References: <20201015172305.105717-1-drc@linux.vnet.ibm.com> <20201103220532.176225-1-drc@linux.vnet.ibm.com> <20201103220532.176225-2-drc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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" 03/11/2020 23:05, David Christensen: > The SPAPR IOMMU requires that a DMA window size be defined before memory > can be mapped for DMA. Current code dynamically modifies the DMA window > size in response to every new memory allocation which is potentially > dangerous because all existing mappings need to be unmapped/remapped in > order to resize the DMA window, leaving hardware holding IOVA addresses > that are temporarily unmapped. The new SPAPR code statically assigns > the DMA window size on first use, using the largest physical memory > memory address when IOVA=3DPA and the highest existing memseg virtual > address when IOVA=3DVA. >=20 > 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; > =20 > - for (levels =3D create->levels + 1; > + for (levels =3D create.levels + 1; > ret && levels <=3D info.ddw.levels; levels++) { There is a compilation failure with ppc64le-power8-linux-gcc: error: =E2=80=98struct vfio_iommu_spapr_tce_info=E2=80=99 has no member nam= ed =E2=80=98ddw=E2=80=99