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

Re: [PATCH v5 13/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: Wed, 9 Oct 2024 10:36:18 -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=1728484584; 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=SLIPpUZ70l5GUI38EgchFjbId7y/WR0TYtmCWwB+glY=; b=EbTntArkS/6vge964VyIkq5ou1xqCRyJ8vDXT1BVP/nfDo1o3GYoWUR2cP9YMVzFkdXNYcX0skl1h61bHat0Z1HCc1rdSXWW7RTS4mhiBey9RlOPIxea9cSEbmiVrz6ZKz/QkrGzJrvy0qrfWPL5TMZfWgX+5mDodasN83bFP+I=
  • Arc-seal: i=1; a=rsa-sha256; t=1728484584; cv=none; d=zohomail.com; s=zohoarc; b=eDDi6d56+f4O1H86Z+8XvTNS0x8JoCQveOY0zmpXiyZf5ykaHnJg+gPWblHalBZ0a3+nGMA/esjrCrjcHY+fHc3JLtoeLguL4m5BV2BqQEd1XuY8FzoKSjSztCUjYYQrPURJkUSALaEKFFTogvJBzmc/vqsbcKh/GufK95PytTo=
  • 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: Wed, 09 Oct 2024 14:36:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10/7/24 16:31, Jason Andryuk wrote:
On 2024-10-06 17:49, 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>
---
  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;

The last patch did:
bi->mods[i].start = (paddr_t)mods[i].mod_start;

and start is a paddr_t.

Is virt_to_mfn() wrong?

Yah, that is seriously wrong. Will fix.

v/r,
dps



 


Rackspace

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