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,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 D6661C433ED for ; Mon, 10 May 2021 08:41:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 510E360FE7 for ; Mon, 10 May 2021 08:41:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 510E360FE7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.124952.235246 (Exim 4.92) (envelope-from ) id 1lg1TK-0008LP-4X; Mon, 10 May 2021 08:41:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 124952.235246; Mon, 10 May 2021 08:41:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lg1TK-0008LI-17; Mon, 10 May 2021 08:41:02 +0000 Received: by outflank-mailman (input) for mailman id 124952; Mon, 10 May 2021 08:41:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lg1TI-0008L0-Nu for xen-devel@lists.xenproject.org; Mon, 10 May 2021 08:41:00 +0000 Received: from verein.lst.de (unknown [213.95.11.211]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e3cecc12-879e-4590-b63c-63de5ed460ab; Mon, 10 May 2021 08:40:59 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 4D61467373; Mon, 10 May 2021 10:40:57 +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: e3cecc12-879e-4590-b63c-63de5ed460ab Date: Mon, 10 May 2021 10:40:57 +0200 From: Christoph Hellwig To: Julien Grall Cc: f.fainelli@gmail.com, Stefano Stabellini , "xen-devel@lists.xenproject.org" , linux-kernel@vger.kernel.org, osstest service owner , hch@lst.de, Konrad Rzeszutek Wilk , Boris Ostrovsky , iommu@lists.linux-foundation.org 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ea1e89f-a7a0-7664-470c-b3cf773a1031@xen.org> User-Agent: Mutt/1.5.17 (2007-11-01) 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);