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

Re: [PATCH V2] xen/arm: Initialize acpi_disabled to true during declaration


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 25 Mar 2025 16:54:10 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • 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=wG8UckL0gHwhuH44rb5YCdCnMwuueWPNkaDZBreM5lE=; b=er/hktCx2tG1QdCJfXpdpff8Z11EOakKyh1ucSkAPgLYaXKOXftIQudosEvu0PR5A+bz4pXrfRR9D3rAwvRr0vflp+rOsdL4ePKF6pK/zI4HBFiDIfQMdId5llzoE2YYsTvC8AmM1epHBE0IedgYXliLJlr6dfOIzYOhpQMr2TAa0JqkSwRQx6w8i8bQXgkdclRJ+vZMUBCmvTQro8NMy+5d+kFqSr8jUo9GwGJS3Z4nH/KQP9f8vHNMJ61rnYs2IY2uZrJ353b1IsXQ67togsKyPM0pOmWQmPNhXW003/e6JY/x2UeLYDjOhTHgklwBmbm/1MrAjvd0L79QjieV/A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g5p84DGApjTGkeA5Ml0tnwKQB34th77zECFFylgRILCRitsJWDOnoa7m+QmyPlPKhb+KBog/vg4UepLybnzCpXP73kOZ5AFbtZJt+kv5wIlpxxNzB2Pzu77El6iQhbvO+2+1+E4l5Pdk6Lz4GE1Fz29g/SMldIzCzUYkvT7Ke2sZl0deFlE3DUk7LVpHhl5JtP8sRUyl5HWUS3KPo7e9mBsHgo9mAjMrJaizE2rbTYwbaKjv1Gr2RMmorTXDVFYs0u2ldYuhAdYahTsDrJO2utzrHaaEWTUPwrYZBBSNL5xkgxKt27WdG0xir3fZwt/v1d6W6aO2kdWO2m5Xa/MIgQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Orzel, Michal" <michal.orzel@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 25 Mar 2025 16:54:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHbnZfMrs+h0o/uEkuTNWO41qxIcLOD+IUAgAADaoCAAAM8AIAABQEAgAABHgCAAAyVAA==
  • Thread-topic: [PATCH V2] xen/arm: Initialize acpi_disabled to true during declaration


On 25.03.25 18:09, Julien Grall wrote:


> Hi Oleksandr,

Hello Julien

> 
> On 25/03/2025 16:05, Oleksandr Tyshchenko wrote:
>>>>> Furthermore, what happen if we decide to use ACPI afterwards? Wouldn't
>>>>> this mean that the static regions would be reserved even if ACPI 
>>>>> doesn't
>>>>> use static memory (all the memory is expected to be given to the
>>>>> allocator)?
>>>> I don't think such hybrid configuration is valid (booting with ACPI yet
>>>> declaring reserved regions in DT). See commit:
>>>> 9c2bc0f24b2ba7082df408b3c33ec9a86bf20cf0
>>>
>>> I don't think the commit is preventing hybrid configuration. It is just
>>> saying that the region (which could be a static region because this is
>>> not supported) will be unreserved.
>>>
>>> IOW, when booting with Device-Tree you may be able to use static memory.
>>> But if you were booting with ACPI, static memory is not supported and
>>> therefore the regions should be free for other purpose.
>>
>>
>> Julien, I see your points, but the current patch does not attempt to
>> make static (reserved) memory properly work on ACPI-based system (if it
>> is available there), current patch tries to solve the real issue on
>> device-tree-based system with Xen compiled with CONFIG_ACPI=y (at least
>> unintentionally). 
> 
> I am not asking to make ACPI work with static memory. I am asking to not 
> break ACPI if the Device-Tree is specifying static memory region.
> 
>> However, I wonder, why it has not been noticed so far.
> 
> ACPI is not a supported feature and gated by UNSUPPORTED. So the 
> implication is you have enabled UNSUPPORTED and anything can happen 
> really ;).

Indeed, this answers the question.


> 
>>
>> It took some time to understand why just enabling CONFIG_STATIC_MEMORY=y
>> triggered a BUG in common code. And it turned out that it was
>> CONFIG_ACPI=y in my Xen's .config that caused that consequence (I
>> specially wrote so long description to provide full context).
> 
> As I wrote above, the only thing I am asking is that memory for static 
> regions should be unreserved when ACPI is enabled like it is already the 
> case today.

So the concern is that not reserving provided by the device tree static 
memory region is going to be a potential waste of the memory on the real 
ACPI system? Or I missed something?

I see two options with unreserving the static memory regions on the real 
ACPI system. I assume, that we should unreserve only after we definitely 
know that we are running with ACPI (i.e. after acpi_boot_table_init() 
completes and acpi_disabled reflects the real state of things), right?

1. either call acpi_boot_table_init() before setup_mm() in Arm64's 
start_xen().
2. or go through reserved_mem->nr_banks and unreserve everything marked 
with MEMBANK_STATIC_DOMAIN after acpi_boot_table_init() completes

What do you think?

Unfortunately, I do not have such environment in hand (ACPI-based 
(dom0less?) system but still providing device-tree with static memory) 
for the real testing.

> 
> Cheers,
> 

 


Rackspace

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