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

Re: [PATCH V2] xen/dom0less: Calculate guest DTB size based on MAX_VIRT_CPUS


  • To: Harry Ramsey <harry.ramsey@xxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Wed, 17 Dec 2025 07:58:57 +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=nX4L2P3jIUXxSRfdYJdUZJvzjzci3G1HfuFHUZitt84=; b=GvocWx5d8w2LQFakhsmn6QjA7sKOIuT+ewZ+01aGCAIHcibG56BmbLUusMkL5ilxkxdcNUHEGoy2peJhHovDYNTEHOBmTZhokg80yzlyRCA5uS++N9k9z22jJjAMkGjYSmrHll7V/7xPP4NalekHFJsB+e8EdgcXCR4TixBADhh6AgZFqAhIyt8sN3BXiFNVzGpsXxlWKVu9qql/r+Tunzec6aRO2MbuZw/fPXwsgjQE6CmNAGS2S5am3KNm969NlU8ed71t7aiS6K8KxyBD7Ihxpdf2LASpUjSxT1wfeK0tNjrcfI1j1Byu2OJ1HRdwaFCAqjwxy2kMDLa17Y8lpg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eSegkBbDeBjRXbSx1uYSK5MxqAAgWTZSLqcup6wv13KlRaJR0avPf3oPgsSDTnCZ/7kEavr6Q7T+ZwphPJp6QFWXH/hrI49zp3LexryCcfqXfDBCPXYERScVaWnRG0pnfa0qP52aq3N2wE8/QEQmgRW3+bC/6/CmcWf+/gcn/F05h5Vpjy3pDbjju6z9/bzBYp8igzYj55DWYBXpmcCHtjxABDIysatSso3T835PaAcSnofgcJj/sBoT6cJxQXiWI5W5XrPrKaBDFTjzWT3kl+9+ohnQixWlIyoQbyEzbgK8nSMFaN0aGXcp2rwE/pbwRyOrRknUbXq6IneypEQedA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Julien Grall <julien@xxxxxxx>, Luca Fancellu <Luca.Fancellu@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Wed, 17 Dec 2025 07:59:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcZIbKZWHMCLfhnk2g+3dibmJCCbUQaX2AgAAU4YCAAKzmgIAAUfkAgBLzMQCAARx8AA==
  • Thread-topic: [PATCH V2] xen/dom0less: Calculate guest DTB size based on MAX_VIRT_CPUS


On 16.12.25 17:00, Harry Ramsey wrote:

Hello Harry

> [You don't often get email from harry.ramsey@xxxxxxx. Learn why this is 
> important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> On 04/12/2025 13:37, Oleksandr Tyshchenko wrote:
>> Thank you very much for offering to test this on Arm32 platforms.
>>
>> The primary goal of the test is to confirm that the new, calculated DTB
>> buffer size of 3072 bytes is sufficient for a worst-case Arm32 dom0less
>> guest. The expected result is that Xen boots successfully, and the
>> regular dom0less guest is created without any panics.
>>
>> The ideal test configuration would be a dom0less guest with the
>> following configuration:
>> - The vCPU count set to the maximum for Arm32, which is 8, the vCPU
>> nodes should ideally contain "clock-frequency" property.
>> - Any other features that add nodes to the guest device tree enabled
>> (e.g., hypervisor, reserved-memory, pl011 nodes are present, etc), to
>> create the largest possible "base" FDT size.
>>
>> The test would involve applying the current patch, and the diff below:
>>
>> diff --git a/xen/common/device-tree/dom0less-build.c
>> b/xen/common/device-tree/dom0less-build.c
>> index 38a5830813..e95f42d1e1 100644
>> --- a/xen/common/device-tree/dom0less-build.c
>> +++ b/xen/common/device-tree/dom0less-build.c
>> @@ -577,6 +577,9 @@ static int __init prepare_dtb_domU(struct domain *d,
>> struct kernel_info *kinfo)
>>        if ( ret < 0 )
>>            goto err;
>>
>> +    printk("Final compacted FDT size is: %d bytes\n",
>> fdt_totalsize(kinfo->fdt));
>> +    printk("Predefined FDT size is: %d bytes\n", DOMU_DTB_SIZE);
>> +
>>        return 0;
>>
>>      err:
>>
>>
>> Please let me know what you get. Thanks again.
> 
> I have tested this and can confirm it boots into Linux with an 8-core
> setup. Here are the values I got:
> (XEN) Final compacted FDT size is: 1127 bytes
> (XEN) Predefined FDT size is: 3072 bytes
> 
> Tested-by: Harry Ramsey <harry.ramsey@xxxxxxx>

Thank you very much for testing on the Arm32 platform and confirming 
that the proposed size is sufficient!


> 
> Thanks,
> Harry Ramsey

 


Rackspace

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