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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_RED,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 ADC92C433ED for ; Mon, 10 May 2021 08:41:05 +0000 (UTC) Received: from smtp3.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 1B41261456 for ; Mon, 10 May 2021 08:41:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B41261456 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 smtp3.osuosl.org (Postfix) with ESMTP id BDC4460703; Mon, 10 May 2021 08:41:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XjOuR0CCGlGM; Mon, 10 May 2021 08:41:04 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTP id BE78C60602; Mon, 10 May 2021 08:41:03 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 97A1FC000D; Mon, 10 May 2021 08:41:03 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8DDB2C0001 for ; Mon, 10 May 2021 08:41:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6EBEA83B7C for ; Mon, 10 May 2021 08:41:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QLC4b_-Wl4y9 for ; Mon, 10 May 2021 08:41:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8EB1B83AE8 for ; Mon, 10 May 2021 08:41:01 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 4D61467373; Mon, 10 May 2021 10:40:57 +0200 (CEST) Date: Mon, 10 May 2021 10:40:57 +0200 From: Christoph Hellwig To: Julien Grall Subject: Re: Regression when booting 5.15 as dom0 on arm64 (WAS: Re: [linux-linus test] 161829: regressions - FAIL) Message-ID: <20210510084057.GA933@lst.de> References: <4ea1e89f-a7a0-7664-470c-b3cf773a1031@xen.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4ea1e89f-a7a0-7664-470c-b3cf773a1031@xen.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: f.fainelli@gmail.com, Konrad Rzeszutek Wilk , osstest service owner , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Stefano Stabellini , "xen-devel@lists.xenproject.org" , Boris Ostrovsky , 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 Sat, May 08, 2021 at 12:32:37AM +0100, Julien Grall wrote: > The pointer dereferenced seems to suggest that the swiotlb hasn't been > allocated. From what I can tell, this may be because swiotlb_force is set > to SWIOTLB_NO_FORCE, we will still enable the swiotlb when running on top > of Xen. > > I am not entirely sure what would be the correct fix. Any opinions? Can you try something like the patch below (not even compile tested, but the intent should be obvious? diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 16a2b2b1c54d..7671bc153fb1 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -44,6 +44,8 @@ #include #include +#include + /* * We need to be able to catch inadvertent references to memstart_addr * that occur (potentially in generic code) before arm64_memblock_init() @@ -482,7 +484,7 @@ void __init mem_init(void) if (swiotlb_force == SWIOTLB_FORCE || max_pfn > PFN_DOWN(arm64_dma_phys_limit)) swiotlb_init(1); - else + else if (!IS_ENABLED(CONFIG_XEN) || !xen_swiotlb_detect()) swiotlb_force = SWIOTLB_NO_FORCE; set_max_mapnr(max_pfn - PHYS_PFN_OFFSET); _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu