From nobody Wed Dec 4 18:59:59 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=1725054513; cv=pass; d=zohomail.com; s=zohoarc; b=kcKQ+BB81LjAxXfrwbZmq8vu7KZiTW3Qq3WtQSjKjl+WZk5nLSH/5U2girVnLlFZGLb8tnJ9kM+8H+dj8reL9kdErt7yh8Nktk3Bud98zPtoLp1ze2mXgVZ2ZSokU7Fc68mKKDA2ao1DCzyP7gTFbSQRdFQdITzzzEdDvyW5hKM= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725054513; 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=AHDLb8T/b80h/7jv5pdrXG2adOVOnBNwTs0CHWLNuOc=; b=Ks4QQMTJxqk9yPBVdLY/C8lVeYxGE7DzNpvnFuwESS2uncR9a1DsC6pHKxw1oTGKX5NNn4+x0LAlfl0GZTk3hlKRHb2iu0wg0W8BVaE2SBIRrLrZKeuneGIBsxXul8A8VvdkpKi7LLo5DMYirNE7RYgzcR+t5JBtZnr/W3eDY0w= 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 172505451305932.755344185448735; Fri, 30 Aug 2024 14:48:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.786657.1196284 (Exim 4.92) (envelope-from ) id 1sk9Td-0005dp-6n; Fri, 30 Aug 2024 21:48:17 +0000 Received: by outflank-mailman (output) from mailman id 786657.1196284; Fri, 30 Aug 2024 21:48:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sk9Td-0005di-1v; Fri, 30 Aug 2024 21:48:17 +0000 Received: by outflank-mailman (input) for mailman id 786657; Fri, 30 Aug 2024 21:48:16 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sk9Tc-0004BO-3H for xen-devel@lists.xenproject.org; Fri, 30 Aug 2024 21:48:16 +0000 Received: from sender4-of-o51.zoho.com (sender4-of-o51.zoho.com [136.143.188.51]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8e3c4ba0-6719-11ef-99a1-01e77a169b0f; Fri, 30 Aug 2024 23:48:14 +0200 (CEST) Received: by mx.zohomail.com with SMTPS id 1725054464189234.4870791649007; Fri, 30 Aug 2024 14:47:44 -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: 8e3c4ba0-6719-11ef-99a1-01e77a169b0f ARC-Seal: i=1; a=rsa-sha256; t=1725054466; cv=none; d=zohomail.com; s=zohoarc; b=GCB88FNkVAkVJ4OErzRK+V0XldeNho6qax4qz6noXdyBPG+ZAZnwX9dhj0fBKxmgtsHfJryPRpR2X8e/kS/NQzK3rnNmBK8tJ71U1lZjsHcNWa8EVJeVFlTI9PXxEdql7U7vIId4Tg21Fnj8GUmNAV2SC0fslgMKHqHBQ5jy1/8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725054466; 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=AHDLb8T/b80h/7jv5pdrXG2adOVOnBNwTs0CHWLNuOc=; b=Scg75RdV6n6c7HabrT/rBUhqT/e7pXIXZnfox1qAgmkzEhp3nkLluGFwHQGv5mlTEO603hc5MbAAvLhtFhtQMJegvxX218U/sCfc3dzGWL8H+j+O6ZVXHRQOymGekBx7CmyPbe0Wn9nJOgPdxTEqqDg3UvnoOzZG8lNQvcsOkpM= 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=1725054466; 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=AHDLb8T/b80h/7jv5pdrXG2adOVOnBNwTs0CHWLNuOc=; b=X1YUFfg/0Gkk09gpid6a1UXiO/0l3eDj08+fSxYHIxheOGJHh8uxik4mGZemS9X7 DhfYvj6pFSP7crpfiAvd/PKM0yQgmQ3X9bnI1Kzg+VT6NK/fIkdOIFrKqu791PxFD6E LEKVCa7zdRbCstp3wa9P0IFqhuOrmwZ8vpm3WzAs= 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 04/44] x86/boot: move mmap info to boot info Date: Fri, 30 Aug 2024 17:46:49 -0400 Message-Id: <20240830214730.1621-5-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: 1725054514595116600 Content-Type: text/plain; charset="utf-8" Transition the memory map info to be held in struct boot_info. No functional change intended. Signed-off-by: Daniel P. Smith --- xen/arch/x86/include/asm/bootinfo.h | 5 +++++ xen/arch/x86/setup.c | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/bootinfo.h b/xen/arch/x86/include/asm= /bootinfo.h index d2ca077d2356..e785ed1c5982 100644 --- a/xen/arch/x86/include/asm/bootinfo.h +++ b/xen/arch/x86/include/asm/bootinfo.h @@ -8,11 +8,16 @@ #ifndef __XEN_X86_BOOTINFO_H__ #define __XEN_X86_BOOTINFO_H__ =20 +#include + struct boot_info { unsigned int nr_mods; =20 const char *boot_loader_name; const char *cmdline; + + paddr_t mmap_addr; + uint32_t mmap_length; }; =20 #endif diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index a945fa10555f..c6b45ced00ae 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -297,6 +297,12 @@ static void __init multiboot_to_bootinfo(multiboot_inf= o_t *mbi) else info.cmdline =3D ""; =20 + if ( mbi->flags & MBI_MEMMAP ) + { + info.mmap_addr =3D mbi->mmap_addr; + info.mmap_length =3D mbi->mmap_length; + } + boot_info =3D &info; } =20 @@ -1200,13 +1206,13 @@ void asmlinkage __init noreturn __start_xen(unsigne= d long mbi_p) { memmap_type =3D "Xen-e820"; } - else if ( mbi->flags & MBI_MEMMAP ) + else if ( boot_info->mmap_addr ) { memmap_type =3D "Multiboot-e820"; - while ( bytes < mbi->mmap_length && + while ( bytes < boot_info->mmap_length && e820_raw.nr_map < ARRAY_SIZE(e820_raw.map) ) { - memory_map_t *map =3D __va(mbi->mmap_addr + bytes); + memory_map_t *map =3D __va(boot_info->mmap_addr + bytes); =20 /* * This is a gross workaround for a BIOS bug. Some bootloaders= do --=20 2.30.2