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

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


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>, "leo.yan@xxxxxxxxxx" <leo.yan@xxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 26 Sep 2023 12:04:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.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
  • 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=N63SmYyPocsClgivlEL65BTZ6TVrPJ+QQhcWCXQc2Qk=; b=lGXSPSy7saNmbAiEFWKXIhGkVeBPJx7aJ+eJEgeSG1kv2jn/uZr1pRR+HiqX+Yxxl8ZsvaugeywZkLOnsYwrdOyMrV5IArj1Q0lP29VZM5+KsYSdwIqeuv8lUpplHobfP10YXlxn2dOSc1y/3Yp/u3hsfXHFRYzLEI32IazB+2v1zH/Lvu4TjiDNObsj8vt/V0bT3LdPbzweVKs0+OOf8De+IOYuloI8chpYkVa11QN9Esk6eDn0JUB4/gWKlDC0SkLusFw18Q3utZdBPbt13AxzVfuq0DHLNJKI7E6VsL6YBOX9kNd2yKnBLmuwj3eWYjlp38vBN7FStryXvdQXYA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b9gZioRJtcoUnM2ar9OsxEMjdxSipzg/x6mm/oCffQJe2cwvNhiBOuDhuXxslWUebG8/GAX1RPvJZ7rz15IQkgChhUv9J6jydnKEj9fZCeMsqmeyFuk3IteGQZ/7cT9F+z9I21SLBgGRgsr9E3LEmI0fd58b+ZrJPJneJiDubElk75uSN/6mmjUqXF664pW4GGmoHP6ffk+R6Nq2yR7P3oPmcOUoEzjUqZhfanCPteOfxUGGf1uJ4/iShcFvruDRFNS+I5MRSfzvpBqPk0laZVkKsyjC2pU5p/uP9fvtwXsali9lZWs6DVQrdkO0uDozxOxNh6zs1bQzvE/bIgZs8A==
  • Cc: 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:05:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

"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®.