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

Re: [RFC PATCH] xen/design: Add design for EFI dom0less system start

  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <luca.fancellu@xxxxxxx>
  • Date: Tue, 7 Sep 2021 12:51:16 +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=YXbgVi4E/l2ZD/q5CGFs38xQTqeIroaeLOOfdmS8cYs=; b=HNwMuNHGBr4f2073O/9E13JP+WrZwJgKCHrkjKlETechZbtL+obddVK04Scn8L/bCYcYUah6w0zXUXZtB8PlDHaXJ3B0RyaMMBmHKGNTQoagtxZEwW1rhDboqaakSVZW82Z1vVs0K1jyj0OtffJmHAeMVipSynGjr/5RMbH2+KQ0jCDDKtHaPmmj6HbYpm6nohjswyM5R2QLNTc7Zc1xfSlO+i863XUhChMM7EkkeLfZbfK+hLR/0eMj0WNYUQuGqSqbs4TaPNeP1W6C1ojNr0s+iGikPi0QOyKGJFi7TPG73RAnZNqW9n73Q7aHLGYaS7cuwmmuCB3NF6dbxdPKzw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CEtMWMnpKSDwS1L7TybOURvfYta4G4YJGWTL8GuCXdsaZaCMfj8l39w8bKGVmbfGybAy/y4h1qKK875ion+qsFOddbmcV/VghnW6YWSCaeENWE0jWhM5GZEhmChK6q2M1Q9Ls36d2UNICb5M3bHMhYaZtrRqmlaGHx5DPqrJXDDznhdJ6Qis03fYzDM00CwbdsXHucukIle6vogzxnsRQ1GWv7SDDVb3kvtr/yrS9Af4TdxMHxWfTCAs8oRRiRACpMYb/4+aZ7tValP3itIm3CHbqVVGb3lo0pIbONos8OO3z3TWgXWHhczCKQTewHUswsquhhzadhawbdJQD3Aipw==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: 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>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 07 Sep 2021 11:51:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;

> On 7 Sep 2021, at 10:35, Julien Grall <julien@xxxxxxx> wrote:
> Hi Luca,
> On 07/09/2021 07:52, Luca Fancellu wrote:
>> Add a design describing a proposal to improve the EFI
>> configuration file, adding keywords to describe domU
>> guests and allowing to start a dom0less system.
>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> ---
>>  docs/designs/efi-arm-dom0less.md | 105 +++++++++++++++++++++++++++++++
>>  1 file changed, 105 insertions(+)
>>  create mode 100644 docs/designs/efi-arm-dom0less.md
>> diff --git a/docs/designs/efi-arm-dom0less.md 
>> b/docs/designs/efi-arm-dom0less.md
>> new file mode 100644
>> index 0000000000..8d8fa2243f
>> --- /dev/null
>> +++ b/docs/designs/efi-arm-dom0less.md
>> @@ -0,0 +1,105 @@
>> +# Xen EFI configuration file
>> +
>> +The current configuration file used by Xen when it is started as an EFI
>> +application is considering only the dom0 guest and doesn't have any
>> +property to describe and load in memory domU guests.
> From my understanding, the problem is less about properties (we already have 
> them in the Device-Tree) but more about where are the binaries located in 
> memory as we don't know in advance.

Hi Julien,

I think I used the wrong word there, I meant “keyword” instead of “property” 
because I was referring about the
lack of keywords to describe a domu guest in the Xen EFI configuration file.

I agree with you that on systems with static allocation, the kernel and ramdisk 
binaries must be at certain locations
that are out of control when we use the EFI boot services, the thing we can do 
is provide a keyword to specify the
addresses and then use the CopyMem() function to relocate the kernel/ramdisk in 
the address we want.

> So I would like to propose something that build on top of the Device-Tree 
> work we did. Note this is early thoughts.
> The problematic nodes in the DT are:
>        module@0x4a000000 {
>            compatible = "multiboot,kernel", "multiboot,module";
>            reg = <0x0 0x4a000000 0xffffff>;
>            bootargs = "console=ttyAMA0 init=/bin/sh";
>        };
>        module@0x4b000000 {
>            compatible = "multiboot,ramdisk", "multiboot,module";
>            reg = <0x0 0x4b000000 0xffffff>;
>        };
> In particular the property "reg" cannot be known in advance because the UEFI 
> stub will be responsible to load the binaries in memory.

Yes that’s true, the UEFI stub is using from the UEFI boot service the 
AllocatePages function that is giving back an address out of our control,
then using another function the binary is read from the disk and copied at that 
address, finally the UEFI stub is writing the node in the device tree that
will be used by Xen later.

> What we could do is providing a list of binaries to load and associate a key 
> for each of them. Something like:
> binary=<binary> <key>
> binary=<binary2> <key2>
> ....
> We can then replace the property "reg" with a new property "uefi,key" that 
> will contain the name of the binary.
> What do you think?

Here I’m lost, because I don’t understand what we are going to do with the name 
of the binary.



> Cheers,
> -- 
> Julien Grall



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