Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbdG1JIr (ORCPT ); Fri, 28 Jul 2017 05:08:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41184 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbdG1JIq (ORCPT ); Fri, 28 Jul 2017 05:08:46 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 81DDA5F1E1 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=bhe@redhat.com Date: Fri, 28 Jul 2017 17:08:34 +0800 From: Baoquan He To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, root Subject: Re: [PATCH v8 13/13] iommu/amd: Disable iommu only if amd_iommu=off is specified Message-ID: <20170728090834.GO24304@x1> References: <1500627551-12930-1-git-send-email-bhe@redhat.com> <1500627551-12930-14-git-send-email-bhe@redhat.com> <20170727155852.GQ3610@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170727155852.GQ3610@suse.de> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 28 Jul 2017 09:08:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1211 Lines: 37 On 07/27/17 at 05:58pm, Joerg Roedel wrote: > On Fri, Jul 21, 2017 at 04:59:11PM +0800, Baoquan He wrote: > > From: root > > You probaly need to reset the author on this one. Oops, sorry. I made this patch on a testing machine. Will correct it. Thanks a lot for all these comments and great suggestions. > > > > > It's ok to disable iommu in normal kernel. While there's no need > > to disable it in kdump kernel after the on-flight dma issue has > > heen fixed. > > > > Signed-off-by: Baoquan He > > --- > > drivers/iommu/amd_iommu_init.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c > > index 8b4bac978062..880f693c809b 100644 > > --- a/drivers/iommu/amd_iommu_init.c > > +++ b/drivers/iommu/amd_iommu_init.c > > @@ -2494,7 +2494,8 @@ static int __init early_amd_iommu_init(void) > > goto out; > > > > /* Disable any previously enabled IOMMUs */ > > - disable_iommus(); > > + if (amd_iommu_disabled) > > + disable_iommus(); > > > > if (amd_iommu_irq_remap) > > amd_iommu_irq_remap = check_ioapic_information(); > > -- > > 2.5.5