[PATCH 06/12] x86/boot: relocate kextra into boot info

Daniel P. Smith posted 12 patches 2 weeks, 4 days ago
There is a newer version of this series
[PATCH 06/12] x86/boot: relocate kextra into boot info
Posted by Daniel P. Smith 2 weeks, 4 days ago
Move kextra into struct boot_info, thus no longer needed to be passed as a
parameter to create_dom0.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
---
 xen/arch/x86/include/asm/bootinfo.h | 1 +
 xen/arch/x86/setup.c                | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm/bootinfo.h
index e337baa905f0..6638da597073 100644
--- a/xen/arch/x86/include/asm/bootinfo.h
+++ b/xen/arch/x86/include/asm/bootinfo.h
@@ -68,6 +68,7 @@ struct boot_module {
 struct boot_info {
     const char *loader;
     const char *cmdline;
+    const char *kextra;
 
     paddr_t memmap_addr;
     size_t memmap_length;
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 633319d39d80..425467a0d977 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1136,6 +1136,7 @@ void asmlinkage __init noreturn __start_xen(void)
         *kextra = '\0';
         kextra += 3;
         while ( kextra[1] == ' ' ) kextra++;
+        bi->kextra = kextra;
     }
     cmdline_parse(bi->cmdline);
 
@@ -2141,7 +2142,7 @@ void asmlinkage __init noreturn __start_xen(void)
     dom0 = create_dom0(bi->mods[0].mod, bi->mods[0].headroom,
                        initrdidx < bi->nr_modules ? bi->mods[initrdidx].mod
                                                   : NULL,
-                       kextra, bi->loader);
+                       bi->kextra, bi->loader);
     if ( !dom0 )
         panic("Could not set up DOM0 guest OS\n");
 
-- 
2.30.2
Re: [PATCH 06/12] x86/boot: relocate kextra into boot info
Posted by Andrew Cooper 2 weeks ago
On 02/11/2024 5:25 pm, Daniel P. Smith wrote:
> Move kextra into struct boot_info, thus no longer needed to be passed as a
> parameter to create_dom0.
>
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>

Technically "..., so it can be removed as a distinct parameter to
create_dom0()".

Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Re: [PATCH 06/12] x86/boot: relocate kextra into boot info
Posted by Daniel P. Smith 2 weeks ago
On 11/6/24 18:04, Andrew Cooper wrote:
> On 02/11/2024 5:25 pm, Daniel P. Smith wrote:
>> Move kextra into struct boot_info, thus no longer needed to be passed as a
>> parameter to create_dom0.
>>
>> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
>> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
> 
> Technically "..., so it can be removed as a distinct parameter to
> create_dom0()".

Ack.

> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thank you.

v/r,
dps