Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp937206ybp; Thu, 17 Oct 2019 05:53:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWxirXGDCiZ6m6Aka2ya9nvVBPFphgskL1xEvv7D2TolPj+9UiE4EdezLbF5U/fKS6YorU X-Received: by 2002:a50:e409:: with SMTP id d9mr3506029edm.254.1571316793329; Thu, 17 Oct 2019 05:53:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571316793; cv=none; d=google.com; s=arc-20160816; b=oPf3a7nbaA/B+m0g3CuBQSqZWY9NHMi2JxOpMM1W9ptj0reED1w1HUL2mS6qMnSG3k TzYjx2OUsC2elQgQcjRZJXHZr2eoA+5yV2elJXdzFU15mq0vjmf7ECEfiSojimdZQYuV MW0KTRzOjECCmrNZ0oClG45xr40lG9MujcUbim3y3R81MmGnDEBngvBjjpD9iHiF/CWQ r3ecjXiOKcsHFruZWBIRhebx+i9xT5/fenwTvF3xzXrfhSpTXkYjhKHm6lI8SQO4jbr7 KzM9+9niYADqHI9sYbKvtj7FIQFNlY0JJXnndoU+YNuTljvAt+yEIMV/DfGlXdbW+950 SqTA== 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:date:from:dkim-signature; bh=xnrlXCUOxPmSFsn1bWubDV9XvYWU9LUg2fS/Ow1fciQ=; b=MllJGhz1n2xO95RUSRE4XzM4bBCyKa3WvYyfqH+eUgHsmXTZCkvArt18PkZzUaIQBX Kc/XIZhlR3SK+psLfBhiJAxKZEmmT3Lzphm7lOTrdchrXJdfkk4BDiYIXSh5Eo94ktIx 9ATZpR/3zvWqzhV2RsV1t5sIkBOMsHFikvdvVYUl0xx82Z3fgZBf1bG5oqdWv5IRtmFs HGJ1ZDcIGLATCgvjB9PB1GqLIrTci2i0ryAJMlrk/R3alVcaxa64EIWbjSCtr3f8ljIU t9flFaBU5QAh2z2cQgRS37nPekmaGKPFu7iuBrmvlV6Kwa/ddW/ASExCCXrkgCwCgM9/ SH8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="Rj82Cq//"; 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 y6si1300877ejj.113.2019.10.17.05.52.50; Thu, 17 Oct 2019 05:53:13 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b="Rj82Cq//"; 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 S2436742AbfJPTP4 (ORCPT + 99 others); Wed, 16 Oct 2019 15:15:56 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36517 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731321AbfJPTP4 (ORCPT ); Wed, 16 Oct 2019 15:15:56 -0400 Received: by mail-qk1-f196.google.com with SMTP id y189so23876532qkc.3 for ; Wed, 16 Oct 2019 12:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xnrlXCUOxPmSFsn1bWubDV9XvYWU9LUg2fS/Ow1fciQ=; b=Rj82Cq//18jPhF0pi6MNplx4cOskXy0n0aw/eznpjWaGwS63ytn99+9Qc4xLZUjwkP xteAaR03e3Y/bKdUAqk565VMocSxmdG9/0av+ok7OIGnf5A3Cczz/YYi9bBfKHzmioKu 3cmC+XYnr36Banvyh/tOwZ+Eezz9r0ALIIgh+AiTMNT5f2GqrC6bFd1Oy2VMSN7wCBSA M8W8nkkefkd2+IGjepJtjkIMFcylj36eUS2epO+6uhH26fB8nJkxxmn9Y7pu4JnuCnDV BFNSigNojrX6Hh5yTCxBE0EpjLWIbCzABYNSFVn8VMSu5zmusfOmIBwrmODqjjA4Ns+N fUlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xnrlXCUOxPmSFsn1bWubDV9XvYWU9LUg2fS/Ow1fciQ=; b=qrj1dvoMujqt+XJ0BlD3P1cJRyaQMVroNb5Z6o9P4X+8PBECFwjZFQ+XigULI1gjqC 9qsMxNgtVejZyYzcAVKamC8NNIXkK/0Y5DlWvydBuVoNOQA8SpQIhw0lcmADLa6uKdMk CuyRWDBMa/0wONBZith8T7ryEZD4DEDaDs1EefILhWc6EC+SwSHIp7447ZqYTBv+NxMA krYNurHIgonCkQNZyqS4OL12q8ypSSBS8YZCoJt11QT8IfeVnMgl0y7Vq/mVbx/Q9fDn 83ureVxQTpi+Xi682ipFviV0DpSUcfkJWfQKIZ42NkaeFzg/skx8gQz/LQv+M4evdPHw 20Mg== X-Gm-Message-State: APjAAAUXpMXZx077K67IafzXrg4nNS3HO9bzRREDRoZ+OGI4iQvZ0szl hJVGH07HXNWVWskDEHkiTIg= X-Received: by 2002:a37:ac1a:: with SMTP id e26mr42356788qkm.20.1571253354818; Wed, 16 Oct 2019 12:15:54 -0700 (PDT) Received: from rani ([2001:470:1f07:5f3:9e5c:8eff:fe50:ac29]) by smtp.gmail.com with ESMTPSA id z20sm14607110qtu.91.2019.10.16.12.15.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Oct 2019 12:15:54 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Wed, 16 Oct 2019 15:15:52 -0400 To: Lu Baolu Cc: Arvind Sankar , linux-kernel@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH] iommu/vt-d: Return the correct dma mask when we are bypassing the IOMMU Message-ID: <20191016191551.GA2692557@rani> References: <20191008143357.GA599223@rani.riverdale.lan> <85123533-2e9c-af73-3014-782dd6f925cb@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <85123533-2e9c-af73-3014-782dd6f925cb@linux.intel.com> 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 Thu, Oct 10, 2019 at 09:26:37AM +0800, Lu Baolu wrote: > Hi, > > On 10/8/19 10:33 PM, Arvind Sankar wrote: > > We must return a mask covering the full physical RAM when bypassing the > > IOMMU mapping. Also, in iommu_need_mapping, we need to check using > > dma_direct_get_required_mask to ensure that the device's dma_mask can > > cover physical RAM before deciding to bypass IOMMU mapping. > > > > Fixes: 249baa547901 ("dma-mapping: provide a better default ->get_required_mask") > > Reported-by: Arvind Sankar > > Tested-by: Arvind Sankar > > Originally-by: Christoph Hellwig > > Signed-off-by: Christoph Hellwig > > Fixed-by: Arvind Sankar > > Signed-off-by: Arvind Sankar > > This patch looks good to me. > > Reviewed-by: Lu Baolu > Hi Christoph, will you be taking this through your dma-mapping branch? Thanks.