[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: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Thu, 17 Oct 2024 19:15:35 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=w4lPJHl433fjvn7gzT0sSSZbiDYLuToYof3A5FZAJUU=; b=a6lsbsb+xhfPUO41O3R9/ugLzR4CyowpWoYaGpKHxs6T7r8VFY/SPcVCQpzTIc5ZpKwpHejzlKH3j1YULqlF01j/PWYsCDDnnlQJWkRS95EapLzS8/kf1CQyOIOLPJyfOAqg41hbRxjghG7CyX9gxU+o7xJ5TrlfvI917rGynkB7DBvxumrOdmxPIGY2a1QGopQwJlSaS02R3ahBkm1RANmfwNnDXUwvxgS0/ihdXrOy9D6djLC7z4TmFOiZrOnjTG90FIcHTBUHgsTbWFVE7V354Yr04zfGDRP2Qdics0a+zLX+CqJUnOLchkV+vmvFhBNuw8uzkw06xYqzNprsHg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Lug5XigQCcVBR8kGpMoKW+lXVleHfGXBPnCHRM+SroTsL08Ce0ccG1+tBYCMbm0BxYC62vmuvW7u1MqMRz5heUpGT+HOMH4PfpTb4vVfp7R+3F4WxrJuGiYWtbOdEVlN7xs0GLiA8T/5FHX1HjXRpy8kGZxsBmMoYT7NkqxHaw1qe/H2YOE7KOV8rsAlpOevDTFxVRn4l+Q5qQ4CqjngsoiVw+fzs3HhhHVqSfGxcpSlSoIz+ID/xSz9fq/HMx3Hg8qqCodLN4fOA1sM+eacJWYNcZG9G3ItLel4nwh3dDHs+LH4wO6t/FOJM0BO3D39jqFPLQMVw7fbG5iNfHTRoQ==
- 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: Thu, 17 Oct 2024 23:15:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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?
Regards,
Jason
+ bi->mods[xen].mod->mod_end = bi->mods[xen].size;
}
bi->mods[0].headroom =
|