[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/dt: Skip non-RAM reserved-memory regions in make_memory_node()


  • To: Kuan-Wei Chiu <visitorckw@xxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 9 Nov 2026 08:34:49 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PsfowvyyPcPPxczp+yUm3mw/LEg9/zzxe532S6UERoM=; b=MtPDY2LwIZTpImjmBmnhvX+b5lK7GBxvmAbx1L+svfbBQxJiNMhlEHUACX8Xsrt5X6//fjbYocd+FBEssgO3F/S+tKYSgTOeHW+cdm1adlVCacs6+QVKix7iEHlxILKnbr7fRbWI8i39Hn7tD+9vYGrRrXRskgUZ6YFerG8P62bqg56PwtnGEyFuLYUejpANNE9eCqOdwMgijsJmD0AnBPOS/wkqluDvG3/ScKjUMF+NdJO0J7f2jWnKtFkBzZ8yCt6VqcgiSlK55DB8nlZnJs7txH99boZMB5Qs1p5ylWSLpm7YAeWnolEXk9ivsbPqgKmFmBx4V4nNHCUUYEnDRw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GcaSfFmVu69dmr1r1OQBVEY7ebjl/atZqQ4F7hG7ZzlC2iSTstLDGqoSGjbwNeHav448UwVk0EMEbUWHVNDSM6hJtRacW4KULHzD1MG4yuAIY14UAIjEz48+Bqqt06ZDnrfbNYKJ1x4K37iaOXtQLTtjqCXMrz/MNQw18CC2pIItmrjZYowcuEGx+IoLdRZ4pVzsRPGk7OnhlyzXkxTS1Yx6DA9t9hBVkAftzOmFR8gbA1uhS/hYL93Ztood/SWHj4BAh5rf90njPL7R2a4JYFKFSdctoJXaPUGIDP62kV7nxn5eCovhWIyN8elGHPLxvW5DWnSMvesiaMHphNC2zQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>, <bertrand.marquis@xxxxxxx>, <marscheng@xxxxxxxxxx>, <jserv@xxxxxxxxxxxxxxxx>, <eleanor15x@xxxxxxxxx>
  • Delivery-date: Mon, 09 Nov 2026 07:35:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05-Nov-26 17:48, Kuan-Wei Chiu wrote:
> Hi Michal,
> 
> On Mon, Nov 02, 2026 at 02:02:20PM +0100, Orzel, Michal wrote:
>>
>>
>> On 28-Oct-26 22:17, Kuan-Wei Chiu wrote:
>>> Xen creates a second /memory node for Dom0 from
>>> bootinfo_get_reserved_mem() without checking whether those regions
>>> belong to host RAM. However, /reserved-memory can also describe
>>> on-chip SRAM or firmware regions outside system RAM. Listing them in a
>>> /memory node causes Dom0 to register non-RAM addresses as system RAM,
>>> conflicting with device MMIO mappings.
>> It's worth adding a reference to Linux binding for nvmem-rmem as an example 
>> (the
>> only one so far?) of /reserved-memory describing non RAM. Please also mention
>> Linux comment at early_init_dt_reserve_memory().
> 
> Ack.
> 
>>
>>>
>>> Skip reserved-memory banks outside the host RAM banks reported by
>>> bootinfo_get_mem() in make_memory_node().
>> Have you considered EFI boot? There we don't use /memory and 
>> bootinfo_get_mem()
>> contains usable memory. IOW I think it does not contain reserved memory. In 
>> such
>> scenario, we would skip the reserved regions because they are not described 
>> in
>> memory membank. So it would be a regression in behavior.
>>
> 
> I'm not quite familiar with EFI, so I indeed didn't consider the EFI
> boot scenario in the first place. I think I should skip the
> is_in_host_ram() check when efi_enabled(EFI_BOOT)?'
Yes, please do so.

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.