[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Luca Fancellu <luca.fancellu@xxxxxxx>
- Date: Thu, 16 Sep 2021 12:15:18 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=p9PCvFEzWeUMI44mSEn15pFntTzThpq9UYi4y4WWXWY=; b=Dv72jQgQZFc3wpRl26D3VfhCx2ywR11tJz7077nAQSOg/XShWK3ef6J9I8sXErkHZ2OlV539+Q7XP+YTGNDB7VpBhoPLjHXDxT9dKyd0puBlDpeXm78hRbJL5HI3waoKrdkwivytLKcsDKFmz4MRmeuoUeZh9H0soRt3poNnhM0ZclfNmaekkG96IlRojHwk2vVv8PiqUl1f0Cy+syz5XsjhO4T11wkW3QJv7WXgaaqDu6Qu5pM8dJCcv9ADCay73yFbTst0aV5cQWxSrNMSr21nfdWgiHQbhEHU6u7npeESSismzR9SE03eBZWVR0Dr8jxqu1ujUqC2XysIe62r7g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=deBNPJu4aItrLgDgRDcWU3GaMaCHQ/TkoLN5nVXtI5VeKKL35vpJOaGSohvy8uUgLP2wR9Tvp5WnBWfFOESswJibkbMgejg1tp4vZCiUPLtazP3yzN6VmmJQJfg3zVkEeDP3o3kYgM8lSpPgeKrZ/5TLwN6XHrSwAVQl8I8h6mmTnUI1qVtuOclrx05Emw2CVioOnQxK7g00nxjdlm2LLWI/tHFoHNCXQS5P8iJKdSQFnx1OMSY1VpDc9jXi14CWF2zEWJd9flsyDnwhxGMbOhKMwsXv2IxjlLAjx0qzkNPgDXTAAdkP10FGv9r9N57j1G/uigZQmHDptpy1g5d1Kg==
- Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Bertrand Marquis <bertrand.marquis@xxxxxxx>, wei.chen@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Thu, 16 Sep 2021 11:15:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
> On 16 Sep 2021, at 07:50, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 16.09.2021 03:16, Stefano Stabellini wrote:
>> On Wed, 15 Sep 2021, Luca Fancellu wrote:
>>> +static void __init handle_dom0less_domain_node(EFI_FILE_HANDLE dir_handle,
>>> + int domain_node,
>>> + int addr_cells,
>>> + int size_cells)
>>> +{
>>> + /*
>>> + * Check for nodes compatible with
>>> multiboot,{kernel,ramdisk,device-tree}
>>> + * inside this node
>>> + */
>>> + for ( int module_node = fdt_first_subnode(fdt, domain_node);
>>
>> int module_node;
>>
>> for ( module_node = fdt_first_subnode(fdt, domain_node);
>
> Not just here iirc from briefly looking over the patch as a whole
> yesterday: Use of plain "int" would better be limited to cases where
> values may also be negative. I don't suppose that's possible here as
> well as in a number of other cases.
Hi Jan,
fdt_first_subnode(…) can return -FDT_ERR_NOTFOUND.
>
>>> @@ -1285,14 +1286,21 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE
>>> *SystemTable)
>>> efi_bs->FreePool(name.w);
>>> }
>>>
>>> - if ( !name.s )
>>> - blexit(L"No Dom0 kernel image specified.");
>>> -
>>> efi_arch_cfg_file_early(loaded_image, dir_handle, section.s);
>>>
>>> - option_str = split_string(name.s);
>>> +#ifdef CONFIG_ARM
>>> + /* dom0less feature is supported only on ARM */
>>> + dom0less_found = check_dom0less_efi_boot(dir_handle);
>>> +#endif
>>
>> Rather than an #ifdef here you can simply implement
>> check_dom0less_efi_boot on x86 as a static inline returning always
>> false.
>
> Indeed, and the properly named (efi_arch_...()).
Ok, I was unsure if a solution like that was going to be accepted, I will
update the code then.
Cheers,
Luca
>
> Jan
>
|