[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 33/44] x86/boot: convert initial_images to struct boot_module
- To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 8 Oct 2024 14:52:40 -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=US0Sv60N6TXMrrj6TOMAAQ3NEaVsmCgdayuC+a1mQ1U=; b=IrhQD/7wqEiFkpdmUoNOCAJpQlk8Dg0t/a4Pm+rCSmfJLAJg8O7GBD8u5ZcxIw3Gz9HBRchfEi9HyrSRVi1NICetoyTwb7jkoDUblum1cmHJp65nfQKrCMjjPQ6ABPvgjP2eGFG8twEZOflVxgNaViDZxj9qg6RX9hZ61m0ZJiYQmd/6xH/TnlqzzKtC//rw3tyXyUDRWylc6m/M5bSg519DOvkwFju5gg3V09dF2KEnpXHBR3yaVswpHJnDo/yRBXzP7k8fEMngA41mgFwi+Bh1jsjQX6L6kocgHPCWmIhIKdmWEjL5xNusx7odDNZQXxgm2577ObxA8c1eDCOVTA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QukfxgqRlSt3kxnTqa2WWp/E9akBP+X3Z58br+8KUncJc7yPGtPgbNZyKJE5+ziolGFlr3kt5lPrLtwthb42YafpcZuvmaULcFpugKML5fw7eawdfn8Bn32U6N4trL0kilyGe1+B7SDT/pxKlxxbcXaNchzawA/E9QTDyCKYng6cAEi0VAYV/1TCWriUwjRK5yufMMdYidtrThwuVgBkgyOas90DFx1WFDlPUPr8xqx9I1zq/egVxPubZAgIhWWp7Hd/qx4TXSFocLWDU+tMsymGmJdhixfPkaf15IcXXbRZ8QEJa0paxgkh1+6CHAWOlntzqTyUxBK9cJqo/XUUiw==
- 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: Tue, 08 Oct 2024 19:53:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2024-10-06 17:49, Daniel P. Smith wrote:
The variable initial_images is used for tracking the boot modules passed in by
the boot loader. Convert to a struct boot_module and adjust the code that uses
it accordingly.
Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
xen/arch/x86/setup.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index d5916e85f68e..30a139074833 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -336,8 +336,9 @@ unsigned long __init initial_images_nrpages(nodeid_t node)
for ( nr = i = 0; i < bi->nr_modules; ++i )
{
- unsigned long start = initial_images[i].mod_start;
- unsigned long end = start + PFN_UP(initial_images[i].mod_end);
+ unsigned long start = initial_images[i].mod->mod_start;
+ unsigned long end = start +
+ PFN_UP(initial_images[i].mod->mod_end);
This can fit on a single line.
if ( end > node_start && node_end > start )
nr += min(node_end, end) - max(node_start, start);
@@ -353,10 +354,12 @@ void __init discard_initial_images(void)
for ( i = 0; i < bi->nr_modules; ++i )
{
- uint64_t start = (uint64_t)initial_images[i].mod_start << PAGE_SHIFT;
+ uint64_t start =
+ (uint64_t)initial_images[i].mod->mod_start << PAGE_SHIFT;
init_domheap_pages(start,
- start + PAGE_ALIGN(initial_images[i].mod_end));
+ start +
+ PAGE_ALIGN(initial_images[i].mod->mod_end));
This can fit on a single line.
}
bi->nr_modules = 0;
With those fixed:
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
|