Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6689680pxv; Thu, 29 Jul 2021 23:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFKTDo+jvOqQauj6MF+eHIAZQWOHzCpIN/lJnW7hnUQ8jbhZl9GgyeYqCS5HPENjBj1556 X-Received: by 2002:a05:6602:228d:: with SMTP id d13mr1111558iod.36.1627625488918; Thu, 29 Jul 2021 23:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627625488; cv=none; d=google.com; s=arc-20160816; b=Jzp/e4H2da7k6/Q4flttdZwn7yx+p+xg+kdycpFGxvRl+tcVqiK9+dxqFDapIoAYfy pijs3i3SxHGpTocMBJPoLvFMn2cxD9fpg0KO7qXVDkXk71plPO32an5rdviFbVxVzlGT wR8Rdu/U+GJddlL1DnlPO9hco0kcgChTGYJRUh711eJjHtk1V4EChcj9F4ttjLfcW7Li I37LdBUOaqRwAiNb7v+tuIQ3DnPvA3sZOKGyGeu+tkNq1y+moJCfpQpqHejve1o+ImH5 qX8xPqM4CsvYBCAFGMMWX271qecBhrCXZXjSyx77Ge/+zpf6rudjSF4swKWjRKd779VK AafA== 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; bh=Du5KUGSIeHoEVwm29lGp8X0y3DrX8jBULH3nglQe200=; b=ZPNSzdQsBrZ9EvFE72K36v/iKNAjWKkVBHgzL7eiu5OixxUhRRjP2Yc5O1hX8DRLsW EcojK4vDPc54yglpcrtjmtRilIImXGlgwIQaNlIsBAQBQ8f9QF5pKzZo1Ad2DTsWtcGm lsA4WIyjhpnnsRvgR4o2IZ4lIl8nBYhc8Dil931Xwkl8vMcaarYee5MuosnlWjBsLmth NK/uJuG43rhEzIEbAdDYR9clEuwSWBbEzcCQOJ8gb5vRR1pr8SF068GiTMibDn7NjJxC pWjXdU/PWIOiMVHnyj1Y5KxwRShE5Wh6cCQnIPxfk3S9neKcXtF5HTRfF/xwNJwJSS12 L7wQ== 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 c15si741557ioa.59.2021.07.29.23.11.16; Thu, 29 Jul 2021 23:11:28 -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 S237168AbhG3GJ2 (ORCPT + 99 others); Fri, 30 Jul 2021 02:09:28 -0400 Received: from mga05.intel.com ([192.55.52.43]:21194 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233890AbhG3GJ1 (ORCPT ); Fri, 30 Jul 2021 02:09:27 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10060"; a="298623238" X-IronPort-AV: E=Sophos;i="5.84,281,1620716400"; d="scan'208";a="298623238" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 23:09:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,281,1620716400"; d="scan'208";a="465344760" Received: from allen-box.sh.intel.com (HELO [10.239.159.118]) ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 29 Jul 2021 23:09:20 -0700 Cc: baolu.lu@linux.intel.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, suravee.suthikulpanit@amd.com, john.garry@huawei.com, dianders@chromium.org Subject: Re: [PATCH v2 04/24] iommu/vt-d: Drop IOVA cookie management To: Robin Murphy , joro@8bytes.org, will@kernel.org References: <6630ae3191be428135a7269c15b17d03c90573c1.1627468309.git.robin.murphy@arm.com> From: Lu Baolu Message-ID: <1cc3a65c-15b6-f971-3ea3-668ebb0b20f5@linux.intel.com> Date: Fri, 30 Jul 2021 14:07:02 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <6630ae3191be428135a7269c15b17d03c90573c1.1627468309.git.robin.murphy@arm.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 On 7/28/21 11:58 PM, Robin Murphy wrote: > The core code bakes its own cookies now. > > Signed-off-by: Robin Murphy > --- > drivers/iommu/intel/iommu.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c > index c12cc955389a..7e168634c433 100644 > --- a/drivers/iommu/intel/iommu.c > +++ b/drivers/iommu/intel/iommu.c > @@ -1979,10 +1979,6 @@ static void domain_exit(struct dmar_domain *domain) > /* Remove associated devices and clear attached or cached domains */ > domain_remove_dev_info(domain); > > - /* destroy iovas */ > - if (domain->domain.type == IOMMU_DOMAIN_DMA) > - iommu_put_dma_cookie(&domain->domain); > - > if (domain->pgd) { > struct page *freelist; > > @@ -4544,10 +4540,6 @@ static struct iommu_domain *intel_iommu_domain_alloc(unsigned type) > return NULL; > } > > - if (type == IOMMU_DOMAIN_DMA && > - iommu_get_dma_cookie(&dmar_domain->domain)) > - return NULL; > - > domain = &dmar_domain->domain; > domain->geometry.aperture_start = 0; > domain->geometry.aperture_end = > Reviewed-by: Lu Baolu Best regards, baolu