On 9/3/24 18:41, Andrew Cooper wrote:
On 30/08/2024 10:46 pm, Daniel P. Smith wrote:
Transition the incoming boot loader name to be held in struct boot_info.
No functional change intended.
Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com>
---
xen/arch/x86/include/asm/bootinfo.h | 2 ++
xen/arch/x86/setup.c | 15 ++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/include/asm/bootinfo.h
b/xen/arch/x86/include/asm/bootinfo.h
index e850f80d26a7..e69feb1bb8be 100644
--- a/xen/arch/x86/include/asm/bootinfo.h
+++ b/xen/arch/x86/include/asm/bootinfo.h
@@ -10,6 +10,8 @@
struct boot_info {
unsigned int nr_mods;
+
+ const char *boot_loader_name;
Simply loader, matching the __setup_xen() variable you dropped, will be
fine.
Yep, can do.
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index dd94ee2e736b..432b7d1701e4 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -2054,7 +2055,7 @@ void asmlinkage __init noreturn __start_xen(unsigned long
mbi_p)
*/
dom0 = create_dom0(mod, modules_headroom,
initrdidx < boot_info->nr_mods ? mod + initrdidx :
NULL,
- kextra, loader);
+ kextra, boot_info->boot_loader_name);
Do I want to know why create_dom0() cares about our bootloader? I'm
sure the answer is no.
Because in cmdline_cook(), you have this:
/*
* PVH, our EFI loader, and GRUB2 don't include image name as first
* item on command line.
*/
if ( xen_guest || efi_enabled(EFI_LOADER) || loader_is_grub2(loader_name) )
return p;
Later in the series, all of this is no longer passed but it is still
used by accessing the struct boot_info instance.
v/r,
dps