From nobody Thu Dec 26 12:28:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1729780045; cv=none; d=zohomail.com; s=zohoarc; b=X5D4+dL7YGddOUtiPSNTSvBGjymqzYXUcV2k6TN4M7DvbSZrph4dhYosVj7TMbjbSaixdr3uTsh/mYgddUxgbU8rE/fM/iZHVQK8swYjLN8mhCMBDcyPN62mxRQJGQBxxGX0fBV0mHInlBI6uBV+0aafPY1Ay22vN5mcmpysrds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729780045; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dVXd7SoQfi1YRwuP/bchb8oFe7nMu7FPsr69BeMQRRM=; b=Kmuxzg7rNKrlmzajEZgCZjI4LF4naKVS1FsN9JczyMb4DxorqiVEbdJJR6BuIyGVABjc7+lOM6geiOh2sTwvEuiGWL9Z61bqu6fvyG6C4WLdPd1PE/MN8Hpy1nf5ib+3ClURMvLKbCyeM9WW7A8Z5bfQGsCzua0RURv5bT2gGZk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1729780045948874.7778041173261; Thu, 24 Oct 2024 07:27:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.825346.1239545 (Exim 4.92) (envelope-from ) id 1t3ynm-00048t-H6; Thu, 24 Oct 2024 14:27:02 +0000 Received: by outflank-mailman (output) from mailman id 825346.1239545; Thu, 24 Oct 2024 14:27:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3ynm-00048m-EX; Thu, 24 Oct 2024 14:27:02 +0000 Received: by outflank-mailman (input) for mailman id 825346; Thu, 24 Oct 2024 14:27:01 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t3ynl-00048L-6M for xen-devel@lists.xenproject.org; Thu, 24 Oct 2024 14:27:01 +0000 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [2a00:1450:4864:20::535]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 07b73ecc-9214-11ef-a0bf-8be0dac302b0; Thu, 24 Oct 2024 16:27:00 +0200 (CEST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5c9362c26d8so3732613a12.1 for ; Thu, 24 Oct 2024 07:27:00 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c6b4e4sm5707409a12.61.2024.10.24.07.26.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2024 07:26:58 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 07b73ecc-9214-11ef-a0bf-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1729780019; x=1730384819; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dVXd7SoQfi1YRwuP/bchb8oFe7nMu7FPsr69BeMQRRM=; b=h/zWW9hfot0jC6bq1GDu4wIZadz8TduqHvPgF9xie0DvIp+FPMlG1oh9qJfmRkqNkx NG2znVzaCjZpfLy5QUysl2SPcp0pJ9QnN4mH4U+SAVNys3mtYmt41X9BAs1znEvQmjYj wAcfDIHmR7ItKlNeX75M50WCBeoWJsyAvGIsk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729780019; x=1730384819; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dVXd7SoQfi1YRwuP/bchb8oFe7nMu7FPsr69BeMQRRM=; b=ho+VXHkrhCsD0JE+40wtqz+gDAEAqGAI4zSU/aT/qaNUIrWSB4piCro2kndT2kf7jf N5TOJenNubGKhhXxRAx61R7LZ5jtYQHWqx7lqRNZUhtnxuf4gdkR6fTsnmmbFCtoeSJy q/SrzT50sVsBvWtNiHgcPCOS8ZxYFv36qWIrXa2Jgjb7nfsfb9N3RCHXGNFx23qpE/Yr zXQZ/Yzv+NHFj9Ucg1jHsOKpz4wKSSFdi1bhMW+3UymQhvZBBoc1TZE7oT8z/31XaYks iSj5RkkbKZQLXtjmfH9TIbPayJlmrf+jIMWQ+wpGMEE2aPZjJY6nHWigOIJ+zFQJMh2M jLvA== X-Gm-Message-State: AOJu0Yxb85EVYcKTG6u7TmdhJ2aPZ0tmkh6OLeVQ+XxGA5SusJ8dHfBa YoCJtRQJ7jL1Rxr+7/Eb7OA6vPJ46qBW99PCY6LwRu3OFefv2XJoirT3/Es5JajGI1BS/qrP9cK d X-Google-Smtp-Source: AGHT+IFdW0kax42rLgItyEEOWYAkOto/YtbLa80UVJKfCn0MH9m2V6QJhdd1EQujAwwV3XZEmg7iFA== X-Received: by 2002:a05:6402:538d:b0:5c5:c2a7:d535 with SMTP id 4fb4d7f45d1cf-5cba208256bmr2588565a12.16.1729780018684; Thu, 24 Oct 2024 07:26:58 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: "Daniel P. Smith" , Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 1/5] x86/boot: Drop initial_images pointer Date: Thu, 24 Oct 2024 15:26:50 +0100 Message-Id: <20241024142654.989980-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241024142654.989980-1-andrew.cooper3@citrix.com> References: <20241024142654.989980-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1729780047833116600 From: "Daniel P. Smith" Now that the module list is encapsulated inside boot_info, we can do away w= ith the initial_images pointer. No functional change. Signed-off-by: Daniel P. Smith Signed-off-by: Andrew Cooper Reviewed-by: Daniel P. Smith --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Daniel P. Smith v7.5: * Rearranged from several later patches --- xen/arch/x86/setup.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index fc18ba3e35b5..8c10fe51dfad 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -276,8 +276,6 @@ custom_param("acpi", parse_acpi_param); =20 static const char *cmdline_cook(const char *p, const char *loader_name); =20 -static const module_t *__initdata initial_images; - struct boot_info __initdata xen_boot_info =3D { .loader =3D "unknown", .cmdline =3D "", @@ -332,8 +330,8 @@ unsigned long __init initial_images_nrpages(nodeid_t no= de) =20 for ( nr =3D i =3D 0; i < bi->nr_modules; ++i ) { - unsigned long start =3D initial_images[i].mod_start; - unsigned long end =3D start + PFN_UP(initial_images[i].mod_end); + unsigned long start =3D bi->mods[i].mod->mod_start; + unsigned long end =3D start + PFN_UP(bi->mods[i].mod->mod_end); =20 if ( end > node_start && node_end > start ) nr +=3D min(node_end, end) - max(node_start, start); @@ -349,14 +347,13 @@ void __init discard_initial_images(void) =20 for ( i =3D 0; i < bi->nr_modules; ++i ) { - uint64_t start =3D (uint64_t)initial_images[i].mod_start << PAGE_S= HIFT; + uint64_t start =3D pfn_to_paddr(bi->mods[i].mod->mod_start); =20 init_domheap_pages(start, - start + PAGE_ALIGN(initial_images[i].mod_end)); + start + PAGE_ALIGN(bi->mods[i].mod->mod_end)); } =20 bi->nr_modules =3D 0; - initial_images =3D NULL; } =20 static void __init init_idle_domain(void) @@ -1376,8 +1373,6 @@ void asmlinkage __init noreturn __start_xen(void) set_kexec_crash_area_size((u64)nr_pages << PAGE_SHIFT); kexec_reserve_area(); =20 - initial_images =3D mod; - for ( i =3D 0; !efi_enabled(EFI_LOADER) && i < bi->nr_modules; i++ ) { if ( mod[i].mod_start & (PAGE_SIZE - 1) ) --=20 2.39.5