From nobody Wed Dec 4 19:13:05 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 header.i=dpsmith@apertussolutions.com; 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; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) ARC-Seal: i=2; a=rsa-sha256; t=1725055025; cv=pass; d=zohomail.com; s=zohoarc; b=nfhfj98l13O1EPH3pGWZ+dwztHwNWWcE325x9rZl6ru3tBzO8GgA7duKmpU5lv+gqxLn3jLAT8jzeIiFNHOIOhySi70rMeVYKVk+kAlqMDo9PWgcGpz8lVUwvRho5MxzReYoUa+JSP5a4tlUyARuwdCIZo2O95TDVnjWny2mbac= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725055025; h=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=vMlkGiuGcxaWfLc66KQ7uFjoPq32SrNVLlk/N0KOM60=; b=Emq0an0dATBc25mSDquyXUVfGiSE2I2B5B3UGwqw3+whwVUXQ03uTo5qjgi3WqhPb4rmV/dc3035LSXHF9dJy+VZHDlGdgLGdX9zFpxMLlWJT3XL5+9OkgecD+f+mrnqwEUE5ph+6G4XW40PE/OwLiFuMZIE0cYkg5XGRrf8P8w= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass header.i=dpsmith@apertussolutions.com; 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; arc=pass (i=1 dmarc=pass fromdomain=apertussolutions.com) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 172505502568794.93562047551757; Fri, 30 Aug 2024 14:57:05 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.786823.1196634 (Exim 4.92) (envelope-from ) id 1sk9bs-0000p6-Ky; Fri, 30 Aug 2024 21:56:48 +0000 Received: by outflank-mailman (output) from mailman id 786823.1196634; Fri, 30 Aug 2024 21:56:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sk9bs-0000nT-Bf; Fri, 30 Aug 2024 21:56:48 +0000 Received: by outflank-mailman (input) for mailman id 786823; Fri, 30 Aug 2024 21:56:47 +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 1sk9Uh-00065G-SA for xen-devel@lists.xenproject.org; Fri, 30 Aug 2024 21:49:23 +0000 Received: from sender4-of-o51.zoho.com (sender4-of-o51.zoho.com [136.143.188.51]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b6d802c6-6719-11ef-a0b1-8be0dac302b0; Fri, 30 Aug 2024 23:49:22 +0200 (CEST) Received: by mx.zohomail.com with SMTPS id 1725054474029613.6614984690195; Fri, 30 Aug 2024 14:47:54 -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: b6d802c6-6719-11ef-a0b1-8be0dac302b0 ARC-Seal: i=1; a=rsa-sha256; t=1725054476; cv=none; d=zohomail.com; s=zohoarc; b=OqXVWMl7VaK78DNscKnrvJshV2lLeRxJIRCTAN5X0CgXklka61qAYSml/8DkGzuOxyD9BvlGER25Ai10Uol2gbB1DsirSLX9l7oCeq9X1wcuYsPJG0mRR106kwAMqpyD6k7vfcFjg0r/mqBJHYOfMEiXIR4ISuVIj/JG6Jb1qYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725054476; 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=vMlkGiuGcxaWfLc66KQ7uFjoPq32SrNVLlk/N0KOM60=; b=NGq0XhVOBECsmQ6LU85OvMFXVEPB9xNZ1U9G0ZnqmUu7ncfoN53tMnfbcwekmMhp5i08d9AoQkcl3J4IVdlQnkLF5nLqEuy+VrMg8XgEyD1eSfUtfC48BUcGRqDB7Q64hZBOIoZ/wPEPrC4DYrjwso+lM0Ya7t0fOCATB3MwTBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@apertussolutions.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1725054476; s=zoho; d=apertussolutions.com; i=dpsmith@apertussolutions.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=vMlkGiuGcxaWfLc66KQ7uFjoPq32SrNVLlk/N0KOM60=; b=Q7/nsgQyLuK3bygbmw0vF7wqJhUdup2FoXX66y36jqPe03uVNLFpT1+U6DdIADwy AlXAp227+zkOpIJHGZc5iqJNQlWpzYH378zrS8RA3hOFL00XsUf1443Pgwh6nyiDl47 mobJUlJlHT9l1yKrNKpCHE7dC6msK/PvbqzkUEcM= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: "Daniel P. Smith" , jason.andryuk@amd.com, christopher.w.clark@gmail.com, Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v4 13/44] x86/boot: update struct boot_module on module relocation Date: Fri, 30 Aug 2024 17:46:58 -0400 Message-Id: <20240830214730.1621-14-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240830214730.1621-1-dpsmith@apertussolutions.com> References: <20240830214730.1621-1-dpsmith@apertussolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-ZohoMail-DKIM: pass (identity dpsmith@apertussolutions.com) X-ZM-MESSAGEID: 1725055027116116600 Content-Type: text/plain; charset="utf-8" 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 --- xen/arch/x86/setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 021c5699f86c..27517d24b2ea 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1408,8 +1408,10 @@ 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. */ - boot_info->mods[idx].early_mod->mod_start =3D virt_to_mfn(_stext); - boot_info->mods[idx].early_mod->mod_end =3D __2M_rwdata_end - _ste= xt; + boot_info->mods[idx].start =3D boot_info->mods[idx].early_mod->mod= _start + =3D virt_to_mfn(_stext); + boot_info->mods[idx].size =3D boot_info->mods[idx].early_mod->mod_= end + =3D __2M_rwdata_end - _stext; } =20 boot_info->mods[0].headroom =3D bzimage_headroom( --=20 2.30.2