From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9FF9606A320 for ; Mon, 30 Nov 2026 08:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Sif3BrDk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=XxaryUW3fBPILuU+pQTUrHgbY+WYwuKNwllfb0A5NdQ=; b=Sif3BrDkQuhmqnB2MRp9eb9ywa nQ007DogDRSUv5P4sKyVf6ZoPOFhe/elBKzOfGaxIit489rPRYwuQkx6sEP9jzHTC4P3JYKz11rpb c/NhZ3Xv4/YgaMngVGqJEFOIgUbq+QXN2euOyF4Gm6X8aULFWOakW7IZUioLB/NVHjmyDzDkz5ltb aU8/FiCZWEe0Z5LBHn8we0XAwmjvIsQ46grMx8FXHQ3eEG425qcCAEvJVLonofw+kNN7J54T9gqKB XMXAPe6m1Q/VZTNeZ6dUXu6hHO13OoXwYNpLZJU/9y+k0B3QEO5cvh/1WVSZ7c7umlZpdQ131xwDl 9m/AcrvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXx8m-00000003qZA-2S3F; Mon, 30 Nov 2026 08:53:40 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXx8h-00000003qYN-2i50 for linux-nvme@lists.infradead.org; Mon, 30 Nov 2026 08:53:37 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 58D0768BEB; Mon, 30 Nov 2026 09:53:32 +0100 (CET) Date: Mon, 30 Nov 2026 09:53:32 +0100 From: Christoph Hellwig To: Bean Huo Cc: Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, Bean Huo , Gaurav Sinha Subject: Re: [PATCH] nvme-pci: add NVME_QUIRK_APST_BUF_512 for Micron 2100AI/AT Message-ID: <20261130085332.GA11589@lst.de> References: <20261127133538.3032289-1-beanhuo@iokpp.de> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261127133538.3032289-1-beanhuo@iokpp.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_005335_833697_82E5DBC8 X-CRM114-Status: GOOD ( 19.93 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" X-Spam-Status: No, score=-10.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, Nov 27, 2026 at 02:35:38PM +0100, Bean Huo wrote: > From: Bean Huo > > The APST table is 256 bytes and nvme_configure_apst() allocates exactly > that much, so the table can be the last 256 bytes of a page. > > The Micron 2100AI/AT (PCI 1344:6001) reads the data for this command > in one 512 byte unit. When the table ends a page, the read reaches into > the next page, and with an IOMMU enabled this can be reported as a > fault. The command itself still completes. > > Add NVME_QUIRK_APST_BUF_512 for this device. With the quirk, allocate > and map 512 zeroed bytes. kmalloc aligns a power-of-two size to that > size, so the buffer never crosses a page. PRPs carry no length, so the > command is unchanged. > > The table format and the APST policy do not change. While here, use > the product name in the comment of this PCI entry. Meh. Why does everyone fuck up their devices so much? I guess we have to live with this, so: Reviewed-by: Christoph Hellwig >