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

Re: [RFC 32/38] x86/hyperlaunch: introduce concept of core domains


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 23 Apr 2025 15:50:49 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=apertussolutions.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dG2gxwgZ9eOzJ57KdBshiu5VKzjV/ATE/1RPuNW0+zU=; b=F+jvMqWkug5+KNDMyfA4I1j45lD38cJh3lZ3VUFksoVBhbaZDbjIXHe6qqQh8SX+hYlTicVlSNk+GQmep82VgJhNwDr20li4+n5YX62OQqOzNRfW5w2TfJZQ9ULt+oibIu76kuKoi0gtMVtdxLu4osaZH3304fgfds3OS5A3rqWn4yaAX+2OyDSsKdwefC8F6ZVg5Fr3AcxwLRAOGmk9pt8cGqLjf9+hohCBFmsXDBCoTLSygBOyAT33cRZQS+8IYyDwPCHx+cmIfcDf7ImPV0HD0qlQeNhAFBaPHHegA10zJThfVtHtBF8Kzc+IHEqbB5DJ1Eos+O5Rn9fnB/363A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jEVNtLcTzuVRQryFRFhuhjafKqD0459nhbWN7lunc+gox4FRpkGpr4yMpRQRT6LA+v02h7fbXJfcEIMjMsKzB1RvlzaK+wpzL/AA2Wg518gTj/GXtuABnYg3pHfQu9A3uvmh9ipWarIV0YmCl32YSxIzwTixPqHSRW9CC4tZy245Bc95fWBJke3A+wEly91UKVYSaoKk5uq+frjyLBebSGppaJq4fN0KSuMlqtfjuIIDfn05zlUFQmIZYKMqkH+04JLbEjRhVzVGAWcUMtHnJo7R8St6yO8ueFXE9lqchRa7sZ2LnNE48l8IMlxiZN19JuGMfiF9TK4+AWMSrSDALQ==
  • Cc: <stefano.stabellini@xxxxxxx>, <agarciav@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 23 Apr 2025 19:51:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-04-19 18:08, Daniel P. Smith wrote:
When constructing domU, and specifically the event channels for their console
and xenstore event channels, the domid for the backing domain must be known.
Therefore, the control, hardware, and xenstore domains are deemed as core
domains, and must be constructed before any of the other domains.

This commit introduces the build_core_domains() function that will ensure the
core domains are constructed first.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
  xen/arch/x86/domain-builder/core.c     | 68 ++++++++++++++++++++++++--
  xen/arch/x86/include/asm/boot-domain.h |  2 +
  2 files changed, 66 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/domain-builder/core.c 
b/xen/arch/x86/domain-builder/core.c
index 901efce62a61..f693aa46d278 100644
--- a/xen/arch/x86/domain-builder/core.c
+++ b/xen/arch/x86/domain-builder/core.c
@@ -103,18 +103,78 @@ void __init builder_init(struct boot_info *bi)
      }
  }
+static int __init build_core_domains(struct boot_info *bi)
+{
+    int count = 0;
+    struct boot_domain *bd;
+    int hw, cd, xs;
+
+    cd = first_boot_domain_index(bi, BUILD_CAPS_CONTROL);

+    hw = first_boot_domain_index(bi, BUILD_CAPS_HARDWARE);

+    xs = first_boot_domain_index(bi, BUILD_CAPS_XENSTORE);

This order has issues if you actually have disaggregated domains.

Control and Hardware depend on Xenstore for Xenstore.

Control and Xenstore depend on Hardware for console support.

I re-worked the xenstore allocation to run after domain creation. I've upstreamed that for dom0less (and ARM doesn't have to deal with consoles).

So if xenstore allocation is moved later, Hardware, Xenstore, then Control works. But xenstore and console could both be handled after the fact and then the construction order doesn't matter. The backend domid is needed to construct the event channel and grant entry. With assigned domids, alloc_store_evtchn()/alloc_console_evtchn() can operate on the domids instead of expecting the domain to have been constructed.

Regards,
Jason



 


Rackspace

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