All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Fancellu <luca.fancellu@arm.com>
To: Julien Grall <julien@xen.org>
Cc: xen-devel@lists.xenproject.org,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	wei.chen@arm.com, Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Ian Jackson <iwj@xenproject.org>, Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [RFC PATCH] xen/design: Add design for EFI dom0less system start
Date: Tue, 7 Sep 2021 12:51:16 +0100	[thread overview]
Message-ID: <7BD59287-75ED-4D4F-B892-F6B04583A986@arm.com> (raw)
In-Reply-To: <4bab7902-0268-5705-5462-fcd7571d7492@xen.org>



> On 7 Sep 2021, at 10:35, Julien Grall <julien@xen.org> 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@arm.com>
>> ---
>>  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,

Luca

> 
> Cheers,
> 
> -- 
> Julien Grall



  reply	other threads:[~2021-09-07 11:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  6:52 [RFC PATCH] xen/design: Add design for EFI dom0less system start Luca Fancellu
2021-09-07  8:33 ` Jan Beulich
2021-09-07  9:17   ` Julien Grall
2021-09-07  9:24     ` Jan Beulich
2021-09-07 11:33       ` Luca Fancellu
2021-09-07  9:35 ` Julien Grall
2021-09-07 11:51   ` Luca Fancellu [this message]
2021-09-07 11:55     ` Jan Beulich
2021-09-07 12:30     ` Julien Grall
2021-09-07 13:30       ` Luca Fancellu
2021-09-07 14:18         ` Julien Grall
2021-09-07 14:59           ` Luca Fancellu
2021-09-08  1:09       ` Stefano Stabellini
2021-09-08  6:50         ` Luca Fancellu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7BD59287-75ED-4D4F-B892-F6B04583A986@arm.com \
    --to=luca.fancellu@arm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wei.chen@arm.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.