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

[PATCH v7 08/38] x86/boot: populate boot module for xen entry


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Sun, 20 Oct 2024 20:45:43 -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=1729471594; 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=Zg0/zrG8nOgRHoZJidNwfeDdFu4m0rBe5upUUFqNRlI=; b=EdBwnOe0sw8iK8jWcyW0mtp8RxiKfJuLsSUDXW5Viny8SY8BMGO3x8LRmPf3WD69I5Xn9udTkI7JKdbmZ0QIDkrTvqptn78YawwKsta4HOEfx8G/SmtZoGvJoQj6HC1ZS9I4Wo9XNNMySd1Gb94oyHEmSgrWM9tEZ1OoSj9jBlw=
  • Arc-seal: i=1; a=rsa-sha256; t=1729471594; cv=none; d=zohomail.com; s=zohoarc; b=mK3dy+ROetQibWDQkE2abbPJkr6Vvawn07z/3r4l9R6/eOQdmUtCtmVcoAp/UHYYPRI/J2a+LyrVZqkBsuABYmjX67AwkCKsJi6uXyiOwVlLhRNHz4sfIMts+nwJM8XJvoVRYziFGeR5u1s9pdIpQ2k/npu8kkFpFQbvMzkdxUE=
  • 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: Mon, 21 Oct 2024 00:56:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Populate the start and size fields for the Xen entry when populating them in
the reserved module_t entry.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
Changes since v6:
- apply correct conversion of assignment to mod_start
- rewrite commit message to reflect code change

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 2e87aa314389..4e5d4055e7dd 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1411,8 +1411,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 = paddr_to_pfn(bi->mods[xen].start);
+        bi->mods[xen].mod->mod_end = bi->mods[xen].size;
     }
 
     bi->mods[0].headroom =
-- 
2.30.2




 


Rackspace

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