diff mbox series

[v5,35/44] x86/boot: remove usage of mod_end by discard_initial_images

Message ID 20241006214956.24339-36-dpsmith@apertussolutions.com (mailing list archive)
State Superseded
Headers show
Series Boot modules for Hyperlaunch | expand

Commit Message

Daniel P. Smith Oct. 6, 2024, 9:49 p.m. UTC
This eliminates usage of early_mod by discard_initial_images

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
---
 xen/arch/x86/setup.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Jason Andryuk Oct. 8, 2024, 7:05 p.m. UTC | #1
On 2024-10-06 17:49, Daniel P. Smith wrote:
> This eliminates usage of early_mod by discard_initial_images
> 
> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index b3b6e6f38622..e9e3da3204f1 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -352,12 +352,10 @@  void __init discard_initial_images(void)
 
     for ( i = 0; i < bi->nr_modules; ++i )
     {
-        uint64_t start =
-            (uint64_t)bi->mods[i].mod->mod_start << PAGE_SHIFT;
+        uint64_t start = bi->mods[i].start;
 
         init_domheap_pages(start,
-                           start +
-                           PAGE_ALIGN(bi->mods[i].mod->mod_end));
+                           start + PAGE_ALIGN(bi->mods[i].size));
     }
 
     bi->nr_modules = 0;