[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 13/44] x86/boot: update struct boot_module on module relocation
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 6 Oct 2024 17:49:24 -0400
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728251421; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=NxzxsjEAulp7wEAc20NZOtDa3Lo4GRSs8lW4ILTmQAc=; b=CSOpj5Dxfy9GmEWtV8S9F1lXQZu2+TZvRd9ylYeJPMuarO9zARlX3WG0x/V3cxX6RgNRB2hYmhT5IzUlBlaOUQc9iBj31JsR6sgQ6gLwZVEyBfaxHmV2RHRGoWbsJW7R1m8imQV8sYtvzHFw+AHeUE+aas1RreUot1mYiBeepow=
- Arc-seal: i=1; a=rsa-sha256; t=1728251421; cv=none; d=zohomail.com; s=zohoarc; b=C7bfeo+iZKVTYaWJ5X97pyAu2kDVxcsiEi+xMdkpWZ0++YhzLoZKWU1Ef+5ToV5uGnLUK5ORBfUWDr0PyfBoba7TxiKio+tM96X2Y72MDVqqc7eCj2b04l4my8cNQaYLV2x/j5QSMVd1rdEDeR/IfkvNr6WrIlkjE7GXlxUaKz0=
- Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, jason.andryuk@xxxxxxx, christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Sun, 06 Oct 2024 21:57:17 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
When a boot module is relocated, ensure struct boot_module start and size
fields are updated along with early_mod.
Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
xen/arch/x86/setup.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 093a4f5380d1..f968758048ed 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1392,8 +1392,11 @@ void asmlinkage __init noreturn __start_xen(unsigned
long mbi_p)
* respective reserve_e820_ram() invocation below. No need to
* query efi_boot_mem_unused() here, though.
*/
- bi->mods[xen].mod->mod_start = virt_to_mfn(_stext);
- bi->mods[xen].mod->mod_end = __2M_rwdata_end - _stext;
+ bi->mods[xen].start = virt_to_mfn(_stext);
+ bi->mods[xen].size = __2M_rwdata_end - _stext;
+
+ bi->mods[xen].mod->mod_start = bi->mods[xen].start;
+ bi->mods[xen].mod->mod_end = bi->mods[xen].size;
}
bi->mods[0].headroom =
--
2.30.2
|