Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2771857pxb; Tue, 19 Jan 2021 05:55:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEyApzVryAefIpD1rrO0uVReOFQB8y4Xcc3Xniw5vS/Xzb3p2uoIkFk0pF+9/eA1AZ4Fc9 X-Received: by 2002:a17:906:6d44:: with SMTP id a4mr3263870ejt.453.1611064522348; Tue, 19 Jan 2021 05:55:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611064522; cv=none; d=google.com; s=arc-20160816; b=pyROC36lgp8hYFLkvGYyDZiVHkkqEHiEns04XXVOxi557YSzicix+s8kmVMPBSFOe5 jPvZ1BtGRksvlNLMGNBGSYRXl8p002icmp0Ng+cht8DxYbETU2FWWbO617r0zg3vqlQd 4pn9iR6NiUA/OFt+OP7MnpJftXbNZM1AXzi3cmecMFE/1FKFfqvclLnNuDRM/9yE3+Vn 9T/X65NmcBOxOHUmJePe/vzR0eOxjVYBidqWn7ynURWHYD1hP80ygpysE3Iw0DyxUX+W JZrYhXPtIiG80j6dVIpAN4jhNzqBcqs1UZqfRI+/0g97G9nLic9DUthta/xZTldDPbd+ n5Gg== 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=KaAc3gaiiIOJ95YUTI6BoSuZFHIUL9kH/yunEFgEmSs=; b=Mmw8Kfy2hs6IV6L9QbFV2AXfpfc3UjSkpVfHtEGAknWLQW+fvuBS4LEFdiR/Z7Z8lR 0O4bB9tzbFDPsZBnxq5hQ9t34h/9SVCDU3osZbU04yn0BCJvqxA35q3+L8mfHhZ8N10L 7b/2yzw/jMJd52o5/xChLdU2tTJLZOxvZi4tBIOCNnJdpJ4cRWJT23Siz5QkI4x2Irdf lr12sQcZYq10hukwMEkAj0zAwgmhIL+u3e/gWX3RjnecwhoBYeZ0rUS0G0R55SqZXuDf hrR6hdqXYSlq/RpI5lwdYrE7vpCtYR1gabp8gSO1wKSdRiHc9fe9JYy9/Ve9G/fcsCj4 kZZg== 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 mp28si7176270ejc.284.2021.01.19.05.54.58; Tue, 19 Jan 2021 05:55:22 -0800 (PST) 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 S2394954AbhASNxR (ORCPT + 99 others); Tue, 19 Jan 2021 08:53:17 -0500 Received: from mga03.intel.com ([134.134.136.65]:35121 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394693AbhASNsT (ORCPT ); Tue, 19 Jan 2021 08:48:19 -0500 IronPort-SDR: c5+Ejz8vuqYq5KFA5F5e3Gsrsev+tiPf8MMUBGq9wiNFicogMQR7ba0YxGHnzHvcvUZXAvLwcT en/kaUSTaNGA== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="179012497" X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="179012497" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 05:46:32 -0800 IronPort-SDR: 9Drec6KDlJklq/AcoxMUfb1QCvAcoxdfbXtmTJNG22mG/Mp0KEG2VcE7luN4EQBo8XIwC9N242 Rg5zSm+ThUOg== X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="383938590" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.249.174.34]) ([10.249.174.34]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 05:46:30 -0800 Cc: baolu.lu@linux.intel.com, thomas.lendacky@amd.com, will@kernel.org, iommu@lists.linux-foundation.org, robin.murphy@arm.com Subject: Re: [PATCH 0/2 v2] iommu: fix the failure of deferred attach for iommu attach device To: Lianbo Jiang , linux-kernel@vger.kernel.org References: <20210119111616.12761-1-lijiang@redhat.com> From: Lu Baolu Message-ID: Date: Tue, 19 Jan 2021 21:46:28 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210119111616.12761-1-lijiang@redhat.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 2021/1/19 19:16, Lianbo Jiang wrote: > This patchset is to fix the failure of deferred attach for iommu attach > device, it includes the following two patches: > > [1] [PATCH 1/2] dma-iommu: use static-key to minimize the impact in the fast-path > This is a prepared patch for the second one, move out the is_kdump_kernel() > check from iommu_dma_deferred_attach() to iommu_dma_init(), and use the > static-key in the fast-path to minimize the impact in the normal case. > > [2] [PATCH 2/2] iommu: use the __iommu_attach_device() directly for deferred attach > Move the handling currently in iommu_dma_deferred_attach() into the > iommu core code so that it can call the __iommu_attach_device() > directly instead of the iommu_attach_device(). The external interface > iommu_attach_device() is not suitable for handling this situation. > > Changes since v1: > [1] use the __iommu_attach_device() directly for deferred attach > [2] use static-key to minimize the impact in the fast-path > > Lianbo Jiang (2): > dma-iommu: use static-key to minimize the impact in the fast-path > iommu: use the __iommu_attach_device() directly for deferred attach > > drivers/iommu/dma-iommu.c | 29 +++++++++++------------------ > drivers/iommu/iommu.c | 12 ++++++++++++ > include/linux/iommu.h | 2 ++ > 3 files changed, 25 insertions(+), 18 deletions(-) > Good fix and improvement. For the patches in this series: Reviewed-by: Lu Baolu Best regards, baolu