[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/15] x86/hyperlaunch: introduce the domain builder


  • To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 11 Dec 2024 06:14:18 -0500
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733915663; h=Content-Type: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=3TgrnbL4CAatymIXhWuE2IW+ubJfSKB9fy+QUWuG6bs=; b=XuC0icdz3qqVM6Zoevk+q4RjiCQgLRY/pUZNjtDceWrnYxjzheMBj9CYQMzfiCiXts5w+UZcnYScrsil9vXbc5PRu3yjyQKR4pl6GEm4JywY+Hl0l3uJyOfRGyn5ckw2f6eYUx4+MizKnqvCDaTpXWpthrV53GWbp/Z3B9VPKew=
  • Arc-seal: i=1; a=rsa-sha256; t=1733915663; cv=none; d=zohomail.com; s=zohoarc; b=V/OB6RMlhL4pXjbn9JWIe+DC/Vdbi3x9JySlvENYDEKO1XBbk2iXbbRyj7cD+UiyggVlSNTkdd5nJK+dLyYPx9fDDMJstD+1F7yZc6ylU4apq36daZoDhLGFFpaUJTqXogw51hu7wvVkOH1gqiamqrfyOJIsyo9bk7r1ZtNxXw8=
  • 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: Wed, 11 Dec 2024 11:14:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11/25/24 12:52, Jason Andryuk wrote:
On 2024-11-23 13:20, Daniel P. Smith wrote:
Introduce the domain builder which is capable of consuming a device tree as the first boot module. If it finds a device tree as the first boot module, it will
set its type to BOOTMOD_FDT. This change only detects the boot module and
continues to boot with slight change to the boot convention that the dom0
kernel is no longer first boot module but is the second.

No functional change intended.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>

<snip/>

+            bi->hyperlaunch_enabled = false;
+            bi->mods[0].type = BOOTMOD_FDT;
+            break;
+        default:
+            printk("Unknown error (%d) occured checking for hyperlaunch device tree\n",
+                   ret);
+            bi->hyperlaunch_enabled = false;
+        }
+

Stray blank line

ack.

+    }
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/x86/domain_builder/fdt.c b/xen/arch/x86/ domain_builder/fdt.c
new file mode 100644
index 000000000000..3f9dda8c34c3
--- /dev/null
+++ b/xen/arch/x86/domain_builder/fdt.c
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2024, Apertus Solutions, LLC
+ */
+#include <xen/err.h>
+#include <xen/init.h>
+#include <xen/lib.h>
+#include <xen/libfdt/libfdt.h>
+#include <xen/rangeset.h> /* required for asm/setup.h */

Should asm/setup.h just be changed?

Will drop per the follow-

+
+#include <asm/bootinfo.h>
+#include <asm/page.h>
+#include <asm/setup.h>
+
+#include "fdt.h"
+

diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index e6580382d247..8041aeb3dcfd 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c

@@ -1591,7 +1596,8 @@ void asmlinkage __init noreturn __start_xen(void)
  #endif
      }
-    if ( bi->mods[0].headroom && !bi->mods[0].relocated )
+    i = first_boot_module_index(bi, BOOTMOD_KERNEL);
+    if ( bi->mods[i].headroom && !bi->mods[0].relocated )

Switch .relocated index to i?

ack.

v//r,
dps



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.