Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1173703pxb; Thu, 28 Jan 2021 09:37:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJybIy4dvZR/J4A06O076tISs1FVsWw7/c27qoinfVpnZFK/l4OxS6OEeveHffdF4sKLy6QU X-Received: by 2002:a17:906:278b:: with SMTP id j11mr511068ejc.438.1611855478796; Thu, 28 Jan 2021 09:37:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611855478; cv=none; d=google.com; s=arc-20160816; b=fYHx/j4nAPeBLxAIkUoJxgopWUxokV+8nW8x1aimxkdwOnbt2pkXMOliwzx7JzQxnq lw1bdqewmrdqNnyNQRqOhBW6yrCpj1urTO/HwTwQyEASs8iCMp7xWnrLUB5XXcrp51qZ /wyehp1q3gbW747igAkVYUYJut5sIU56ji1TbCyBgj9k/GNsB7FiSgKcbUBElYsB1Gcw ycQ6uVtOuIlWKjyEAlKHyDtYnyO+EtEgqwdKP0cEVX58za4x/gSunMDt6ORRxEq3m2tK ChEl76rkMHSxp7T8HKU4IJispfPwI+97pBMlqTUohbp9gZS0xsAh/rEnH07likyKvBn4 5CAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=6QQMzaeZrXs6lEbh2kAJUTRZf8N55SShp1lpz8QozXQ=; b=bsP1nclBIx7QkgI+Rl9WnaeENJEstJvJ6XTBJ4Jx/8q7VFOaBKYPc2n/Ed1zpT4xCL JQTzWBzVUwzwPumWlVyVN9OMIWD6312B8Pm0j/USOPm6M3K4I4u78ZdAFLEt9DHNpJAD 93a/sp7VhlyTrgAds1IK2tRsdvhjNvhMAISXBtH69vwZK6bm2FdB1x47ynjWr55qmD2d oiLC9A/02K7rX3tpQFep2HuuHKIS1iw/3/3kcs4UvW5Utr4idhN6fOv0i2zi/yqY03br gUYCRIreFAh5WbrVnUygtDQEef21lS2Z4EmeY8CydUoFJbDvGHvXsr9+4VROPiNAgotA SMWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QXEDB2oB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si3000932eje.652.2021.01.28.09.37.33; Thu, 28 Jan 2021 09:37:58 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QXEDB2oB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233179AbhA1Rg3 (ORCPT + 99 others); Thu, 28 Jan 2021 12:36:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:56406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233053AbhA1Rfk (ORCPT ); Thu, 28 Jan 2021 12:35:40 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 91CA964D9A; Thu, 28 Jan 2021 17:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611855297; bh=TkMt06C39KAtu27x1DMMhjzHHmvklcYVEo9Dtplc7bE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QXEDB2oB667WqtQ3FaoY5JbM3br+ouLPdfGippereJ3bazR3YvSFM3/yMYFpa5s9m I3SLgnoW2gL6Jbrl0kvEocY30o4L6ccfLwVjicpke430MgCinys1z1Y8ZjlkpNLhpE g1awn+IWlMu9bBOvr2kGhOYvZPJdtnAxTl/ElWA1Kkxp2dBivL/yinx1thffOp56BA c09mNreubOtXTYEMkNE4RDILxeC7fCCmKi/l/KLiP9RLTZJYJtMrr+UWxsfX8dlkoE 8oS+ZuDaIDSNTtp+vAovpleEwM5FNHZlLbeagoI4a8EUOCNol4DfH7U9m4l+ZR9e07 FxoB6QhkZCDiw== Date: Fri, 29 Jan 2021 02:34:51 +0900 From: Keith Busch To: Konrad Rzeszutek Wilk Cc: Jianxiong Gao , erdemaktas@google.com, marcorr@google.com, hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com, gregkh@linuxfoundation.org, saravanak@google.com, heikki.krogerus@linux.intel.com, rafael.j.wysocki@intel.com, andriy.shevchenko@linux.intel.com, dan.j.williams@intel.com, bgolaszewski@baylibre.com, jroedel@suse.de, iommu@lists.linux-foundation.org, axboe@fb.com, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] Add swiotlb offset preserving mapping when dma_dma_parameters->page_offset_mask is non zero. Message-ID: <20210128173451.GA31631@redsun51.ssa.fujisawa.hgst.com> References: <20210128003829.1892018-1-jxgao@google.com> <20210128003829.1892018-3-jxgao@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 12:15:28PM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 27, 2021 at 04:38:28PM -0800, Jianxiong Gao wrote: > > For devices that need to preserve address offset on mapping through > > swiotlb, this patch adds offset preserving based on page_offset_mask > > and keeps the offset if the mask is non zero. This is needed for > > device drivers like NVMe. > > > > Didn't you send this patch like a month ago and someone pointed > out that the right fix would be in the NVMe driver? > > Is there an issue with fixing the NVMe driver? You got it backwards. The initial "fix" used a flag specific to the nvme driver, and it was pointed out that it should just be the generic behaviour.