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

Re: [Xen-devel] [PATCH v3] xen: Allow a default compiled-in command line using Kconfig



Hi Jan,

On 03/07/2017 02:52 PM, Jan Beulich wrote:
On 07.03.17 at 15:41, <julien.grall@xxxxxxx> wrote:
Hi Jan,

On 03/07/2017 02:18 PM, Jan Beulich wrote:
On 07.03.17 at 14:48, <julien.grall@xxxxxxx> wrote:
On 03/07/2017 12:52 PM, Jan Beulich wrote:
On 07.03.17 at 12:21, <blackskygg@xxxxxxxxx> wrote:
2017-03-07 17:36 GMT+08:00 Jan Beulich <JBeulich@xxxxxxxx>:
On 07.03.17 at 09:34, <blackskygg@xxxxxxxxx> wrote:
+static inline char* __init extract_dom0_options(char *cmdline)
+{
+    char *kextra;
+
+    if ( (kextra = strstr(cmdline, " -- ")) != NULL )
+    {
+        *kextra = '\0';
+        kextra += 3;
+        while ( kextra[1] == ' ' ) kextra++;

The body of the while() wants to go on its own line.

And then - why is this Dom0 option handling done only on x86?


As you might have noticed, there isn't any code dealing with the dom0
options
in arch/arm/setup.c, and the arm version of construct_dom0() doesn't take
any
command line options as its parameter,
so I have the reason to believe that this feature is not available
under the arm architecture.

Looks like an omission to me - Julien, Stefano?

DOM0 and Xen command line are passed separately through either Device
Tree or for UEFI xen configuration file (see -cfg=...).

So I am not sure to understand what would be the benefits to handle DOM0
parameters after -- on Xen command line.

So you have no case of a boot loader which allows you to type in
extra options on just a single line? On x86 the feature had originally
been added because old grub didn't have a separate line for Dom0
options in its graphical menu. Nowadays the functionality is handy
namely when starting xen.efi from the EFI shell (where again you
obviously only have a single command line), but quite likely this may
also be of use with grub's chain loading model (which I simply don't
use very often, so I'm not finally sure on that one).

My knowledge is quite limited on boot process for x86. How do you pass
the kernel/initrd/xsm blob on UEFI? Can you do it from the command line
or are you using the -cfg=... and specify it in a file?

Only the latter.

On ARM we have two way to boot Xen:
        - Using UEFI bootloader with either Device-Tree or ACPI
        - Using non-UEFI bootloader with Device-Tree only

In the case of UEFI bootloader, we are using the xen configuration file
to describe the modules (e.g kernel, initramfs, XSM) and the both xen
and DOM0 command line.

For non-UEFI bootloader, we have designed the boot protocol based on the
device-tree and will allows you to specify both xen and DOM0 and all the
modules (see [1]). The bootloader needs to be able to modify the
device-tree (such via a shell like on U-boot) or the user needs to
modify the device-tree before hand.

All fine, but this doesn't tell me what interactive change options a
user has _after_ having set up the config file (or alike), while the
system is booting.

Here some concrete examples. The major bootloaders on ARM today are:
        * UEFI
        * U-boot
        * GRUB

I will leave UEFI aside as people will usually chainload to GRUB and then boot whatever they want.

In both GRUB and U-boot a user will be able to modify the command line from the bootloader shell.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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