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

Re: [RFC PATCH] arm: dom0: allow static memory configuration


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Grygorii Strashko <gragst.linux@xxxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Thu, 13 Feb 2025 14:44:46 +0200
  • 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=PiG66uH0/z/6vqrr9eh80FHBTCFe9vyffTGTu5hp834=; b=ry7XuQC9qJ2YL/9vyv6g8jqAxSYpEHB6xSP7NU/dN8UDExGqvQ6RSSaqONlYRkAaTDQo8KJp0pHp+TD/IbIxoCe0tzwvXqljPy2j7YVyA2YiVCY5XVTyZnX1e0tK7dmptof+LeDT9efNdfVnCNSyKPuqwk613uSW0TNyJqYPt/a84DF+nER/SOIJtiN3Al3DBRAhrs87sXKzzYWkrmmhy5jTnO0PLK+sbfWX7iyE4U/gPLvoIuyCRR8443sBC2iJHtZaIf0nEaAvNOUE25nO3+GyEhTSeex2NBNkLFBGktNJrCvn3wNt6xHp67VnP/CsNrxHmTe4MBs0FJYgjHZKfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TfkwLe36EGHRf8GzP9tpAJLsN6TBzEK2XXtugYoeLSPn+/PtGclija1CgagHBjD34NoIS8erZmEXAnIArDXCcaxnjfE74rUoM3dDUwEKl7rJ7kMWycOrSm1V+IqOilYhUgrdX/4IPFICO49XUEv05aj0hCN92QEZmZjNQyFEALwvdM9aT1kQh6XrvG/r6+1PIt89N64eIOD3uYXci+uKdGpl5YwLhiuLpZ+4W1PoHWirkl59zZt+W+Bu6pQG5jfl5Dmo2fIsZuZ8gM9Drs8QeXB2GbqIOUU67qqlJ1NxNdZThLG5nTWBsSHtXIvVNdVCcKp3w6mXjCFgZ4VD3FYuJg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Jason.Andryuk@xxxxxxx
  • Delivery-date: Thu, 13 Feb 2025 12:45:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Stefano,

On 13.02.25 00:11, Stefano Stabellini wrote:
On Wed, 12 Feb 2025, Grygorii Strashko wrote:
The Arm Xen allocates memory to place Dom0 following the logic described in
allocate_memory_11() function which is a bit complicated with major
requirement to place Dom0 within the first 128MB of RAM and below 4G. But
this doesn't guarantee it will be placed at the same physical base address
even between two boots with different configuration (changing the Kernel
image size or Initrd size may cause Dom0 base address to change).

In case of "thin Dom0" use case, when Dom0 implemented with RTOS like
Zephyr, which doesn't use dynamic device-tree parsing, such behavior
causes a lot of inconvenience as it is required to perform modification and
recompiling of Zephyr image to adjust memory layout.

It also prevents from using Initrd with Zephyr, for example, as it's
expected to be placed at known, fixed address in memory.

This RFC patch introduces the possibility to place Dom0 at fixed physical
base address, by checking if "chosen" node contains property
"xen,static-mem" and places Dom0 exactly at the specified memory chunk.

The implementation follows the same approach as for the static, direct-mapped
guest domain in case of dom0less boot.

Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

I fully support this idea and the addition of static memory support to
Dom0. However, I would suggest a different approach regarding the device
tree binding. Specifically, I would prefer to avoid introducing
additional top-level properties for Dom0 under /chosen.

That's was major point declaring it RFC.


Instead, we should create a domain node for Dom0 under /chosen, like we
do for other DomUs. Jason is currently working on adding a capability
properties to the Dom0less domain nodes, allowing us to specify whether
a domain is the hardware domain, the control domain, or both
(effectively making it Dom0). Once this is in place, we can use
static-mem for Dom0 in the same way as always.

Good to here that, I assume it can wait (a bit) then.

But please note that our requirement here to allow static memory for both 
dom0less and
non-dom0less boot, so here is the question - will bindings and 
dom0/hwdom/control
domain setup be generic?

Honestly, for ARM, the discrepancies between boot modes and Xen DT definitions
(and actually toolstack) are very confusing :( And now there is also
hyperlaunch on the horizon :(

[...]

BR,
-grygorii



 


Rackspace

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