arm64,xen: add xen_boot support into grup-mkconfig
v3 cover arm64,xen: add xen_boot support into grup-mkconfig
From: Fu Wei <[email protected]>
This patchset add xen_boot support into grup-mkconfig for generating xen boot entrances automatically
Also update the docs/grub.texi for new xen_boot commands.
This patchset has been tested on Foudation model with a bug fix:
http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html
ChangeLog:
v3: reorder the patches
update the introduction of xen_module commands in docs/grub.texi
v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html
add "--nounzip" option support in xen_module
use "feature_xen_boot" instead of "grub_xen_boot" update the introduction of xen boot commands in docs/grub.texi
v1 :first upstream patchset:
http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html
Fu Wei (4):
i386,xen: Add xen_hypervisor and xen_module aliases for i386
arm64: add "--nounzip" option support in xen_module command
* util/grub.d/20_linux_xen.in: Add xen_boot command support
arm64: update the introduction of xen boot commands in
docs/grub.texi
docs/grub.texi | 33 ++++++++++----------------------- grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++ grub-core/loader/i386/xen.c | 7 +++++++ grub-core/normal/main.c | 2 +- util/grub.d/20_linux_xen.in | 13 ++++++++++--- 5 files changed, 45 insertions(+), 27 deletions(-)
Signature · 1 line
2.5.0
PATCH v3 1/4 i386, xen: Add xen_hypervisor and xen_module aliases for i386
From: Fu Wei <[email protected]>
--- grub-core/loader/i386/xen.c | 7 +++++++ 1 file changed, 7 insertions(+)
grub-core/loader/i386/xen.c +7 -0
@@ -689,6 +689,7 @@ fail: }static grub_command_t cmd_xen, cmd_initrd, cmd_module, cmd_multiboot; +static grub_command_t cmd_xen_hypervisor, cmd_xen_module;GRUB_MOD_INIT (xen) {
@@ -696,10 +697,14 @@ GRUB_MOD_INIT (xen) 0, N_("Load Linux.")); cmd_multiboot =grub_register_command ("multiboot" , grub_cmd_xen,0 ,N_ ("Load Linux." )); + cmd_xen_hypervisor =grub_register_command ("xen_hypervisor" , grub_cmd_xen, +0 ,N_ ("Load Linux." )); cmd_initrd =grub_register_command ("initrd" , grub_cmd_initrd,0 ,N_ ("Load initrd." )); cmd_module =grub_register_command ("module" , grub_cmd_module,0 ,N_ ("Load module." )); + cmd_xen_module =grub_register_command ("xen_module" , grub_cmd_module, +0 ,N_ ("Load module." )); my_mod = mod; }
@@ -709,4 +714,6 @@ GRUB_MOD_FINI (xen)grub_unregister_command (cmd_initrd);grub_unregister_command (cmd_multiboot);grub_unregister_command (cmd_module); +grub_unregister_command (cmd_xen_module); +grub_unregister_command (cmd_xen_hypervisor); }
Signature · 1 line
2.5.0
PATCH v3 2/4 arm64: add "--nounzip" option support in xen_module command
In reply to [email protected]From: Fu Wei <[email protected]>
This patch adds "--nounzip" option support in order to be compatible with the module command of i386, then we can simplify grub-mkconfig support code.
--- grub-core/loader/arm64/xen_boot.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
grub-core/loader/arm64/xen_boot.c +17 -0
@@ -20,6 +20,7 @@#include <grub/charset.h> #include <grub/command.h> #include <grub/err.h> +#include <grub/env.h> #include <grub/file.h> #include <grub/fdt.h> #include <grub/list.h>
@@ -379,6 +380,20 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),struct xen_boot_binary *module =NULL ;grub_file_t file =0 ; +int nounzip =0 ; + +if (!argc) + { +grub_error (GRUB_ERR_BAD_ARGUMENT ,N_ ("filename expected" )); + goto fail; + } + +if (grub_strcmp (argv[0 ],"--nounzip" ) ==0 ) + { + argv++; + argc--; + nounzip =1 ; + }if (!argc) {
@@ -403,6 +418,8 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)),grub_dprintf ("xen_loader" ,"Init module and node info\n" ); +if (nounzip) +grub_file_filter_disable_compression (); file =grub_file_open (argv[0 ]);if (!file) goto fail;
Signature · 1 line
2.5.0
PATCH v3 3/4 * util/grub.d/20_linux_xen.in: Add xen_boot command support
In reply to [email protected]From: Fu Wei <[email protected]>
This patch adds the support of xen_boot command:
xen_hypervisor
xen_module
Also add a new "feature_xen_boot" to indicate this grub support xen_boot command.
--- grub-core/normal/main.c | 2 +- util/grub.d/20_linux_xen.in | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-)
grub-core/normal/main.c +1 -1
@@ -488,7 +488,7 @@ static const char *features[] = {"feature_chainloader_bpb" ,"feature_ntldr" ,"feature_platform_search_hint" ,"feature_default_font_path" ,"feature_all_video_module" ,"feature_menuentry_id" ,"feature_menuentry_options" ,"feature_200_final" , -"feature_nativedisk_cmd" ,"feature_timeout_style" +"feature_nativedisk_cmd" ,"feature_timeout_style" ,"feature_xen_boot" };GRUB_MOD_INIT (normal)
util/grub.d/20_linux_xen.in +10 -3
@@ -122,16 +122,23 @@ linux_entry () else xen_rm_opts="no-real-mode edd=off" fi - multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} + if [ "x\$feature_xen_boot" != xy ]; then + xen_loader="multiboot" + module_loader="module" + else + xen_loader="xen_hypervisor" + module_loader="xen_module" + fi + \${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} echo '$(echo "$lmessage" | grub_quote)' - module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} + \${module_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - module --nounzip ${rel_dirname}/${initrd} + \${module_loader} --nounzip ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF
Signature · 1 line
2.5.0
PATCH v3 4/4 arm64: update the introduction of xen boot commands in docs/grub.texi
In reply to [email protected]From: Fu Wei <[email protected]>
delete: xen_linux, xen_initrd, xen_xsm
add: xen_module
This update bases on
commit 0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.
--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)
docs/grub.texi +10 -23
@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu
@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffn -@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line. +On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added. +The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional) @end deffn -@node xen_initrd -@subsection xen_initrd - -@deffn Command xen_initrd file -Load a initrd image for dom0 kernel at the booting process of xen. -@end deffn - -@node xen_xsm -@subsection xen_xsm - -@deffn Command xen_xsm file -Load a xen security module for xen hypervisor at the booting process of xen. -See @uref{http://wiki.xen.org/wiki/XSM} for more detail. -@end deffn - - @node Networking commands @section The list of networking commands
Signature · 1 line
2.5.0
Re: [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
26.02.2016 14:13, [email protected] пишет:
Quoted 36 lines
From: Fu Wei <[email protected]>
delete:
xen_linux,xen_initrd,xen_xsm
add:xen_moduleThis update bases on
commit0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.Signed-off-by Fu Wei <[email protected]>--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)docs/grub.texi +1
-3@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffn
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5147
Quoted 10 lines
docs/grub.texi +4
-4-@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line.
==
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5150
Quoted 3 lines
docs/grub.texi +3
-0+On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added.
I think it is better to skip it entirely. It is not really correct - neither multiboot protocol provides any module identification (Xen probes module types), nor is i386 using multiboot2, nor can all modules be probed, so order still matters. To avoid confusion I'd simply replaced the above three lines with
Modules should be loaded in the following order:
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5152
Quoted 2 lines
docs/grub.texi +2
-0+The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional)
This covers both supported platforms without going into too deep details; if you and Vladimir are OK, I'll commit with this change.
Quoted 12 lines
docs/grub.texi +0
-9@end deffn -@node xen_initrd -@subsection xen_initrd - -@deffn Command xen_initrd file -Load a initrd image for dom0 kernel at the booting process of xen. -@end deffn - -@node xen_xsm -@subsection xen_xsm
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5157
Quoted 10 lines
docs/grub.texi +0
-7- -@deffn Command xen_xsm file -Load a xen security module for xen hypervisor at the booting process of xen. -See @uref{http://wiki.xen.org/wiki/XSM} for more detail. -@end deffn - - @node Networking commands @section The list of networking commands
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi Andrei
Quoted 59 lines · Andrei Borzenkov
26.02.2016 14:13, [email protected] пишет:
Quoted 36 lines
From: Fu Wei <[email protected]>
delete:
xen_linux,xen_initrd,xen_xsm
add:xen_moduleThis update bases on
commit0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.Signed-off-by Fu Wei <[email protected]>--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)docs/grub.texi +1
-3@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffndocs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5147
Quoted 10 lines
docs/grub.texi +4
-4-@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line.==
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5150
Quoted 3 lines
docs/grub.texi +3
-0+On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added.I think it is better to skip it entirely. It is not really correct - neither multiboot protocol provides any module identification (Xen probes module types), nor is i386 using multiboot2, nor can all modules be probed, so order still matters. To avoid confusion I'd simply replaced the above three lines with
Quoted 7 lines
Modules should be loaded in the following order:
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5152
Quoted 2 lines
docs/grub.texi +2
-0+The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional)This covers both supported platforms without going into too deep details; if you and Vladimir are OK, I'll commit with this change.
Thank you very much!
Sorry I am not familiar with xen on i386, so maybe I misunderstand this. So please commit with your change, Thanks for your correction :-)
Quoted 24 lines
Quoted 23 lines
docs/grub.texi +0
-16@end deffn -@node xen_initrd -@subsection xen_initrd - -@deffn Command xen_initrd file -Load a initrd image for dom0 kernel at the booting process of xen. -@end deffn - -@node xen_xsm -@subsection xen_xsm - -@deffn Command xen_xsm file -Load a xen security module for xen hypervisor at the booting process of xen. -See @uref{http://wiki.xen.org/wiki/XSM} for more detail. -@end deffn - - @node Networking commands @section The list of networking commands
Signature · 15 lines
Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi Andrei,
Quoted 70 lines · Fu Wei
Hi Andrei
Quoted 59 lines · Andrei Borzenkov
26.02.2016 14:13, [email protected] пишет:
Quoted 36 lines
From: Fu Wei <[email protected]>
delete:
xen_linux,xen_initrd,xen_xsm
add:xen_moduleThis update bases on
commit0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.Signed-off-by Fu Wei <[email protected]>--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)docs/grub.texi +1
-3@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffndocs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5147
Quoted 10 lines
docs/grub.texi +4
-4-@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line.==
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5150
Quoted 3 lines
docs/grub.texi +3
-0+On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added.I think it is better to skip it entirely. It is not really correct - neither multiboot protocol provides any module identification (Xen probes module types), nor is i386 using multiboot2, nor can all modules be probed, so order still matters. To avoid confusion I'd simply replaced the above three lines with
Quoted 7 lines
Modules should be loaded in the following order:
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5152
Quoted 2 lines
docs/grub.texi +2
-0+The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional)This covers both supported platforms without going into too deep details; if you and Vladimir are OK, I'll commit with this change.
Quoted 3 lines
Thank you very much!
Sorry I am not familiar with xen on i386, so maybe I misunderstand this. So please commit with your change, Thanks for your correction :-)
I just fetched the mainline GRUB, i would like to know why this patchset haven't been applied?
Anything I need to do(improve it or post a new patchset according to your suggestion) for this patchset?
Great thanks :-)
Quoted 40 lines
Quoted 17 lines
Quoted 17 lines
docs/grub.texi +0
-12@end deffn -@node xen_initrd -@subsection xen_initrd - -@deffn Command xen_initrd file -Load a initrd image for dom0 kernel at the booting process of xen. -@end deffn - -@node xen_xsm -@subsection xen_xsm - -@deffn Command xen_xsm file -Load a xen security module for xen hypervisor at the booting process of xen.Quoted 9 lines
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5157
Quoted 8 lines
docs/grub.texi +0
-4-See @uref{http://wiki.xen.org/wiki/XSM} for more detail. -@end deffn - - @node Networking commands @section The list of networking commands--
Best regards,Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021
Signature · 15 lines
Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
07.03.2016 11:22, Fu Wei пишет:
Quoted 73 lines
Hi Andrei,
Quoted 70 lines · Fu Wei
Hi Andrei
Quoted 66 lines · Andrei Borzenkov
26.02.2016 14:13, [email protected] пишет:
Quoted 36 lines
From: Fu Wei <[email protected]>
delete:
xen_linux,xen_initrd,xen_xsm
add:xen_moduleThis update bases on
commit0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.Signed-off-by Fu Wei <[email protected]>--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)docs/grub.texi +1
-3@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffndocs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5147
Quoted 10 lines
docs/grub.texi +4
-4-@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line.==
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5150
Quoted 3 lines
docs/grub.texi +3
-0+On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added.I think it is better to skip it entirely. It is not really correct - neither multiboot protocol provides any module identification (Xen probes module types), nor is i386 using multiboot2, nor can all modules be probed, so order still matters. To avoid confusion I'd simply replaced the above three lines with
Modules should be loaded in the following order:
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5152
Quoted 2 lines
docs/grub.texi +2
-0+The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional)This covers both supported platforms without going into too deep details; if you and Vladimir are OK, I'll commit with this change.
Quoted 9 lines
Quoted 3 lines
Thank you very much!
Sorry I am not familiar with xen on i386, so maybe I misunderstand this. So please commit with your change, Thanks for your correction :-)I just fetched the mainline GRUB, i would like to know why this patchset haven't been applied?
Anything I need to do(improve it or post a new patchset according to your suggestion) for this patchset?
Sorry for delay. It is not really about your patchset, but we need some decision about loading additional modules/lack of initrd on ARM. Until then I'd rather avoid committing to any high-level configuration support that will require even more backward compatible hacks later.
As it stands now either Xen needs to support autodetection or we need to revert to providing module type explicitly.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi Andrei,
Quoted 84 lines · Andrei Borzenkov
07.03.2016 11:22, Fu Wei пишет:
Quoted 73 lines
Hi Andrei,
Quoted 70 lines · Fu Wei
Hi Andrei
Quoted 66 lines · Andrei Borzenkov
26.02.2016 14:13, [email protected] пишет:
Quoted 36 lines
From: Fu Wei <[email protected]>
delete:
xen_linux,xen_initrd,xen_xsm
add:xen_moduleThis update bases on
commit0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.Signed-off-by Fu Wei <[email protected]>--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)docs/grub.texi +1
-3@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffndocs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5147
Quoted 10 lines
docs/grub.texi +4
-4-@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line.==
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5150
Quoted 3 lines
docs/grub.texi +3
-0+On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added.I think it is better to skip it entirely. It is not really correct - neither multiboot protocol provides any module identification (Xen probes module types), nor is i386 using multiboot2, nor can all modules be probed, so order still matters. To avoid confusion I'd simply replaced the above three lines with
Modules should be loaded in the following order:
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5152
Quoted 2 lines
docs/grub.texi +2
-0+The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional)This covers both supported platforms without going into too deep details; if you and Vladimir are OK, I'll commit with this change.
Quoted 9 lines
Quoted 3 lines
Thank you very much!
Sorry I am not familiar with xen on i386, so maybe I misunderstand this. So please commit with your change, Thanks for your correction :-)I just fetched the mainline GRUB, i would like to know why this patchset haven't been applied?
Anything I need to do(improve it or post a new patchset according to your suggestion) for this patchset?
Quoted 7 lines
Sorry for delay. It is not really about your patchset, but we need some decision about loading additional modules/lack of initrd on ARM. Until then I'd rather avoid committing to any high-level configuration support that will require even more backward compatible hacks later.
As it stands now either Xen needs to support autodetection or we need to revert to providing module type explicitly.
So speaking of loading additional modules/lack of initrd on ARM, I thinks that will (only) affect loading XSM.
For this, I have discussed of that with Julien, I think :
(1) the first module must be kernel
(2) the second module must be initrd, if we have initrd
(3) Start from the 2nd module, XEN will detect that if the module is a XSM by the XSM binary signature. if we get XSM as the second module, that means we have not initrd.
please correct me if I misunderstand it
:-)
Signature · 15 lines
Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
08.03.2016 19:37, Fu Wei пишет:
Quoted 95 lines
Hi Andrei,
Quoted 84 lines · Andrei Borzenkov
07.03.2016 11:22, Fu Wei пишет:
Quoted 73 lines
Hi Andrei,
Quoted 70 lines · Fu Wei
Hi Andrei
Quoted 66 lines · Andrei Borzenkov
26.02.2016 14:13, [email protected] пишет:
Quoted 36 lines
From: Fu Wei <[email protected]>
delete:
xen_linux,xen_initrd,xen_xsm
add:xen_moduleThis update bases on
commit0edd750e50698854068358ea53528100a9192902
Author: Vladimir Serbinenko <[email protected]>
Date: Fri Jan 22 10:18:47 2016 +0100
xen_boot: Remove obsolete module type distinctions.Signed-off-by Fu Wei <[email protected]>--- docs/grub.texi | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-)docs/grub.texi +1
-3@@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * videoinfo:: List available video modes @comment * xen_*:: Xen boot commands * xen_hypervisor:: Load xen hypervisor binary -* xen_linux:: Load dom0 kernel for xen hypervisor -* xen_initrd:: Load dom0 initrd for dom0 kernel -* xen_xsm:: Load xen security module for xen hypervisor +* xen_module:: Load xen modules for xen hypervisor @end menu@@ -5141,30 +5139,19 @@ verbatim as the @dfn{kernel command-line}. Any other binaries must be reloaded after using this command. @end deffndocs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5147
Quoted 10 lines
docs/grub.texi +4
-4-@node xen_linux -@subsection xen_linux +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line.==
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5150
Quoted 3 lines
docs/grub.texi +3
-0+On i386, the modules will be identified by Multiboot(2) protocol. +On arm64, each module will be identified by the order in which the +modules are added.I think it is better to skip it entirely. It is not really correct - neither multiboot protocol provides any module identification (Xen probes module types), nor is i386 using multiboot2, nor can all modules be probed, so order still matters. To avoid confusion I'd simply replaced the above three lines with
Modules should be loaded in the following order:
docs/grub.texi verbatim as the @dfn{kernel command-line}. Any other binaries must be · line 5152
Quoted 2 lines
docs/grub.texi +2
-0+The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional)This covers both supported platforms without going into too deep details; if you and Vladimir are OK, I'll commit with this change.
Quoted 9 lines
Quoted 3 lines
Thank you very much!
Sorry I am not familiar with xen on i386, so maybe I misunderstand this. So please commit with your change, Thanks for your correction :-)I just fetched the mainline GRUB, i would like to know why this patchset haven't been applied?
Anything I need to do(improve it or post a new patchset according to your suggestion) for this patchset?Quoted 7 lines
Sorry for delay. It is not really about your patchset, but we need some decision about loading additional modules/lack of initrd on ARM. Until then I'd rather avoid committing to any high-level configuration support that will require even more backward compatible hacks later.
As it stands now either Xen needs to support autodetection or we need to revert to providing module type explicitly.
Quoted 9 lines
So speaking of loading additional modules/lack of initrd on ARM, I thinks that will (only) affect loading XSM.
For this, I have discussed of that with Julien, I think :
(1) the first module must be kernel
(2) the second module must be initrd, if we have initrd
(3) Start from the 2nd module, XEN will detect that if the module is a XSM by the XSM binary signature. if we get XSM as the second module, that means we have not initrd.
If that's the plan, excellent. Vladimir, is it OK to commit then?
Quoted 4 lines
please correct me if I misunderstand it
:-)
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
In reply to Fu WeiHi,
Quoted 9 lines · Fu Wei
On 8 March 2016 at 14:54, Andrei Borzenkov <[email protected]> wrote:
So speaking of loading additional modules/lack of initrd on ARM, I thinks that will (only) affect loading XSM.
For this, I have discussed of that with Julien, I think :
(1) the first module must be kernel
(2) the second module must be initrd, if we have initrd
(3) Start from the 2nd module, XEN will detect that if the module is a XSM by the XSM binary signature. if we get XSM as the second module, that means we have not initrd.
We need to update Xen for point (3). Fu Wei, could you send a patch for this?
Quoted 1 line
please correct me if I misunderstand it
I'm fine with this plan, it matches the x86 behavior.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi Julien,
Quoted 17 lines · Julien Grall
Hi,
Quoted 12 lines · Fu Wei
On 8 March 2016 at 14:54, Andrei Borzenkov <[email protected]> wrote:
So speaking of loading additional modules/lack of initrd on ARM, I thinks that
will (only) affect loading XSM.
For this, I have discussed of that with Julien, I think :
(1) the first module must be kernel
(2) the second module must be initrd, if we have initrd
(3) Start from the 2nd module, XEN will detect that if the module is a XSM by
the XSM binary signature. if we get XSM as the second module, that means we have not initrd.
Quoted 2 lines
We need to update Xen for point (3). Fu Wei, could you send a patch for this?
Yes, I think I can do that.
Quoted 6 lines
Quoted 2 lines
please correct me if I misunderstand it
I'm fine with this plan, it matches the x86 behavior.
Great thanks for your review :-)
Quoted 4 lines
Cheers,
--
Julien Grall
Signature · 10 lines
Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021
Re: [Xen-devel] [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi all,
Quoted 20 lines · Fu Wei
Hi Julien,
Quoted 17 lines · Julien Grall
Hi,
Quoted 12 lines · Fu Wei
On 8 March 2016 at 14:54, Andrei Borzenkov <[email protected]> wrote:
So speaking of loading additional modules/lack of initrd on ARM, I thinks that
will (only) affect loading XSM.
For this, I have discussed of that with Julien, I think :
(1) the first module must be kernel
(2) the second module must be initrd, if we have initrd
(3) Start from the 2nd module, XEN will detect that if the module is a XSM by
the XSM binary signature. if we get XSM as the second module, that means we have not initrd.
Quoted 4 lines
Quoted 2 lines
We need to update Xen for point (3). Fu Wei, could you send a patch for this?
Yes, I think I can do that.
I have posted the patch for this:
http://lists.xen.org/archives/html/xen-devel/2016-03/msg02430.html
Quoted 29 lines
Quoted 7 lines
Quoted 3 lines
please correct me if I misunderstand it
I'm fine with this plan, it matches the x86 behavior.
Great thanks for your review :-)
Quoted 4 lines
Cheers,
--
Julien Grall--
Best regards,Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021
Signature · 10 lines
Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021
Re: [Xen-devel] [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi all
Quoted 23 lines · Fu Wei
Hi all,
Quoted 20 lines · Fu Wei
Hi Julien,
Quoted 17 lines · Julien Grall
Hi,
Quoted 12 lines · Fu Wei
On 8 March 2016 at 14:54, Andrei Borzenkov <[email protected]> wrote:
So speaking of loading additional modules/lack of initrd on ARM, I thinks that
will (only) affect loading XSM.
For this, I have discussed of that with Julien, I think :
(1) the first module must be kernel
(2) the second module must be initrd, if we have initrd
(3) Start from the 2nd module, XEN will detect that if the module is a XSM by
the XSM binary signature. if we get XSM as the second module, that means we have not initrd.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
We need to update Xen for point (3). Fu Wei, could you send a patch for this?
Yes, I think I can do that.
I have posted the patch for this:
http://lists.xen.org/archives/html/xen-devel/2016-03/msg02430.html
git log ca32012341f3de7d3975407fb963e6028f0d0c8b
commit ca32012341f3de7d3975407fb963e6028f0d0c8b
Author: Fu Wei <[email protected]> Date: Wed Apr 6 00:46:36 2016 +0800
xen/arm64: check XSM Magic from the second unknown module.
This patch adds a has_xsm_magic helper function for detecting XSM from the second unknown module.
If Xen can't get the kind of module from compatible, we guess the kind of these unknowns respectively:
(1) The first unknown must be kernel.
(2) Detect the XSM Magic from the 2nd unknown:
a. If it's XSM, set the kind as XSM, and that also means we
won't load ramdisk;
b. if it's not XSM, set the kind as ramdisk.
So if user want to load ramdisk, it must be the 2nd unknown.
We also detect the XSM Magic for the following unknowns, then set its kind according to the return value of has_xsm_magic.
By this way, arm64 behavior can be compatible to x86 and can simplify multi-arch bootloader such as GRUB.
Since the patch for this has been merged into the staging branch of xen, Could some one help to review this patch or maybe merge this patchset into GRUB if that is OK for all of you :-)
Quoted 44 lines
Quoted 22 lines
Quoted 8 lines
Quoted 4 lines
please correct me if I misunderstand it
I'm fine with this plan, it matches the x86 behavior.
Great thanks for your review :-)
Quoted 4 lines
Cheers,
--
Julien Grall--
Best regards,Quoted 8 lines
Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021--
Best regards,Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021
Signature · 10 lines
Best regards, Fu Wei Software Engineer Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch Ph: +86 21 61221326(direct) Ph: +86 186 2020 4684 (mobile) Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021