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 692F5ECAAD1 for ; Thu, 1 Sep 2022 13:58:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.396652.636877 (Exim 4.92) (envelope-from ) id 1oTkiF-0001Pq-EP; Thu, 01 Sep 2022 13:58:31 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 396652.636877; Thu, 01 Sep 2022 13:58:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oTkiF-0001Pj-Bj; Thu, 01 Sep 2022 13:58:31 +0000 Received: by outflank-mailman (input) for mailman id 396652; Thu, 01 Sep 2022 13:58:30 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oTkiE-0001Pd-UK for xen-devel@lists.xenproject.org; Thu, 01 Sep 2022 13:58:30 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oTkiE-0004vJ-JT; Thu, 01 Sep 2022 13:58:30 +0000 Received: from 54-240-197-233.amazon.com ([54.240.197.233] helo=[192.168.12.167]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oTkiE-0004NQ-DC; Thu, 01 Sep 2022 13:58:30 +0000 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" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=Ykf3sbryLkFxHO/PnqXCNaoUDr3Li6kShYu7MCj51I0=; b=4cixfn14Qak0LdfC+M203swzqt loyt3kAGdvdg8ZyPWI/jkkZ1Hb0Jc2F35O2JDWDfKbbOtCiCKdSK1qGo+0My6B2j0t5r9MtVjCpDf gcu8MK7yoL1BDMlzvGCruRFpyBApXGkHLNTMKCA4UTPlo8Nh+2HgS+wvGgmGoueBf5Bg=; Message-ID: Date: Thu, 1 Sep 2022 14:58:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 2/2] xen/arm: Handle reserved heap pages in boot and heap allocator Content-Language: en-US To: Stefano Stabellini , Henry Wang Cc: xen-devel@lists.xenproject.org, Bertrand Marquis , Wei Chen , Volodymyr Babchuk References: <20220824073127.16762-1-Henry.Wang@arm.com> <20220824073127.16762-3-Henry.Wang@arm.com> From: Julien Grall In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 30/08/2022 02:04, Stefano Stabellini wrote: >> size_t estimate_efi_size(unsigned int mem_nr_banks); >> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c >> index 500307edc0..fe76cf6325 100644 >> --- a/xen/arch/arm/setup.c >> +++ b/xen/arch/arm/setup.c >> @@ -73,6 +73,8 @@ integer_param("xenheap_megabytes", opt_xenheap_megabytes); >> >> domid_t __read_mostly max_init_domid; >> >> +bool __read_mostly reserved_heap; >> + >> static __used void init_done(void) >> { >> /* Must be done past setting system_state. */ >> @@ -699,8 +701,10 @@ static void __init populate_boot_allocator(void) >> #ifdef CONFIG_ARM_32 >> static void __init setup_mm(void) >> { >> - paddr_t ram_start, ram_end, ram_size, e; >> - unsigned long ram_pages; >> + paddr_t ram_start, ram_end, ram_size, e, bank_start, bank_end, bank_size; >> + paddr_t reserved_heap_start = ~0, reserved_heap_end = 0, > > INVALID_PADDR or ~0ULL I would strongly prefer the former. It is more difficult to understand what's the value means in the latter. Cheers, -- Julien Grall