Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2106524pxb; Sun, 18 Apr 2021 19:11:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4W/MLBZ1FMUZ2XNJuh6d8csaB0R3zgQDAnOZ4IFTObgFxvY74EZian8WfuOJtoULKlRWI X-Received: by 2002:a05:6a00:1511:b029:24c:e3f9:cce6 with SMTP id q17-20020a056a001511b029024ce3f9cce6mr17850991pfu.28.1618798274323; Sun, 18 Apr 2021 19:11:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618798274; cv=none; d=google.com; s=arc-20160816; b=mtxGgcH5SgACcIEedRPUfVGZoNGIo3arBUo0zYR+IEd/0l5Xc51B9N9wdhT5LfvsAY OV+MV4bUWI7AFsU+jTBBCJ8ogaBnFp3VEo4jKVQRCzk/cpH3x/GOyLl09IC3hl/RyZqs OAxHzGAc8xVqF3RoCe3iH9XXMVmrxiV5emxZNTnM5fk36hykYDLMqqO67UObu9kpGSts 7xJySNZ0EpWGphwXJMDqQFUYk1u4cTnGVUQUdV6brPJ2kDXwASmKSpkvpWdNjaTiUBYb Pr2C0rzc78uXZZWN2+uXKOzsIMuW7zzoLUIc+bu9KWaMPrwUz19N4gxi1Kzmk5Wizp0t 2ktg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:cc:ironport-sdr:ironport-sdr; bh=Qt+g12EBUVh+/I3fw6u4ghZg/KHsWXkbwHNA+fVtMAY=; b=r6SzflbEY7X47OIui4hgH4gGe9l+9T1thg5y77riTYWjZ2KSBvvHOWWpA1XzdvsvrZ QCu31r/UDoFErDbj8ZiG3WS8mS65QccaJ4cn0wvclh4dmaJ79ACBqsyIT9TPhhgQ729v 7goRg5tzOanOLvogwzxn7iEM3uIMv+w1S3GVzzue698Z2QX2R8RmFkrN88DarFn9t7tf 7h4/T80CssxU6gCHewjMF1XKKsZ0WcBvVC1S6hUxB2THu+6bkWcKL1qdTfZjBplkJylR fFFMAGDU6z4gViHdkk+A/HbKTtOnkACJBowaHD9OZsfuJSDsgJ9O9teJ9sSUXwLlcA19 7Uew== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si15199465pfb.110.2021.04.18.19.11.02; Sun, 18 Apr 2021 19:11:14 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237228AbhDSCJx (ORCPT + 99 others); Sun, 18 Apr 2021 22:09:53 -0400 Received: from mga05.intel.com ([192.55.52.43]:49128 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233224AbhDSCJw (ORCPT ); Sun, 18 Apr 2021 22:09:52 -0400 IronPort-SDR: qmvQ/PI0pLD+OrUGkkw5b9sEaa8F7FhAkGMGoQKVGD/GufvZdBFNqBaVz0igcozFt2BFi1HnaZ aPuB4nLRlyBQ== X-IronPort-AV: E=McAfee;i="6200,9189,9958"; a="280580173" X-IronPort-AV: E=Sophos;i="5.82,232,1613462400"; d="scan'208";a="280580173" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2021 19:09:21 -0700 IronPort-SDR: zxuHjgLbcM9BtCHqQCZ13ZYmO7rMenKxwRxWp6ygS8GE0+VyAbOHSkgSEuqzA05JJwQLR+P5AF LRu1uAXt3CzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,232,1613462400"; d="scan'208";a="426330304" Received: from allen-box.sh.intel.com (HELO [10.239.159.128]) ([10.239.159.128]) by orsmga008.jf.intel.com with ESMTP; 18 Apr 2021 19:09:17 -0700 Cc: baolu.lu@linux.intel.com, Alex Williamson , Cornelia Huck , Kirti Wankhede , wanghaibin.wang@huawei.com, jiangkunkun@huawei.com, yuzenghui@huawei.com, lushenming@huawei.com Subject: Re: [PATCH v3 01/12] iommu: Introduce dirty log tracking framework To: Keqian Zhu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, Robin Murphy , Will Deacon , Joerg Roedel , Yi Sun , Jean-Philippe Brucker , Jonathan Cameron , Tian Kevin References: <20210413085457.25400-1-zhukeqian1@huawei.com> <20210413085457.25400-2-zhukeqian1@huawei.com> <56b001fa-b4fe-c595-dc5e-f362d2f07a19@linux.intel.com> <88cba608-2f22-eb83-f22e-50cb547b6ee8@huawei.com> <2c01425f-813c-4278-ba06-26d651496a5c@linux.intel.com> <64c87f67-3687-61bd-1587-724cc2f9cc97@huawei.com> From: Lu Baolu Message-ID: <4e7ae083-08f5-b273-f873-21a2960ea68a@linux.intel.com> Date: Mon, 19 Apr 2021 09:59:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <64c87f67-3687-61bd-1587-724cc2f9cc97@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Keqian, On 4/16/21 5:07 PM, Keqian Zhu wrote: >> I am worrying about having two sets of APIs for single purpose. From >> vendor iommu driver's point of view, this feature is per device. Hence, >> it still needs to do the same thing. > Yes, we can unify the granule of feature reporting and status management. > > The basic granule of dirty tracking is iommu_domain, I think it's very reasonable. We need an > interface to report the feature of iommu_domain, then the logic is much more clear. > > Every time we add new device or remove device from the domain, we should update the feature (e.g., > maintain a counter of unsupported devices). Yes. This looks cleaner. > > What do you think about this idea? > > Thanks, > Keqian Best regards, baolu