[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: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 16 Sep 2021 08:50:02 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=k1gPeTyjFrHTLA41PiPhhSGUR96qFSIoFFCjAFprlOA=; b=AKEpB8H7NcVq8Q4gNT8DrWQqnktufhD+YZUcbV+52MwR63yPdpj0+QYDx/dTjPDaNwNU0s/zhILGaz5I3pGIRknHq46KwHW39kJpEeA9UDJjKdWBNTVgDRYKpvH/hFD9C11SlC9GcGnJ30uqqX764Rz7phkRpNoKrwPFtCVHi5WmJv3LfB016iql0bgVgzlMXCY1WJj/0XtHUNTvhiExqP7eD/S9kYa8EPWcncSANP6K1nyMOYX1/yT/mZNsAf017OcakxfT8KFAp6gfkjji3UmfNH3neY6SRsRDHBRuroYzH1MfeCR5fGxpo0yVfjhbryEF8KFRgptKxKMPmcM52Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kRwsCDYZlLclh/ceRD/3oLIRE9PKJr9OZrmeE4ic4FONLtiVeRwMDIAlolLYV8DT4UUwwMT5g8vu4Vmyor9UGBs7OOgcj6dBxF/i9ajYdXMMbDPKy8nwWJpXyluYeSRdM57KLIzeiH4+gf79pL2wEbk+ZWo2euXZEuuFzjnqpuaA5kzrulj0bNoLsAFQkk/f0LS7WVQOIziHYLO1aeP2aD4M1l19svMy0bPD1WNCTAjFdURbSxmpIJ9BpOkc2UHB4xH+oN/qm2nBpZP6/clyWdyt+3Pzw8J5oNXLVIWwgu+rjznEWY2a7AMy+tiagImA5n79bcGPsV4Mi9P2IH0diQ==
- Authentication-results: epam.com; dkim=none (message not signed) header.d=none;epam.com; dmarc=none action=none header.from=suse.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, 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 06:50:17 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
>> @@ -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_...()).
Jan
|