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

Re: [PATCH v6 2/2] arm/efi: load dom0 modules from DT using UEFI


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 13 Oct 2021 08:25:45 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bFTbnsRyJEJZmCKxS7q1WoWNblkm/H5Qc3AIUBrn/NA=; b=iBijJkh/Jr2CAU/cxGWKbo3gyPgjR38ZlCYI47gojnlWv191Xg1TclZvB0Bdo8o1HKmLVIuzERTQqRHYsHOeXYx/9QjEh69y8WSXJsc5ZN4aYm7Ml+1q+4q8DSBro2X6IbRYG8pI5OkjxduGWZF4j8YOYFcn1zh1SH3qV5d791VPJUW/roSPfuR6YO4SCb2jv8wKNHwlje6YMzYrhy3rPPMYgckA7pxtq2fOuY3Lh3U7/C60iQaP9Xrn8NdPO7t4kbDdclKPJUqYMyewlMp3vgKn0bEfODbBzJ0SyUNqD8dpCkm+bS9I1PaGMbxEbvb+bMCW5UGJncO5GDTPlb88Yw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N6217I+/QyWdOI70kZGwiUo13I9omTOkXEoGeJKZZrVsNNnZUcHsmQxP1+OVl0UjMLHHHfho2d9jtCa7AKwSetDEwjdNkqn7scOp9yOPLAVFCJAekcGQZ+dlRmUuHNssbySZhXjE9PSgrAzm909Z0dp+dMKr0j3sL5JKC2cZF5XWBzgmuiE06GT43cJNFJ1lPuI1MamMUplrOWmuN/qX8y9bOj9zTRuSfsPjeXzH9kf/DpT2KrbbiRyBJl7B/JpJjvFTXDNXzcoVB0IpMLy/7xuYD6N0fBT8QHG8gfxsAHAHTaVrzGfsprhNpto6X8/msCNfgWGuFXp+wUHbaMG+Sw==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Bertrand Marquis <bertrand.marquis@xxxxxxx>, wei.chen@xxxxxxx, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 13 Oct 2021 06:25:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.10.2021 02:49, Stefano Stabellini wrote:
> On Tue, 12 Oct 2021, Luca Fancellu wrote:
>>> On 12 Oct 2021, at 02:31, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>>>
>>> On Mon, 11 Oct 2021, Julien Grall wrote:
>>>> Hi Stefano,
>>>>
>>>> On 11/10/2021 22:24, Stefano Stabellini wrote:
>>>>>> diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
>>>>>> index 840728d6c0..076b827bdd 100644
>>>>>> --- a/xen/arch/arm/efi/efi-boot.h
>>>>>> +++ b/xen/arch/arm/efi/efi-boot.h
>>>>>> @@ -713,10 +713,12 @@ static int __init 
>>>>>> handle_module_node(EFI_FILE_HANDLE
>>>>>> dir_handle,
>>>>>>      char mod_string[24]; /* Placeholder for module@ + a 64-bit number +
>>>>>> \0 */
>>>>>>      int uefi_name_len, file_idx, module_compat;
>>>>>>      module_name *file;
>>>>>> +    const char *compat_string = is_domu_module ? "multiboot,module" :
>>>>>> +                                "xen,multiboot-module";
>>>>>>        /* Check if the node is a multiboot,module otherwise return */
>>>>>>      module_compat = fdt_node_check_compatible(fdt, module_node_offset,
>>>>>> -                                              "multiboot,module");
>>>>>> +                                              compat_string);
>>>>>>      if ( module_compat < 0 )
>>>>>>          /* Error while checking the compatible string */
>>>>>>          return ERROR_CHECK_MODULE_COMPAT;
>>>>>
>>>>>
>>>>> Well... not exactly like this because this would stop a normal
>>>>> "multiboot,module" dom0 kernel from being recognized.
>>>>>
>>>>> So we need for domU: only "multiboot,module"
>>>>> For Dom0, either "multiboot,module" or "xen,multiboot-module"
>>>>
>>>> Looking at the history, xen,multiboot-module has been considered as a 
>>>> legacy
>>>> binding since before UEFI was introduced. In fact, without this series, I
>>>> believe, there is limited reasons for the compatible to be present in the 
>>>> DT
>>>> as you would either use grub (which use the new compatible) or xen.cfg (the
>>>> stub will create the node).
>>>>
>>>> So I would argue that this compatible should not be used in combination 
>>>> with
>>>> UEFI and therefore we should not handle it. This would make the code 
>>>> simpler
>>>> :).
>>>
>>
>> Hi Stefano,
>>
>>> What you suggested is a viable option, however ImageBuilder is still
>>> using the "xen,multiboot-module" format somehow today (no idea why) and
>>> we have the following written in docs/misc/arm/device-tree/booting.txt:
>>>
>>>     Xen 4.4 supported a different set of legacy compatible strings
>>>     which remain supported such that systems supporting both 4.4
>>>     and later can use a single DTB.
>>>
>>>     - "xen,multiboot-module" equivalent to "multiboot,module"
>>>     - "xen,linux-zimage"     equivalent to "multiboot,kernel"
>>>     - "xen,linux-initrd"     equivalent to "multiboot,ramdisk"
>>>
>>>     For compatibility with Xen 4.4 the more specific "xen,linux-*"
>>>     names are non-optional and must be included.
>>>
>>> My preference is to avoid breaking compatibility (even with UEFI
>>> booting). The way I suggested above is one way to do it.
>>>
>>> But I don't feel strongly about this at all, I am fine with ignoring
>>> "xen,multiboot-module" in the EFI stub. I can get ImageBuilder fixed
>>> very quickly (I should do that in any case). If we are going to ignore
>>> "xen,multiboot-module" then we probably want to update the text in
>>> docs/misc/arm/device-tree/booting.txt also.
>>
>> The changes to support legacy compatible strings can be done but it will 
>> result in
>> complex code, I would go for Julien suggestion to just drop it for UEFI.
>>
>> I can add a note on docs/misc/arm/device-tree/booting.txt saying that for 
>> UEFI boot
>> the legacy strings are not supported.
>>
>> Something like:
>>
>> --- a/docs/misc/arm/device-tree/booting.txt
>> +++ b/docs/misc/arm/device-tree/booting.txt
>> @@ -51,6 +51,8 @@ Each node contains the following properties:
>>         Xen 4.4 supported a different set of legacy compatible strings
>>         which remain supported such that systems supporting both 4.4
>>         and later can use a single DTB.
>> +       However when booting Xen using UEFI and Device Tree, the legacy 
>> compatible
>> +       strings are not supported.
>>  
>>         - "xen,multiboot-module" equivalent to "multiboot,module"
>>         - "xen,linux-zimage"     equivalent to "multiboot,kernel”
>>
>>
>> What do you think about that?
> 
> Also reading Julien's reply, I am fine with a doc-only change in a
> separate patch.
> 
> Yes, something along those lines is OK.
> 
> So for this patch:
> 
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

Then applicable parts
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

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