From nobody Tue Nov 11 07:09:28 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1568726573; cv=none; d=zoho.com; s=zohoarc; b=JANKUiWgmlfHrOGTYirvhZaKmwn9KtFw1CurKbL6V9UxSW8ztqqZEGUPnGkMDo2o8uokBkqymTH6g62E5c5LWWek6reuQxUJRhT/HE97JRGHRYN06qo4OhvIkB05Wld4MrzcbRzhiFFVwX6iemwCMWEu8sCuZkniVGcXN/+Bb8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568726573; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=5vJzLeSJV2oVvOnK2w3GBX5mDcHZz95zB9SVVHf2F04=; b=HB67JpO7kFWgeGEeYISwT4BELDzHhm/+u3OYscuhIU07YLl1cvN3tXfNhBV2dBijQqwAiiDz3Ie0isIIwVR7hyxUVKL16v4UQuNTR5E+QUfGqzeBBF39FfRLes11A+07l1JslhhtXukp+qj6r0LS1ETRxfhDjDNkdPphZPy+DPY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1568726573805313.6192888165466; Tue, 17 Sep 2019 06:22:53 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iADQD-0000bJ-6a; Tue, 17 Sep 2019 13:21:33 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iADQB-0000b5-VW for xen-devel@lists.xenproject.org; Tue, 17 Sep 2019 13:21:32 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 0fc00e6e-d94e-11e9-960c-12813bfff9fa; Tue, 17 Sep 2019 13:21:30 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6513228; Tue, 17 Sep 2019 06:21:30 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B24233F575; Tue, 17 Sep 2019 06:21:29 -0700 (PDT) X-Inumbo-ID: 0fc00e6e-d94e-11e9-960c-12813bfff9fa From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 17 Sep 2019 14:21:25 +0100 Message-Id: <20190917132125.13033-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH] xen/arm32: setup: Give a xenheap page to the boot allocator X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" After commit 6e3e771203 "xen/arm: setup: Relocate the Device-Tree later on in the boot", the boot allocator will not receive any xenheap page (i.e. mapped page) on Arm32. However, the boot allocator implicitely rely on having the first page already mapped and therefore result to break boot on Arm32. The easiest way for now is to give a xenheap page to the boot allocator. We may want to rethink the interface in the future. Fixes: 6e3e771203 ('xen/arm: setup: Relocate the Device-Tree later on in th= e boot') Signed-off-by: Julien Grall Reviewed-by: Jan Beulich --- xen/arch/arm/setup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index ebbfad94e4..e6ddefb5cf 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -593,6 +593,7 @@ static void __init setup_mm(void) unsigned long heap_pages, xenheap_pages, domheap_pages; int i; const uint32_t ctr =3D READ_CP32(CTR); + mfn_t boot_mfn_start, boot_mfn_end; =20 if ( !bootinfo.mem.nr_banks ) panic("No memory bank\n"); @@ -665,6 +666,11 @@ static void __init setup_mm(void) =20 setup_xenheap_mappings((e >> PAGE_SHIFT) - xenheap_pages, xenheap_page= s); =20 + /* We need a single mapped page for populating bootmem_region_list. */ + boot_mfn_start =3D mfn_add(xenheap_mfn_end, -1); + boot_mfn_end =3D xenheap_mfn_end; + init_boot_pages(mfn_to_maddr(boot_mfn_start), mfn_to_maddr(boot_mfn_en= d)); + /* Add non-xenheap memory */ for ( i =3D 0; i < bootinfo.mem.nr_banks; i++ ) { @@ -710,7 +716,7 @@ static void __init setup_mm(void) =20 /* Add xenheap memory that was not already added to the boot allocator= . */ init_xenheap_pages(mfn_to_maddr(xenheap_mfn_start), - mfn_to_maddr(xenheap_mfn_end)); + mfn_to_maddr(boot_mfn_end)); } #else /* CONFIG_ARM_64 */ static void __init setup_mm(void) --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel