[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 12/44] x86/boot: update struct boot_module on module relocation


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sat, 19 Oct 2024 07:57:04 -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=1729339028; h=Content-Type: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=IUDqa87blw5l4UUTH6147BSi9tzzegZKadzKH1zev3M=; b=WA/v3UHzbB4NXdxWibj+bulMUPMQWWXs7kvvDoG52KVtx5i4uHAJsuNyVqtCIIWoLvFiLs0/rdSEQ/nAUpLZQBTkklkfvX2I/iP/ZNKXfMbMejP75XqzR4dawPpx12E3EsfqJ0Yrgozl4+p+s2H7D25S0E77FYYEAPA5I5Li/io=
  • Arc-seal: i=1; a=rsa-sha256; t=1729339028; cv=none; d=zohomail.com; s=zohoarc; b=K/aw+B5lvkHPt3m3sSwCcQLXl+r0v4OtbIQxVIVzXr3RknWXLiAs5LeTsxOUlJJERtbosDhqvudY3cfvYViLJBPeuQoFRwKNWmvTvBIG4TQOYgMchkyGGKZAl8vBeWIWhdyNY5h3QNhdV9IqOxryLfV0EorMes7O85t07IrQKwo=
  • Cc: christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Sat, 19 Oct 2024 11:57:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/17/24 19:15, Jason Andryuk wrote:
On 2024-10-17 13:02, Daniel P. Smith wrote:
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>
---
Changes since v5:
- corrected conversion function for a missed switch from mfn to maddr/paddr
---
  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 6ee352fc0cde..d51b0b03bc97 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1380,8 +1380,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_maddr(_stext);
+        bi->mods[xen].size = __2M_rwdata_end - _stext;
+
+        bi->mods[xen].mod->mod_start = bi->mods[xen].start;

But now this line needs to be converted to an mfn?

Correct.

v/r,
dps



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.