From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81DFBC2D0E4 for ; Tue, 24 Nov 2020 11:49:17 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF7C02075A for ; Tue, 24 Nov 2020 11:49:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF7C02075A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1E397214EB; Tue, 24 Nov 2020 11:49:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OMZnWDyPw9ox; Tue, 24 Nov 2020 11:49:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 9053E204E3; Tue, 24 Nov 2020 11:49:14 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5F0F0C163C; Tue, 24 Nov 2020 11:49:14 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5C538C0052 for ; Tue, 24 Nov 2020 11:49:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4A76785218 for ; Tue, 24 Nov 2020 11:49:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id utgVqWlsJ1yZ for ; Tue, 24 Nov 2020 11:49:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by fraxinus.osuosl.org (Postfix) with ESMTPS id F32C885198 for ; Tue, 24 Nov 2020 11:49:11 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id E3A5F6736F; Tue, 24 Nov 2020 12:49:06 +0100 (CET) Date: Tue, 24 Nov 2020 12:49:06 +0100 From: Christoph Hellwig To: Jianxiong Gao Subject: Re: [PATCH] [PATCH] Adding offset keeping option when mapping data via SWIOTLB. Message-ID: <20201124114906.GA22619@lst.de> References: <20201123221807.3344263-1-jxgao@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201123221807.3344263-1-jxgao@google.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: sagi@grimberg.me, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, axboe@fb.com, iommu@lists.linux-foundation.org, David Rientjes , kbusch@kernel.org, robin.murphy@arm.com, hch@lst.de X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Mon, Nov 23, 2020 at 02:18:07PM -0800, Jianxiong Gao wrote: > NVMe driver and other applications may depend on the data offset > to operate correctly. Currently when unaligned data is mapped via > SWIOTLB, the data is mapped as slab aligned with the SWIOTLB. When > booting with --swiotlb=force option and using NVMe as interface, > running mkfs.xfs on Rhel fails because of the unalignment issue. > This patch adds an option to make sure the mapped data preserves > its offset of the orginal addrss. Tested on latest kernel that > this patch fixes the issue. > > Signed-off-by: Jianxiong Gao > Acked-by: David Rientjes I think we actually need to do this by default. There are plenty of other hardware designs that rely on dma mapping not adding offsets that did not exist, e.g. ahci and various RDMA NICs. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu