From nobody Wed Dec 4 19:43:28 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=1729472228; cv=pass; d=zohomail.com; s=zohoarc; b=hPzFlo7u6dSjdbHClfbB9tGHbT1Is0yCbSZcY5uRmCogsaG80tr11c3HMr2cRhbarH12klsskKErBKqQaImQ2t36dQsKrA17iqHSQQGXMI72JFSdyquK4Em9qK2h8D/jM8JfiB9gOfOCQB8gvTd/8hgQfIsLuWUi54PYnfmBpeQ= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729472228; 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=SP/LZEnrjEkSEMtxaAJe6x6uyzbbJYUTQUInZxcjnQE=; b=b/w7oBNvUl32504bI3l5dYTw94NcHL2mp83+hvupn3M6579CC4fSuLnWFaII4F6aFlx8C5RqEKKZfqQw58xXUS0Kj2CGUy8vHfhQSu8T2KMXPPRO60AZBpFl43BBGJvzoWsMwVUhfNBueICwBXUriymi7iQn7c7SSJFrjzjP/d8= 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 1729472228609248.41304377181496; Sun, 20 Oct 2024 17:57:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.822963.1236942 (Exim 4.92) (envelope-from ) id 1t2gip-0000lm-MK; Mon, 21 Oct 2024 00:56:35 +0000 Received: by outflank-mailman (output) from mailman id 822963.1236942; Mon, 21 Oct 2024 00:56:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t2gip-0000lf-J8; Mon, 21 Oct 2024 00:56:35 +0000 Received: by outflank-mailman (input) for mailman id 822963; Mon, 21 Oct 2024 00:56:33 +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 1t2gdL-0001i1-5T for xen-devel@lists.xenproject.org; Mon, 21 Oct 2024 00:50:55 +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 85e2359c-8f46-11ef-a0be-8be0dac302b0; Mon, 21 Oct 2024 02:50:54 +0200 (CEST) Received: by mx.zohomail.com with SMTPS id 1729471624314615.4554817379054; Sun, 20 Oct 2024 17:47:04 -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: 85e2359c-8f46-11ef-a0be-8be0dac302b0 ARC-Seal: i=1; a=rsa-sha256; t=1729471626; cv=none; d=zohomail.com; s=zohoarc; b=i30lf8G+k/jQfGtNSeGKOCqI68IMmUoWwWcBaXzwK2jtXy6qKxgotbJp8GcH3YILB/znM2CpC5fhWAIOCjWix0yGhDC1nn3SDjBJL9NoK6mPS4tODrn1oaORhYFNLOr+Wbf/jKC/xOxQFick1LEOx8jQw4iBHuAb4agLj/m4Ctg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729471626; 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=SP/LZEnrjEkSEMtxaAJe6x6uyzbbJYUTQUInZxcjnQE=; b=ZC/Ja/iy4CecbkMHRdrE8sPL2DerYU8qTnccbOlu7f7mF06+0lOUqrGpBgt71Z4u3qNoS4iD5GDIaXe5D6RNkmd6ZGHrX68yGtglO2Lo5hS/SAN9Z8XNVhLud5tDzpYiJEjP3EqTcsH8vNK3zSb18kT7b5nJLRiLGS9PDG+iTd4= 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=1729471626; 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=SP/LZEnrjEkSEMtxaAJe6x6uyzbbJYUTQUInZxcjnQE=; b=Ei/E3zLwLQ1W4eaCfIMHpufN0xqQlLOUE3IfHKrSjpMlhI6khcNG9WzPWNjUuQ/4 HMPli8dtCpuEGWGqmVU41onFqoAGtaGLCetK8MM3E6JU9147deMT11PxZEI1ZBEVcb1 kPE6GRBVlEb9wKoC95KKdVTQQvKKOJpl2B7LsIdw= From: "Daniel P. Smith" To: xen-devel@lists.xenproject.org Cc: "Daniel P. Smith" , jason.andryuk@amd.com, christopher.w.clark@gmail.com, stefano.stabellini@amd.com, Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v7 35/38] x86/boot: add struct domain to struct boot_domain Date: Sun, 20 Oct 2024 20:46:10 -0400 Message-Id: <20241021004613.18793-36-dpsmith@apertussolutions.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20241021004613.18793-1-dpsmith@apertussolutions.com> References: <20241021004613.18793-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: 1729472229527116600 Content-Type: text/plain; charset="utf-8" Store a reference to the created domain in struct boot_domain. Signed-off-by: Daniel P. Smith --- Changes since v5: - moved back to using variable *d to hold domain reference locally --- xen/arch/x86/include/asm/bootdomain.h | 3 +++ xen/arch/x86/setup.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/bootdomain.h b/xen/arch/x86/include/a= sm/bootdomain.h index 00f7d9267965..2322c459e36a 100644 --- a/xen/arch/x86/include/asm/bootdomain.h +++ b/xen/arch/x86/include/asm/bootdomain.h @@ -10,6 +10,7 @@ =20 #include =20 +struct domain; struct boot_module; =20 struct boot_domain { @@ -19,6 +20,8 @@ struct boot_domain { =20 struct boot_module *kernel; struct boot_module *ramdisk; + + struct domain *d; }; =20 #endif diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 47b705097dd3..9423e999990a 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1028,10 +1028,12 @@ static struct domain *__init create_dom0(struct boo= t_info *bi) } } =20 + bd->d =3D d; + if ( construct_dom0(d, bd->kernel, bd->ramdisk, bd->cmdline) !=3D 0 ) panic("Could not construct domain 0\n"); =20 - return d; + return bd->d; } =20 /* How much of the directmap is prebuilt at compile time. */ --=20 2.30.2