Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp7836pxx; Mon, 26 Oct 2020 01:43:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoEL3rAWUxVlx/m/U91zKJcntWwZlhPMwgdRCYlC3QiNt1dSbb6Fct0kz4+XBErX0Uz8wk X-Received: by 2002:a17:906:2987:: with SMTP id x7mr14425623eje.301.1603701820502; Mon, 26 Oct 2020 01:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603701820; cv=none; d=google.com; s=arc-20160816; b=NtZagytjUZQv8NocmNS6YmW91t/BmH3w4Z52XwH3oF0onNffAy+oYKaNP4DysZRRik U6aq/y0qfhggpFflO4HbtZvmIubUC4oD58rXfPWaAeQew5OU/SrnNAoGjy3b/hdHDBTl IRZZd7zIzTcgGZP1PJ0hp6FnhCHwz1RACFpIHAN/dDhQu2LnpLYeoC34gYx6l+97QJcw Z4hrSGWtNutX1HjAhi1pQTJHxEGVPIg9gCVwxd8dRMbIPbV4C3GNuczrl+p1oXJboj32 Int6UuzWIItMJf7eqTlXuiVl6wKaaMzBqp+B3uNBoHa25qQnNmV9KOoGRSZWf/invic3 Hu2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=SfAVNttk78qRQKKemA7Ud33MHHCmqu34nhu5o0stHqY=; b=0CvTT94boxHMMsVljQOxshpdwcPpSrxuWirefro1RLHoEWQs0ThY78na7278NBCkFD EF46mkoYihq/WK4N4gbkD5K353ElWrY2ED89mzFS0CyGKZASKR8L+pp3BlMVnmiReC2e +2EChP3Pj3ptNN5y8JTVeme35lmyVj+rBpMn7ZVTUBfhyq6lTUHCNNsP9Ur6Ap9dM5f/ ANknABEyBYJvXHnRHsTqvmbkEXJFCQoHfTXY/OFVDdnEMT/nDWRgrT9tHQq9fV3xdsVm Qd3RrZg2dXM14cLMDBmZwZ74k/50vXRevxGEzZXGUt4F44W/ooyf8Hip/DEgjXVQ8Fsh rpqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=GK3lXmtL; 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=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si6545380eju.647.2020.10.26.01.43.18; Mon, 26 Oct 2020 01:43:40 -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=@mediatek.com header.s=dk header.b=GK3lXmtL; 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=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1770975AbgJZHt1 (ORCPT + 99 others); Mon, 26 Oct 2020 03:49:27 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:28466 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1420449AbgJZHt0 (ORCPT ); Mon, 26 Oct 2020 03:49:26 -0400 X-UUID: 731fa5de79564a608bbad1f3dc118972-20201026 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=SfAVNttk78qRQKKemA7Ud33MHHCmqu34nhu5o0stHqY=; b=GK3lXmtLj3iv9AASn1C2y5H111pxhpl4J4M72mq7Xmt2HX4honnrtf3zbZ6kYjswx8Y3FOzyLuAsyn+x/4SU9iEiG4R2SLI+p9qT0cRPMNPOSwQHuMDJT3Jr2QU1PCZ4F6DichSbrHg0LJ/lgTa84la/iifiJpas+muKM3Gd+ls=; X-UUID: 731fa5de79564a608bbad1f3dc118972-20201026 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1870587162; Mon, 26 Oct 2020 15:49:22 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 26 Oct 2020 15:49:07 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 26 Oct 2020 15:49:06 +0800 Message-ID: <1603698546.26323.89.camel@mhfsdcap03> Subject: Re: [PATCH v3 08/24] iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap From: Yong Wu To: Will Deacon CC: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Krzysztof Kozlowski , Evan Green , Tomasz Figa , , , , , , , , Nicolas Boichat , , , , Greg Kroah-Hartman , Date: Mon, 26 Oct 2020 15:49:06 +0800 In-Reply-To: <20201023111740.GA20933@willie-the-truck> References: <20200930070647.10188-1-yong.wu@mediatek.com> <20200930070647.10188-9-yong.wu@mediatek.com> <20201023111740.GA20933@willie-the-truck> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 8750D7412EF4047F0F7D427B7CA7C541119F84D3827A3506E3419C88D3EFEC702000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDIwLTEwLTIzIGF0I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