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 9518CC433F5 for ; Tue, 18 Jan 2022 13:56:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.258519.445279 (Exim 4.92) (envelope-from ) id 1n9oxY-0004GU-7t; Tue, 18 Jan 2022 13:55:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 258519.445279; Tue, 18 Jan 2022 13:55:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n9oxY-0004GN-4F; Tue, 18 Jan 2022 13:55:40 +0000 Received: by outflank-mailman (input) for mailman id 258519; Tue, 18 Jan 2022 13:55:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n9oxW-0004GF-HX for xen-devel@lists.xenproject.org; Tue, 18 Jan 2022 13:55:38 +0000 Received: from server.eikelenboom.it (server.eikelenboom.it [91.121.65.215]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4f9e59fb-7866-11ec-a115-11989b9578b4; Tue, 18 Jan 2022 14:55:36 +0100 (CET) Received: from 76-24-144-85.ftth.glasoperator.nl ([85.144.24.76]:46968 helo=[172.16.1.50]) by server.eikelenboom.it with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1n9oyB-00061X-Ff; Tue, 18 Jan 2022 14:56:19 +0100 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: 4f9e59fb-7866-11ec-a115-11989b9578b4 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eikelenboom.it; s=20180706; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1ebZoXdoVWwnn+lE+GWqYbcCfKYPYRMZcdHTANCZtcE=; b=aDojNB1XvrB5LtH+fbAwbe38gk nLiMmg8Gk/s9XREuHuFKWJvsX+qMaGehZb3d9U+bDdxy3sz+f3UDmQ0AlrYCP5d3tl7qH9yhPVWq9 438gqJaRinzgqScFaSPiC2WOsPX95C7Ce+sqqQL+mM4Ya/j7vn+PSlzQj6EH0i+vZbrg=; Subject: Re: Regression booting Linux kernel 5.16.1 under Xen: Failed to update kernel mapping for mfn=6930582 pfn=524288 To: Juergen Gross , "xen-devel@lists.xenproject.org" Cc: Boris Ostrovsky References: <39794058-78ce-994c-c854-cea206ff938e@suse.com> From: Sander Eikelenboom Message-ID: Date: Tue, 18 Jan 2022 14:55:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <39794058-78ce-994c-c854-cea206ff938e@suse.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit On 18/01/2022 12:13, Juergen Gross wrote: > On 18.01.22 11:53, Sander Eikelenboom wrote: >> L.S., >> >> Both Linux kernel 5.16.0 and 5.16.1 fail to boot as Dom0 under >> xen-unstable and crash early in boot on my hardware. >> With Linux 5.15.13 it boots fine. Serial log is below. > > ... > >> (XEN) [0000001b1ffedeb8] Command line: dom0_mem=2048M,max:2048M >> loglvl=all guest_loglvl=all console_timestamps=datems >> vga=gfx-1280x1024x32 no-cpuidle com1=38400,8n1 console=vga,com1 >> ivrs_ioapic[6]=00:14.0 iommu=on,verbose,debug conring_size=128k >> ucode=scan sched=credit2 gnttab_max_frames=64 reboot=a > > ... > >> mapping kernel into physical memory >> about to get started... >> [    0.000000] Linux version 5.16.1-20220118-doflr-mac80211debug+ >> (root@serveerstertje) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils >> for Debian) 2.31.1) #1 SMP PREEMPT Tue Jan 18 10:49:09 CET 2022 >> [    0.000000] Command line: root=/dev/mapper/serveerstertje_ssd-root ro >> verbose earlyprintk=xen mem=2048M console=hvc0 scsi_mod.use_blk_mq=1 >> console=tty0 acpi_enforce_resources=lax max_loop=30 loop_max_part=10 >> r8169.use_dac=1 loglevel=10 nomodeset net.ifnames=0 biosdevname=0 >> xen-pciback.hide=(00:14.2)(04:00.*)(08:00.0)(09:00.*)(0a:00.0)(0d:00.0) > > ... > >> [    0.135670] ------------[ cut here ]------------ >> [    0.135690] Failed to update kernel mapping for mfn=6930582 pfn=524288 >> [    0.135701] WARNING: CPU: 0 PID: 0 at arch/x86/xen/setup.c:312 >> xen_remap_memory+0x191/0x26c > > There seems to be a problem with rearranging the dom0 memory layout > to match that of the host. Especially it is going sideways when trying > to remap a memory frame to PFN 524288 (0x80000). > > You are limiting dom0 memory to 2 GB via Xen command line, but in > addition to that you specify "mem=2048M" for the dom0 kernel, too. This > should cap memory from PFN 0x80000 onwards, hence the failure when dom0 > tries to remap a frame into this area. > > Can you please try removing the "mem=2048M" from the dom0 parameters? > > I think there has been a kernel commit fixing the correct handling of > the "mem=" parameter in 5.16, which might be the reason why you are > seeing the crash only now. > > > Juergen > Ah that sounds plausible, will test tomorrow and report back. Thanks once again ! -- Sander