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

Re: [PATCH v2] xen/dom0less: arm: fix hwdom 1:1 low memory allocation


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Wed, 6 Aug 2025 17:02:40 +0300
  • 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=4Cdc0ktzQDdml5RqPtUhljE8PHrMsUFhA40Dp6jIjMI=; b=uSl1HblQrC+b/2mzGRjRzhKhET0kL31Ol603wXQgzBTQVJkUDzG+PbCPg7ySYvTFQf2Nj3BT5Ca3G7shwl3GoyedZpopQFnfBa0cssfPwCBHFWmQiQUp/bhjvLVjHLZC1ZChRYy6rYVA5zEjUbl8V8r8UaGJ04Oi/WjzCisvl/BmB1gWr1mlHSJk6iWHK87jcmfkn8Bzn1F2yvE7r7xT/y05xJUaT3NLn9KHggvndTpW7euyW/+pM8voDLoX+rirRFgmnCZBO32+0bOavPLnMDhh6dEUw5b2FHjW7GZcrdIC7ZWrs3JYknKymLiKezTRk8dhjx8TKJzO3lqjSdTAGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cusBqae8MRPsBRvn/hDzt4mG59LG592ur4YtODfnR04yq8ubCV+b/S1128GWbwrZr/J45LZs31pLhbDqKkLicjBWFn6gBs4u892MwJgF6s9v4G3RKpBja0oQN8eMClICmVpCaUVZY8ZIc9LWmoriefvmDIE/t16cm+CFthCKrJdx0NU4DZxfwTTukTkyAv8VFmuBhtAuoZqIfbBHuT9DXm6+wxYKmRZnwcPaFF7hZdHGJCgaD9QjE/eAi9ik6HBYNFg8CCq4IsGeZSKfZ3dTFIC7dO8jjqGH+ZE2fc5caP5PqJGeISeIAAFcsDVbA7i5tZpO7cUXrNomi5h+gsKbOw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Denis Mukhin <dmukhin@xxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Wed, 06 Aug 2025 14:02:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 06.08.25 11:48, Julien Grall wrote:
Hi Grygorii,

On 06/08/2025 09:19, Grygorii Strashko wrote:
Hi Julien,

On 06.08.25 00:07, Julien Grall wrote:
Hi Grygorii,

On 05/08/2025 20:00, Grygorii Strashko wrote:
From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>

Call stack for dom0less hwdom case (1:1) memory:
create_domUs
|-construct_domU
   |-construct_hwdom()
     |-allocate_memory_11()

And allocate_memory_11() uses "dom0_mem" as:
min_low_order =
   get_order_from_bytes(min_t(paddr_t, dom0_mem, MB(128)));

In case of dom0less boot the "dom0_mem" is not used and defaulted to 0,

 From docs/mics/xen-command-linux.pandoc:

---

### dom0_mem (ARM)
 > `= <size>`

Set the amount of memory for the initial domain (dom0). It must be
greater than zero. This parameter is required.

---

If dom0_mem is effectively optional, then shouldn't the doc be updated?

No. I think doc is correct because when regular Dom0(hwdom)(initial domain)
is created code goes through regular Dom0 path and "dom0_mem" is accounted for.

I understand this is used when dom0 is not described in the device tree.
The crucial part in your sentence is "when", to me this indicates a condition. Whereas 
the current wording in xen-command-linux is using "required" with no condition. So a 
reader can rightfully think the parameter is also used in dom0less and have to be specified.

So I think the wording needs to be tweaked to something like "This parameter is 
required (and only used) when the initial domain is not described in the 
Device-Tree."

Got it.


Although, "required" might still be too strict because it looks like we would 
provide a configuration for dom0_mem if it is not set.

Correct - it will be defaulted to MB(512) if not configured + log notification 
"PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW\n"

Thank you.

--
Best regards,
-grygorii




 


Rackspace

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