All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Fancellu <luca.fancellu@arm.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.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>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [RFC PATCH] xen/design: Add design for EFI dom0less system start
Date: Tue, 7 Sep 2021 12:33:47 +0100	[thread overview]
Message-ID: <1964F880-98C2-45BF-8CED-C34397F61F4C@arm.com> (raw)
In-Reply-To: <1b4eef88-78cb-7201-c326-551261f9e9ad@suse.com>



> On 7 Sep 2021, at 10:24, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 07.09.2021 11:17, Julien Grall wrote:
>> On 07/09/2021 09:33, Jan Beulich wrote:
>>> I'd like to suggest a different scheme, not the least because I expect
>>> the individual domains being independent of e.g. hypervisor command
>>> line options or Dom0 kernel versions. Yet varying sets of these are,
>>> for example, a reason to have multiple sections in the current scheme.
>>> Every dom0less guest would then require spelling out in every such
>>> section. Hence I think we'd be better off having a section per guest:
>>> 
>>> [guest1]
>>> kernel=Image-domu1.bin console=ttyAMA0 root=/dev/ram0 rw
>>> property=cpus=1
>>> property=memory=0xC0000
>>> dtb=domu.dtb
>> 
>> I much prefer the idea of the section. This is going to be easier to 
>> parse the configuration file as we would not have to look for "domuX_" 
>> and then distinguishing X.
>> 
>>> 
>>> These sections would then be referenced by other sections, e.g. by a
>>> new "guests" (or "domus", but this ends up looking a little odd for
>>> its matching of an unrelated latin word) keyword:
>>> 
>>> guests=guest1,guest2
>>> 
>>> If it is deemed necessary to make sure such a section can't be
>>> (mistakenly) used to create Dom0, such sections would need identifying
>>> in some way. Presence of property= (or, as per below, properties=)
>>> could be one means (allowing an empty setting would then be desirable).
>> 
>> I would expect dom0 to be described in the similar fashion at some 
>> point. So maybe we should name the property "domains=...".
> 
> Not sure - the order above doesn't mandate domain IDs, yet Dom0 needs
> creating with ID 0. IOW I was deliberately suggesting "guests=".

Hi Jan, Julien,

Thanks for your feedbacks, really appreciated, I agree with you that sections
are easier to read.
I stand with the “guests=“ or “domus=“ or “domu_guests=“ keywords where
the references to “guest sections” can be listed, separated by commas. 

> 
>>> As to the properties, is there anything wrong with having them all on
>>> one line:
>>> 
>>> [guest1]
>>> kernel=Image-domu1.bin console=ttyAMA0 root=/dev/ram0 rw
>>> dtb=domu.dtb
>>> properties=cpus=1 memory=0xC0000
>> 
>> It depends on the number of properties for the domain, this may become 
>> quickly unreadable.
>> 
>> But... if we use sections, then I think it would be better to have:
>> 
>> kernel=..
>> dtb=...
>> cpu=1
>> memory=0xC0000
>> 
>> This would also allow us to create more complex setup (such as for the 
>> static memory allocation).
> 
> If that's feasible parsing-wise - sure. I was first thinking to suggest
> separate keywords, but then decided there was a reason this wasn't done
> in the original proposal (with respective dom#_ prefixes).

Yes I think it is feasible and easy to read, so given your feedback we can agree on
something like that:

[global]
default=xen

[xen]
options=[xen command line]
kernel=[dom0 kernel file] [domain 0 command line options]
ramdisk=[dom0 ramdisk]
xsm=[xsm filename]
dtb=[xen device tree blob]
domu_guests=guest1,...

[guest1]
address-cells=2
size-cells=2
kernel=[domU kernel file] [domU command line options]
cpus=1
memory=0xC0000
dtb=[domU passthrough dtb]

This won’t break the compatibility because on older version the domu_guests keyword
Is ignored, the user needs just to check that a guest section is not specified as default=
argument because in this case it will be loaded as dom0 kernel (and probably won’t work),
but I think we can just update the documentation to highlight this thing.

Finally this example should load a dom0less system:

[global]
default=xen

[xen]
# Xen boot arguments
options=noreboot console=dtuart dtuart=serial0 bootscrub=0
# Xen device tree
dtb=devtree.dtb
# domus to be started
domu_guests=guest1,guest2

[guest1]
address-cells=2
size-cells=2
kernel=Image-domu1.bin console=ttyAMA0 root=/dev/ram0 rw
cpus=1
memory=0xC0000
dtb=domu.dtb

[guest2]
kernel=Image-domu2.bin console=ttyAMA0 root=/dev/ram0 rw
cpus=2
memory=0x100000
vpl011


> 
> Jan
> 



  reply	other threads:[~2021-09-07 11:34 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 [this message]
2021-09-07  9:35 ` Julien Grall
2021-09-07 11:51   ` Luca Fancellu
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=1964F880-98C2-45BF-8CED-C34397F61F4C@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.