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

Re: [PATCH] xen/arm: Skip memory nodes if not enabled


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Tue, 26 Sep 2023 10:10:57 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=N2b9+yGDfHE3sm9F3YWdNFtMqdATr1Ow/7EUVdL+ELg=; b=dTOxpsZNRBl+JuRNviLl1TqPzGKvRoIuyRW9uKUf77RMInrpPoQkoRYTJ+8XuBRYdtOxgzzHSyuE66nOX2xSywdMTdrz2K0R8Z52e8ZuQsYHbicFRQkw4zxRB/c7r0bQ6gjVNeK3s6UX2c1lMltyipIDuoBBgz62U4XFR7ZJMEJuUMPSBiVmd3t1r7LOktrAvMMXzXcgaXy4gxLjNa4jSwa+dITUL6dI11A67ifIGXlHVpIGesOqfoeJU+ALrG+MXA5J8WrW6hiGunU/n/ft0wl2EM9+PuDdRxgnxl9+lFAFLqlZXoxzj56DGyL6Y1gzgnlN2i4hz4GU1RoiUDb2VQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ME2QolRVyhO3YrCe5n1U0qUOTJXfeuBeMCAqknYplpDYCrHrkd1WswCU1HiWmwNcyE4IzR7di56QqrSFnEFPvUzLgq7qlKfJMFxvfLeyOThO5sHPLyC6rbs0XvIZEDwdhhdvZw+V/kzT/ftnran4o/ODlMV0HpcpH2SP2LWfskfhG3rGMOjUkXrWt2NFplOSMoyKCEUawI9a1bIoxWjBk+k616fnjeTYYGBZpQAs7WJ63/rN9nOrmyxB+mLljHPfG/xEezZU/H3s3SYvrpHohysoZDHCRMVJf/uqfOYBoaqAhco+IcutYqunPAFJ2DL79ixnYUtEURAGtU0No28PuQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "leo.yan@xxxxxxxxxx" <leo.yan@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 26 Sep 2023 10:11:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZ8DsUAeh4H14sIUq1QR77iDXfDrAs3c8AgAADhQCAAAGkAA==
  • Thread-topic: [PATCH] xen/arm: Skip memory nodes if not enabled


> On 26 Sep 2023, at 11:04, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> Hi Luca,
> 
> On 26/09/2023 11:52, Luca Fancellu wrote:
>> 
>> 
>>> On 26 Sep 2023, at 06:33, Leo Yan <leo.yan@xxxxxxxxxx> wrote:
>>> 
>>> During the Linux kernel booting, an error is reported by the Xen
>>> hypervisor:
>>> 
>>> (XEN) arch/arm/p2m.c:2202: d0v0: Failing to acquire the MFN 0x1a02dc
>>> 
>>> The kernel attempts to use an invalid memory frame number, which can be
>>> converted to: 0x1a02dc << PAGE_SHIFT, resulting in 0x1_a02d_c000.
>>> 
>>> The invalid memory frame falls into a reserved memory node, which is
>>> defined in the device tree as below:
>>> 
>>> reserved-memory {
>>>         #address-cells = <0x02>;
>>>         #size-cells = <0x02>;
>>>         ranges;
>>> 
>>> ...
>>> 
>>>         ethosn_reserved {
>>>                 compatible = "shared-dma-pool";
>>>                 reg = <0x01 0xa0000000 0x00 0x20000000>;
>>>                 status = "disabled";
>>>                 no-map;
>>>         };
>>> 
>>> ...
>>> };
>>> 
>>> Xen excludes all reserved memory regions from the frame management
>>> through the dt_unreserved_regions() function. On the other hand, the
>>> reserved memory nodes are passed to the Linux kernel. However, the Linux
>>> kernel ignores the 'ethosn_reserved' node since its status is
>>> "disabled". This leads to the Linux kernel to allocate pages from the
>>> reserved memory range.
>> 
>> I might be wrong, but reading the specifications seems that “status” is not 
>> a property
>> of the child nodes of /reserved-memory, so I’m not sure Xen should do 
>> something about it.
> Please take a look at dt documentation (v0.4) for /memory and 
> /reserved-memory.
> Under the tables listing possible properties, there is a statement:
> Note: All other standard properties (Section 2.3) are allowed but are 
> optional.

Thanks for pointing that out, I missed that bit.

> 
> "status" is part of standard properties so it is perfectly fine for /memory 
> or /reserved-memory
> nodes to have it defined.
> 
> ~Michal


 


Rackspace

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