Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5552794ybp; Tue, 8 Oct 2019 04:53:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuB4/aIPNjw81VLzj581/GxFwv9xrovjurtagDwqq46+VPVUq2iUnFfsZ0OFCHXEvZRE0Z X-Received: by 2002:a50:9a05:: with SMTP id o5mr33730205edb.44.1570535587383; Tue, 08 Oct 2019 04:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570535587; cv=none; d=google.com; s=arc-20160816; b=pCOTLIj5J9VB1OoGvqVnbL2YZkSyXCgrAhrq3t0CnjpZLEz3GeL/9kQlcDet7E+D3S mTLMaF3MNG5RGeI2155Fq60eLeVwaZhgXEAqAFUQiTCnnaOKPitWKwl6EvpEi6eLlCa1 zSlJBUfgSTJALEO9xFDyFFppTN8UGHsZhi3FepiMatFBJVJXTcEaYZ2Rw9OpBG5ucXz6 UVtR7ctp9KVJleT6yulyVIM+fvwsNMVHgPqk2WIxVbGPqoqBAkvr8jtYVphZNZMMb5eP AbTMTfXbVqYMfICePnG8AB+0ehoX2xor9ujHMXbYlL1ziPsJbUBmlq1JIvUISoC6AU0Q hDWg== 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=TP0fuYtSeZDOT7CrZEihsRgw5tOuh/8kOVD2u7lNDTk=; b=lO+KYnW2n7PoHFXfjRd8Ixps95nckw5j4ZBxvwybelJsW8O2BYJ6QQPCVMvg3ikDVa v3W+a7L2k5QxfbK9GoSxndbCB9K0sVl7TQsllDva336vT+8a+qLTMneLfLYZh1VUfPVY BS/W52puZfN39npNEWvsuXHFlarir4bDOul5kjKNpjkw4m8t/qiu81asuTVhzggPkTWQ ceOLQQYPLvYWz0u/j1XgXj5b4WjOyyC6TqjskZuW79XuMy1/5YlB7rfacbwVpvUq+DYf bmwkxtgtJhI4PSOno10BOa5gA39lPy+4w/rt6F2vVeQx91QZ+gvLQLTr77+KQ5Qoc9hV yGSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=n7NbUBcW; 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 f30si11183115ede.435.2019.10.08.04.52.43; Tue, 08 Oct 2019 04:53:07 -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=n7NbUBcW; 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 S1730852AbfJHLvH (ORCPT + 99 others); Tue, 8 Oct 2019 07:51:07 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:33766 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730371AbfJHLvH (ORCPT ); Tue, 8 Oct 2019 07:51:07 -0400 Received: by mail-qt1-f196.google.com with SMTP id r5so24837354qtd.0 for ; Tue, 08 Oct 2019 04:51:06 -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=TP0fuYtSeZDOT7CrZEihsRgw5tOuh/8kOVD2u7lNDTk=; b=n7NbUBcWkVFWs+SNEwxjt2F/wAULZ8WYp6vM1sr8jzMVnzGQBAUaUwdbXY7YB1I/hI 2An88SwgNSk9ss7fOYeCvQ3oGI8JzXhLJyW7yJ+h6F5JIPK5FF+HvDwMwDKxQ40i1/c1 TTuI5D3HAX79cKWrvg14Izzuly3WQLKm29/qyCSPn0iJIw6JuZW28NOdjtz4U9Uws3xP JXMXI3A2XaXqDlWQ0jP+oXJw89H/94k4Shd7DW5lZGw0H7us0ArtCDym0zX5Ejf2X9CZ 62CzjaDm6cv/om+O1A4EUz0/cr+/YOF3xGIcpXKJeUuoXhekEzdYP5vYkVu8tH2Y+t5Y rxrw== 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=TP0fuYtSeZDOT7CrZEihsRgw5tOuh/8kOVD2u7lNDTk=; b=DrRM3bU37cXbPGecUUIpqdQyJZu6soGzdQm7xvuODOKtyzZdD6W9V3ajUxBMCeETL1 IWqwFo+Bztofk8bM6UeFCwHbsMd8biZDmUXEGoMsrJkG8FlRn4eLwT9dxLZQR66Xoh02 uvnQizfAkQ5DKx5jLnBBRXkgVJZS6ngE6zGM8inV5xjC1BOXR6DnvcvDb1d3QEV6Aij/ P5GOhQDfRen5UqgDGmF0JckUo5O+qemdRXK5L5Lfwyk0ZXi7sxgIFIVHZquFJfsyFTXz KDGpJudF57C1SJJEw3YI2+aea3mVRNkYOYiEtnvvY4Veyy9yNwus1y6kuWgW/OOSPdQ/ NIXA== X-Gm-Message-State: APjAAAXeI9fNwr3ZA1AOTFlNRUVFMEi2KJSrPCtjlFYahZG8DVT3s21h iuFU15Gzp0KLtmQmx68O9vdvt+GT3BDCag== X-Received: by 2002:a0c:e90e:: with SMTP id a14mr32637560qvo.184.1570535466036; Tue, 08 Oct 2019 04:51:06 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id x12sm12289720qtb.32.2019.10.08.04.51.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Oct 2019 04:51:05 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 8 Oct 2019 07:51:03 -0400 To: Christoph Hellwig Cc: Arvind Sankar , Christoph Hellwig , linux-kernel@vger.kernel.org Subject: Re: ehci-pci breakage with dma-mapping changes in 5.4-rc2 Message-ID: <20191008115103.GA463127@rani.riverdale.lan> References: <20191007073448.GA882@lst.de> <20191007175430.GA32537@rani.riverdale.lan> <20191007175528.GA21857@lst.de> <20191007175630.GA28861@infradead.org> <20191007175856.GA42018@rani.riverdale.lan> <20191007183206.GA13589@rani.riverdale.lan> <20191007184754.GB31345@lst.de> <20191007221054.GA409402@rani.riverdale.lan> <20191007235401.GA608824@rani.riverdale.lan> <20191008073210.GB9452@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191008073210.GB9452@lst.de> 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 Tue, Oct 08, 2019 at 09:32:10AM +0200, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 07:54:02PM -0400, Arvind Sankar wrote: > > > Do you want me to resend the patch as its own mail, or do you just take > > > it with a Tested-by: from me? If the former, I assume you're ok with me > > > adding your Signed-off-by? > > > > > > Thanks > > > > A question on the original change though -- what happens if a single > > device (or a single IOMMU domain really) does want >4G DMA address > > space? Was that not previously allowed either? > > Your EHCI device actually supports the larger addressing. Without an > IOMMU (or with accidentally enabled passthrough mode as in your report) > that will use bounce buffers for physical address that are too large. > With an iommu we can just remap, and by default those remap addresses > are under 32-bit just to make everyones life easier. > > The dma_get_required_mask function is misnamed unfortunately, what it > really means is the optimal mask, that is one that avoids bounce > buffering or other complications. I understand that my EHCI device, even though it only supports 32-bit adddressing, will be able to DMA into anywhere in physical RAM, whether below 4G or not, via the IOMMU or bounce buffering. What I mean is, do there exist devices (which would necessarily support 64-bit DMA) that want to DMA using bigger than 4Gb buffers. Eg a GPU accelerator card with 16Gb of RAM on-board that wants to map 6Gb for DMA in one go, or 5 accelerator cards that are in one IOMMU domain and want to simultaneously map 1Gb each.