[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: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Mon, 7 Oct 2024 16:31:25 -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=rVgA2uvEditNMcaetxjBNpetmRO/dF8TLAN1iuHd40E=; b=F1IlltoEdzsHYw3X5bA5fLZd4OtnJXJY/UIzFNxU6vfb57G609im/F3CUQcGH5shCxZw2+7HhoWQroGisJYV9NrULQbOwn7BZPN+0WxsMo3VC5ccJXSEZ/tpJRa2hIgxvDqWYhFWoWoe1edzVMlZBqgG3E2aZhLGps7vKFwoaqDed2f8TaGuiv6RxBKSGJlGHTwWyEVCLJIo/OVwS4okFGVOtYuWgBYyxCj0yZrtct5Vi4sc7yo59v5e2QdaYwg0DvnnZ3E6nv9Np+Bpge/PlMnvI+ygav5g0dHbJqa8Wil8DU3GNfhY35M7GESp446lsozdNFkTtDq8X3XfmzFOjA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nJJGdRxyt+YKdBCeyRZjY6/7Waj0+DAHQVVgngH9J2QVPeAXd4nfpXR8Qy1wslSW7QdlbeRNycqJPx/CNc74w7ZEs07gx9XySAodP8S2Cxy9znY7gB9LiyqqTrQIkJUpSFnoEs8Vb6lOwb8ingyunyiUYVldjYa8rYDNjfWG/DaX/1vHIczurRYMw33LQHCopY36THwJU5QsgnjPagW7B0o42ExX8y+dm1gCVogZGnWFI1CoEI0Ci4StN2bXPdOlq7jLGMsyncYuVJCTdw9p1xgMLfRaeZhhQko3lE52hSzUZNY3JPT4ckmBlGqHZHg2W/pCWcwmPHekYkXMvq1ZoQ==
- 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: Mon, 07 Oct 2024 20:31:35 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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?
+
+ bi->mods[xen].mod->mod_start = bi->mods[xen].start;
+ bi->mods[xen].mod->mod_end = bi->mods[xen].size;
}
bi->mods[0].headroom =
|