Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp141016ybp; Wed, 16 Oct 2019 15:21:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3SUt2UyGbdbAp9N5NBnND57uCOwH18c2b+79PIVjy9sbIzeop4666Pzl1OuCs+tA8lENN X-Received: by 2002:a17:907:36e:: with SMTP id rs14mr612319ejb.280.1571264515880; Wed, 16 Oct 2019 15:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571264515; cv=none; d=google.com; s=arc-20160816; b=XdNfIhsRKHmYjQhLW2SfyYCm0tktRWpGZXQhJAQjhWZE3BgvMd1x8oIcZ5jPPl9GZL s7eUz7ejDj64Scw5yYifsF0iSMEhe7eqsjmZaJ+0vdd8WXarYZ1SgYcBnnOqqPGUCq46 w1taZiv/eX5IUFdQQ7gSgZBorG474+hWK/I8Luf9tOKLT3cboxz2iB4GDzKaEFfdWfAp Rjq61v9TI9nYhHQl5mzzglUMAwKU+2PMz2JUd0IOMwlPcWbo+6RivcF4azVAAn1jp3Wr R3cuO27cDP7CDtXs4PeTzyuOzbDjMAf6XN96O53ENBSwb+DpKOObool7vpJDTBet7+Np hzSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=84un0BnCmSmk/RUS0QkVlwPJcljzAYTorNWyxLfu4Fk=; b=XAPAurcpVWs1Suwdf4vW/azM68HxbmajgcNb9cmIsI8Dm0XxcdWNpNm/pQ0MjMZW2e zbdA6UH1qVn9127x2l6rCkyQ01wt4PO15rmdm09bWY4JvkxDMyuaQiH9pFMSrfD2p29T szMsLMFLYxJw25VPOuA5scWWM0dgxSSyWEM66WhOz1kqt3i0NKwSTmXFtfVDKgSi4KY6 4nMqdoDX0SQKI5EWEJJO2oOQweLnguebcrwRaYDuUdnyFG9m9Ekr6osRR2OoYNbN3/Uu eTVZgm2HBCXbkj06WHLuCIyq+mD+gn/O0k1mpPFfpb70rf0PCr10eKOJSpJkmN5r/D7u yEEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x25si231763edd.350.2019.10.16.15.21.28; Wed, 16 Oct 2019 15:21:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405331AbfJPPo7 (ORCPT + 99 others); Wed, 16 Oct 2019 11:44:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:49278 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404969AbfJPPo7 (ORCPT ); Wed, 16 Oct 2019 11:44:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C3994AF5B; Wed, 16 Oct 2019 15:44:57 +0000 (UTC) Date: Wed, 16 Oct 2019 17:44:55 +0200 From: Joerg Roedel To: Qian Cai Cc: Tom Murphy , Robin Murphy , Christoph Hellwig , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: "Convert the AMD iommu driver to the dma-iommu api" is buggy Message-ID: <20191016154455.GG4695@suse.de> References: <1571237707.5937.58.camel@lca.pw> <1571237982.5937.60.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1571237982.5937.60.camel@lca.pw> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 16, 2019 at 10:59:42AM -0400, Qian Cai wrote: > BTW, the previous x86 warning was from only reverted one patch "iommu: Add gfp > parameter to iommu_ops::map" where proved to be insufficient. Now, pasting the > correct warning. Can you please test this small fix: diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 78a2cca3ac5c..e7a4464e8594 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2562,7 +2562,7 @@ static int amd_iommu_map(struct iommu_domain *dom, unsigned long iova, if (iommu_prot & IOMMU_WRITE) prot |= IOMMU_PROT_IW; - ret = iommu_map_page(domain, iova, paddr, page_size, prot, GFP_KERNEL); + ret = iommu_map_page(domain, iova, paddr, page_size, prot, gfp); domain_flush_np_cache(domain, iova, page_size);