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 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BCECC433EF for ; Fri, 15 Apr 2022 06:37:24 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.305554.520622 (Exim 4.92) (envelope-from ) id 1nfFZv-0000ua-1G; Fri, 15 Apr 2022 06:37:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 305554.520622; Fri, 15 Apr 2022 06:37:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nfFZu-0000uT-UO; Fri, 15 Apr 2022 06:37:10 +0000 Received: by outflank-mailman (input) for mailman id 305554; Fri, 15 Apr 2022 06:37:09 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nfFZt-0000uN-IG for xen-devel@lists.xenproject.org; Fri, 15 Apr 2022 06:37:09 +0000 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 78b53c6c-bc86-11ec-a405-831a346695d4; Fri, 15 Apr 2022 08:37:08 +0200 (CEST) Received: by verein.lst.de (Postfix, from userid 2407) id 8657568B05; Fri, 15 Apr 2022 08:37:05 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 78b53c6c-bc86-11ec-a405-831a346695d4 Date: Fri, 15 Apr 2022 08:37:05 +0200 From: Christoph Hellwig To: Stefano Stabellini Cc: Rahul Singh , xen-devel , Bertrand Marquis , Julien Grall , Jan Beulich , "jgross@suse.com" , "boris.ostrovsky@oracle.com" , hch@lst.de Subject: Re: xen-swiotlb issue when NVMe driver is enabled in Dom0 on ARM Message-ID: <20220415063705.GA24262@lst.de> References: <8C511888-6183-421E-A4C7-B271DAF46696@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Apr 14, 2022 at 01:39:23PM -0700, Stefano Stabellini wrote: > OK, now we know that the code path with Xen is correct and it is the > same code path taken (dma_alloc_direct) as when !CONFIG_XEN and !SMMU. > That is how it should be. > > I cannot explain why dma_alloc_direct() would fail when called from > xen_swiotlb_alloc_coherent(), but it would succeed when called from > dma_alloc_attrs() without Xen. > > I am not aware of any restrictions that xen or swiotlb-xen would > introduce in that regard. Unless you are just running out of memory > because dom0_mem too low. The crash is deep down in the page allocator. Even if memory was low it should no crash. So there is some odd interaction between Xen and the page allocator going on. I think nvme and dma-direct really are only the messenger here.