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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 00B6AC433ED for ; Wed, 12 May 2021 04:50:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 A72AC61421 for ; Wed, 12 May 2021 04:50:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A72AC61421 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Cc:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fYXtpk/LPBssopw4bX7ElVVIEgnwSRY0GB5J0qd/AoM=; b=A4C7g1ZqCy3Hjy8oxDQJGhJ5J AahJ4JeCU/ksxBDuPDMVB9CCpWLCYwSEHBk5nQdhAwtk/ZLeZEzQCIhWs1kLB2SIJmMF9f9ig0JVv ph8VUCtxElSryy+uBHczDDycw8rW+5XCgb/1SSWES8RmklB96vbPmZ+LeW1bcjHmr14Y7LLZ/3STE ibwUfVwMGoL8uHzSysgKpQBRVP7nyo0Nl/iWOMcrJq/dN58hDKnheMHObvfPAsxQgJhkPtn3Ex37M 7d/RVXykcDLYbEwOPrjCLv1rqi/hmYNOSTu1eSKmu1tNBt4bwSc1U9OTA+2zUnRR3uikgfXkH7OsY FDu8H9NAg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lggmn-001zCm-6s; Wed, 12 May 2021 04:47:53 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lggmk-001zCd-1b for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 04:47:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Cc:Sender:Reply-To:Content-ID:Content-Description; bh=GozV/Qanw0P65Q8rjZB1E6M4/ZjUPtYUndyidms5VPc=; b=3Ky2v1qgwDzFU216BMPskoP1eK mYF9+fVRrlQqqBi+SdkCDkpVNwsfD9DMATv8I6Wzt+a1D1zPE/hTEpy9I1QHWMqMf9dbpRyxFON7U P1M4vL5EM63gFTMIDeTb0ddWN8KtQMtZFqs+oo7gx84dG4BDfB0yX6wBIyIw1rgz6SViy37DF90EF 1qh6Mrlv17bIsXLZ1MbUy5VN2FJ3pG7GJcr2foD7YHLoAeAVp8ZsYF5N+U+79/mQ7F1px9NF3fqIG 141ZhXoUSDUi3zoNKpKGm8Sb4QjnDj47mZKS4IzmtquyJiPi5xfdYRzLYiWauujzmKVIekBHWd9a/ W10DIRkw==; Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lggmh-00A60c-Bn for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 04:47:48 +0000 IronPort-SDR: GVKlJU555hAU9F646zL4AaYh5N88o/6IsXwT7bJg4PgdmCVbUDtc5l7gvuEaxNXuxmLjkdDwQB FfBf3lUFQWsA== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="199674332" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="199674332" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP; 11 May 2021 21:47:42 -0700 IronPort-SDR: 53J1wazrS1QReixwdHkkxnR6h55hKjKPB+/AHJbpqmNp4e/76VbGCJhC1SNjmVaypT58hu5x5h SX50P3VhkV8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,292,1613462400"; d="scan'208";a="622109218" Received: from allen-box.sh.intel.com (HELO [10.239.159.128]) ([10.239.159.128]) by fmsmga006.fm.intel.com with ESMTP; 11 May 2021 20:21:05 -0700 Cc: baolu.lu@linux.intel.com, Alex Williamson , Kirti Wankhede , Cornelia Huck , Jonathan Cameron , wanghaibin.wang@huawei.com, jiangkunkun@huawei.com, yuzenghui@huawei.com, lushenming@huawei.com Subject: Re: [RFC PATCH v4 01/13] 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 , Jean-Philippe Brucker , Yi Sun , Tian Kevin References: <20210507102211.8836-1-zhukeqian1@huawei.com> <20210507102211.8836-2-zhukeqian1@huawei.com> <18ac787a-179e-71f7-728b-c43feda80a16@huawei.com> <55fda826-9ab6-a3a0-b17e-a4d4879f00bc@linux.intel.com> <60182a35-e151-7150-3708-4e58dd8e78da@huawei.com> From: Lu Baolu Message-ID: <36cc7267-6aa3-db54-b08c-c2dfc0bbacb6@linux.intel.com> Date: Wed, 12 May 2021 11:20:18 +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: <60182a35-e151-7150-3708-4e58dd8e78da@huawei.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_214747_477482_B643E383 X-CRM114-Status: GOOD ( 14.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/11/21 3:40 PM, Keqian Zhu wrote: >> For upper layers, before starting page tracking, they check the >> dirty_page_trackable attribution of the domain and start it only it's >> capable. Once the page tracking is switched on the vendor iommu driver >> (or iommu core) should block further device attach/detach operations >> until page tracking is stopped. > But when a domain becomes capable after detaching a device, the upper layer > still needs to query it and enable dirty log for it... > > To make things coordinated, maybe the upper layer can register a notifier, > when the domain's capability change, the upper layer do not need to query, instead > they just need to realize a callback, and do their specific policy in the callback. > What do you think? > That might be an option. But why not checking domain's attribution every time a new tracking period is about to start? Best regards, baolu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel