On Fri Apr 25, 2025 at 11:32 PM BST, Daniel P. Smith wrote:
> On 4/24/25 12:10, Alejandro Vallejo wrote:
>> From: "Daniel P. Smith" <dpsm...@apertussolutions.com>
>> 
>> Look for a subnode of type `multiboot,kernel` within a domain node. If
>> found, locate it using the multiboot module helper to generically ensure
>> it lives in the module list. If the bootargs property is present and
>> there was not an MB1 string, then use the command line from the device
>> tree definition.
>> 
>> Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>
>> Signed-off-by: Jason Andryuk <jason.andr...@amd.com>
>> Signed-off-by: Alejandro Vallejo <agarc...@amd.com>
>> ---
>> v5:
>>    * Add domain name to the error path on no-kernel.
>> ---
>>   xen/arch/x86/setup.c            |  1 +
>>   xen/common/domain-builder/fdt.c | 64 +++++++++++++++++++++++++++++++--
>>   2 files changed, 62 insertions(+), 3 deletions(-)
>> 
>> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
>> index bd13d9d196..7e756302ae 100644
>> --- a/xen/arch/x86/setup.c
>> +++ b/xen/arch/x86/setup.c
>> @@ -1290,6 +1290,7 @@ void asmlinkage __init noreturn __start_xen(void)
>>           i = first_boot_module_index(bi, BOOTMOD_UNKNOWN);
>>           bi->mods[i].type = BOOTMOD_KERNEL;
>>           bi->domains[0].kernel = &bi->mods[i];
>> +        bi->nr_domains = 1;
>>           bi->hyperlaunch_enabled = false;
>>       }
>>   
>> diff --git a/xen/common/domain-builder/fdt.c 
>> b/xen/common/domain-builder/fdt.c
>> index 11f0436e85..662c715483 100644
>> --- a/xen/common/domain-builder/fdt.c
>> +++ b/xen/common/domain-builder/fdt.c
>> @@ -99,9 +99,9 @@ static int __init fdt_prop_as_reg(const struct 
>> fdt_property *prop,
>>    * @return              -EINVAL on malformed nodes, otherwise
>>    *                      index inside `bi->mods`
>>    */
>> -int __init fdt_read_multiboot_module(const void *fdt, int node,
>> -                                     int address_cells, int size_cells,
>> -                                     struct boot_info *bi)
>> +static int __init fdt_read_multiboot_module(const void *fdt, int node,
>> +                                            int address_cells, int 
>> size_cells,
>> +                                            struct boot_info *bi)
>
> Shouldn't this belong to when the function was introduced? Though 
> looking there, you push it out into the header? Guess the real question 
> is it static or not?

It's to ensure MISRA compliance on the previous commit. See:

  
https://lore.kernel.org/xen-devel/173f7129e82958a9737627129ac3c...@bugseng.com/

Cheers,
Alejandro

Reply via email to