Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp809372pxb; Wed, 1 Sep 2021 10:19:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5GFeF4EtDAzPcc7dnRjLli1olBIfiXUz/K0Ca9RbSzYfBEF635PLvug9yz/zhuK3x+5ur X-Received: by 2002:a05:6402:4d1:: with SMTP id n17mr628321edw.337.1630516752320; Wed, 01 Sep 2021 10:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630516752; cv=none; d=google.com; s=arc-20160816; b=KZeto5Nq/e+A6oVIJZ7VqnLI3koZKtkwL9VxNUSP5I123mEHaHpz+WUpSOoJyqb3/G /o4lMcTrC36E97rYOUqbqeN6vlaprJOXbD46/8MKzlmTUVPQ5eju5iZnfr1KZvL95uqz x4c/eAEgxkhD3euOC54y9W1XBI1+3/qaxFmnzB2DIYBpKBRAPcBKr3mMahKbj8qzH6Gc MjP/0UN7xCZZef8rNcPZRAuzqDSOxpRqmKxp7eiF0cZoZhgeAHVXQHdHchnpO1I+Pm/5 YnouZsHikjd+i3SXZ02Zr5+wm7ElqQL8ixJa8JZ1gbOejRlIjFR2if8u/sBN+Ucuo1PR NAzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature:dkim-signature; bh=PjI/Na3u99SdyJiZLuyCXPem/Uardb9RSRjNBRnAjTs=; b=KH033Aar0e4fSQkj7W8Fr67A/Xn3/nAwuZpzS+8ZdPI+Sy1QcNkpArdeZwGJN5S7fA MvSN4o3IKRph2CuP/vwOEe3Cp93Itr7+X9zxSc7pUm5YG6b/1yA66qXMMnqKe1US6bXK lTdZYaovkGTAGfTGfz8OP44Vv3SElOq/NnaepSnH1LlUMvDYNNbyLDcM45Sjm8UceYuF +gpsOBoEKGYEWVptIqxnmZUCKglRU26SlL2jYrptqgEHm2D/OQqxvIjKBi/F88OdorOk VYWAK2iisJ8WUBDaurHZ9uvSaolXb14JlyP0u17G5ZLnsfkYjpvUC8rwJjQZineiZrkK 4K7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=UdwBpIi5; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=qy6Y0tkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si121307edw.452.2021.09.01.10.18.15; Wed, 01 Sep 2021 10:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@svenpeter.dev header.s=fm2 header.b=UdwBpIi5; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=qy6Y0tkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=svenpeter.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344543AbhIARPq (ORCPT + 99 others); Wed, 1 Sep 2021 13:15:46 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:57977 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238873AbhIARPp (ORCPT ); Wed, 1 Sep 2021 13:15:45 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1BB1B5C0076; Wed, 1 Sep 2021 13:14:48 -0400 (EDT) Received: from imap21 ([10.202.2.71]) by compute1.internal (MEProxy); Wed, 01 Sep 2021 13:14:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=mime-version:message-id:in-reply-to:references:date:from:to :cc:subject:content-type; s=fm2; bh=PjI/Na3u99SdyJiZLuyCXPem/Uar db9RSRjNBRnAjTs=; b=UdwBpIi5+aPrVMeubICwqzZ+llcAdAR05tucL01juVRT nGKaB+eE/Iy0StUKvrPNyTMRa5Ob/wahSGNbK3/Oa5r70yJ0jp6TBRhoKddJNpeh M3iy54fDqlgE7TitGBKfPp6fj5JKuU44ANcLFXh1oJN9ScYBovp9qTAD3eC2Cfme lp+dz+9mVa/b25VrDfNgxuhyE0zfhA+mbP7OwenJ2zLeNTqkDaOC1DvyzTRsM5A4 rxi+OOZ8wncpD9ItTeXVJeL8iaqDaMu6/l2dp8sm0S6bgbHjf2gLsTmff3BA6kE9 phgNq7Y44jC0ZvkF6QbkiklatyS3a2eL+YNIlqwZ2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm3; bh=PjI/Na 3u99SdyJiZLuyCXPem/Uardb9RSRjNBRnAjTs=; b=qy6Y0tkBC5GAe4YphlEuTp Gj2DToBLWWn022elJsSRXYOy7MkorEbyu7ghipPnL0kk+oMwTj/aKIutsJ2Tyhq/ ncYlMQ6OUW/OGGQhA2VThCfr33apDPFGbSj3/eYFktwLGT+cA+2I/KfkNkwKc8+k /YyYFMSnArCzb7vq2hOUf9huZl63dlgVo9gk56kPdTs1nUNfr72uc3S81JPx+xJ7 7hVbvT7GJWG964ruks4Ku/cQU3rpbseIgREaa7KPXa6BeYspCUXy6PukuQQZ51YB pb4XDuXp3dU1nQemEnFXmJpvXmSHtIaEeCR/g4GaM/xrelvxYoBe1HT4bczf/7Jw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvfedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfufhv vghnucfrvghtvghrfdcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrf grthhtvghrnhepgfeigeeiffeuhfettdejgfetjeetfeelfefgfefgvddvtdfghfffudeh vdefkeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshhvvghnsehsvhgvnhhpvghtvghrrdguvghv X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7845151C0061; Wed, 1 Sep 2021 13:14:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1126-g6962059b07-fm-20210901.001-g6962059b Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20210828153642.19396-1-sven@svenpeter.dev> <20210828153642.19396-7-sven@svenpeter.dev> Date: Wed, 01 Sep 2021 19:14:24 +0200 From: "Sven Peter" To: "Alyssa Rosenzweig" Cc: iommu@lists.linux-foundation.org, "Joerg Roedel" , "Will Deacon" , "Robin Murphy" , "Arnd Bergmann" , "Mohamed Mediouni" , "Alexander Graf" , "Hector Martin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/8] iommu: Move IOMMU pagesize check to attach_device Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 31, 2021, at 23:39, Alyssa Rosenzweig wrote: > > + if ((1 << __ffs(domain->pgsize_bitmap)) > PAGE_SIZE) { > > Not a fan of this construction. Could you assign `(1 << > __ffs(domain->pgsize_bitmap))` to an appropriately named temporary (e.g > min_io_pgsize) so it's clearer what's going on? Good point, will do that for the next version. > > > + pr_warn("IOMMU page size cannot represent CPU pages.\n"); > > "Represent" how? > Looks like I dropped an "exactly" there when taking this line from iova.c :) Thanks, Sven