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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 18181C43219 for ; Thu, 2 May 2019 10:55:02 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFC6120656 for ; Thu, 2 May 2019 10:55:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFC6120656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 8ED6A3071; Thu, 2 May 2019 10:55:01 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D277B3047 for ; Thu, 2 May 2019 10:53:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 8BF7171C for ; Thu, 2 May 2019 10:53:56 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 29549A78; Thu, 2 May 2019 03:53:56 -0700 (PDT) Received: from [10.1.196.129] (ostrya.cambridge.arm.com [10.1.196.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E6CF3F719; Thu, 2 May 2019 03:53:52 -0700 (PDT) Subject: Re: [PATCH v7 05/23] iommu: Introduce cache_invalidate API To: Auger Eric , "eric.auger.pro@gmail.com" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "kvmarm@lists.cs.columbia.edu" , "joro@8bytes.org" , "alex.williamson@redhat.com" , "jacob.jun.pan@linux.intel.com" , "yi.l.liu@intel.com" , Will Deacon , Robin Murphy References: <20190408121911.24103-1-eric.auger@redhat.com> <20190408121911.24103-6-eric.auger@redhat.com> From: Jean-Philippe Brucker Message-ID: <6af5ddb7-75ad-7d3f-b303-f6f06adb1bf0@arm.com> Date: Thu, 2 May 2019 11:53:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Cc: "peter.maydell@linaro.org" , "kevin.tian@intel.com" , Vincent Stehle , "ashok.raj@intel.com" , Marc Zyngier , Christoffer Dall X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org Message-ID: <20190502105334.7SvU4DXyZBXF2FOaR6TvZpc1PpBBTAkgazFx6t4eAG8@z> On 02/05/2019 07:58, Auger Eric wrote: > Hi Jean-Philippe, > > On 5/1/19 12:38 PM, Jean-Philippe Brucker wrote: >> On 08/04/2019 13:18, Eric Auger wrote: >>> +int iommu_cache_invalidate(struct iommu_domain *domain, struct device *dev, >>> + struct iommu_cache_invalidate_info *inv_info) >>> +{ >>> + int ret = 0; >>> + >>> + if (unlikely(!domain->ops->cache_invalidate)) >>> + return -ENODEV; >>> + >>> + ret = domain->ops->cache_invalidate(domain, dev, inv_info); >>> + >>> + return ret; >> >> Nit: you don't really need ret >> >> The UAPI looks good to me, so >> >> Reviewed-by: Jean-Philippe Brucker > Just to make sure, do you accept changes proposed by Jacob in > https://lkml.org/lkml/2019/4/29/659 ie. > - the addition of NR_IOMMU_INVAL_GRANU in enum iommu_inv_granularity and > - the addition of NR_IOMMU_CACHE_TYPE Ah sorry, I forgot about that, I'll review the next version. Yes they can be useful (maybe call them IOMMU_INV_GRANU_NR and IOMMU_CACHE_INV_TYPE_NR?). I guess it's legal to export in UAPI values that will change over time, as VFIO also does it in its enums. Thanks, Jean _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu