On 18/12/2025 08:44, Oleksandr Tyshchenko wrote:
> 
> 
> On 18.12.25 02:05, Stefano Stabellini wrote:
> 
> Hello Stefano
> 
>> On Wed, 17 Dec 2025, Oleksandr Tyshchenko wrote:
>>> Creating a dom0less guest with a high vCPU count (e.g., >32) fails
>>> because the fixed 4KiB device tree buffer (DOMU_DTB_SIZE) overflows
>>> during creation.
>>>
>>> The FDT nodes for each vCPU are the primary consumer of space,
>>> and the previous fixed-size buffer was insufficient.
>>>
>>> This patch replaces the fixed size with a formula that calculates
>>> the required buffer size based on a fixed baseline plus a scalable
>>> portion for each potential vCPU up to the MAX_VIRT_CPUS limit.
>>>
>>> Please note, the change to DOMU_DTB_SIZE formula would result in
>>> a smaller buffer size of 3072 bytes compared to the original 4096 bytes
>>> on Arm32 platforms where MAX_VIRT_CPUS is 8.
>>
>> I am OK with this patch I would only ask to retain the minimum size of
>> 4KB due to the possible presence of passthrough device nodes.
> 
> I think there might be cases when even 4KB would not be enough to cover 
> the whole dtb with passthrough device nodes. But the existing code 
> should already handle that, so if a partial device tree is provided, 
> then it will be accounted separately:
> 
>       /* Account for domU passthrough DT size */
>       if ( kinfo->dtb )
>           fdt_size += kinfo->dtb->size;
I agree with Oleksandr:
Acked-by: Michal Orzel <[email protected]>

~Michal


Reply via email to