Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2074234pxb; Thu, 7 Oct 2021 23:36:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk1rqsyXDEs/tUQgGvtzgHo7fFPpLbpFVcTNF86awKEmjGjcPuuKwTdzR+nqThhR+HTOyU X-Received: by 2002:a17:906:1c14:: with SMTP id k20mr1968953ejg.22.1633674961184; Thu, 07 Oct 2021 23:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633674961; cv=none; d=google.com; s=arc-20160816; b=0Xf2lS8hxu3n4gEEKs956q3tYUzw+Z6orfv46MrUpiWkWhVKV8wXaOrBmLt6v6l0pl nBP0MVXVXO7UqWqTk4XoGPl8GM4BAE2EsFeVirNz83GH+d78RWdeztAl5AFeKlqRtVF3 /E5bwVnmG3E2rwqipEfi7lmCiT29pvcA1uktzlLsjgN3vL5ZLd1YCYZKw/o4WJV/CngE NbQ90UPkAoqoUYt52KU0PLKvwdLKsAyxKk26e3Ba9xBO6Dwz4upgvPP5g3BJwbcw3606 vawnqOl8HSzxUBhCrGvJzDf8nl176P3JWoeTG0rGmxrouBSXC2eHTvaW11j/wOlW540f jz2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=LqFHlcG7PhUztX0GNR3rdYWJFK79XonvI/cfqLKKkCs=; b=dGeJ+tbA2nh1aOGQ4EPMPFFqG1L9z0XswNS4WOTwo6cNYmx7054+keu/81qPQ7u/el 82wJyCRALqxz4jJzU+yiWIG0CN4YmcDPmqiPJuaSoQwXNhKJe8AJDqwkK6BFYIfXwHzh +lGpwsDSpjySMlaPGJhoHCw/tTEsDaHFtHz1dB+7bAPmOS6gFsT4rBZDxmIg2/3miNHG c6K06C53+WxN5opvR07nXTyXuiUYGw3KPeUyXwmrJZ4R9IkSQDSSFQoC/Ow9zJouKT56 0XXm7ia4zgc63llsk34TbfRaxzMxtXcsYzIj7h45zvQnhM61V79s/hCmzoiFHBCIL1h4 Y4tw== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd3si2349595edb.123.2021.10.07.23.35.37; Thu, 07 Oct 2021 23:36:01 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229798AbhJHGgO (ORCPT + 99 others); Fri, 8 Oct 2021 02:36:14 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:24178 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbhJHGgL (ORCPT ); Fri, 8 Oct 2021 02:36:11 -0400 Received: from dggeme713-chm.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4HQdfN4LdJz1DHfM; Fri, 8 Oct 2021 14:32:44 +0800 (CST) Received: from dggpeml100016.china.huawei.com (7.185.36.216) by dggeme713-chm.china.huawei.com (10.1.199.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Fri, 8 Oct 2021 14:34:14 +0800 Received: from dggpeml100016.china.huawei.com ([7.185.36.216]) by dggpeml100016.china.huawei.com ([7.185.36.216]) with mapi id 15.01.2308.008; Fri, 8 Oct 2021 14:34:14 +0800 From: "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)" To: Lu Baolu , "dwmw2@infradead.org" , "will@kernel.org" , "joro@8bytes.org" CC: "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "Gonglei (Arei)" , "Liujunjie (Jack, Cloud Infrastructure Service Product Dept.)" Subject: RE: [PATCH v3 2/2] iommu/vt-d: avoid duplicated removing in __domain_mapping Thread-Topic: [PATCH v3 2/2] iommu/vt-d: avoid duplicated removing in __domain_mapping Thread-Index: AQHXu9gdk8b89stVCk2Mwyelczw816vH1KOAgAAKN4CAAMI5UA== Date: Fri, 8 Oct 2021 06:34:14 +0000 Message-ID: <83c10788b872489299a54175fe3baafd@huawei.com> References: <20211008000433.1115-1-longpeng2@huawei.com> <20211008000433.1115-3-longpeng2@huawei.com> <54cf3663-85e0-3e63-9112-385e9d6eeceb@linux.intel.com> <1e83751f-5731-5786-c7d7-899542d7c2b7@linux.intel.com> In-Reply-To: <1e83751f-5731-5786-c7d7-899542d7c2b7@linux.intel.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.148.223] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogTHUgQmFvbHUgW21haWx0 bzpiYW9sdS5sdUBsaW51eC5pbnRlbC5jb21dDQo+IFNlbnQ6IEZyaWRheSwgT2N0b2JlciA4LCAy MDIxIDEwOjQ0IEFNDQo+IFRvOiBMb25ncGVuZyAoTWlrZSwgQ2xvdWQgSW5mcmFzdHJ1Y3R1cmUg U2VydmljZSBQcm9kdWN0IERlcHQuKQ0KPiA8bG9uZ3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