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

Re: [PATCH v9 2/3] xen/domain: adjust domain ID allocation for Arm


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 10 Jun 2025 17:37:33 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org 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=PbxqrnsIriBEvdh9Ma7uJzXr4foBWFsra8GT+/tNARQ=; b=vLIpQG5lVLdMO0lhKuS+xa3N7yQ5CHZCQazWJv9+/QTwzTPE3wy+7/t3t1Tg8VkXFZuik0nXaoTXUTH6BRgLIzFV+qtDh1jhoIMEY/g/xGNBdRdG9c1pGBIUN4s/p7QY4r9kDOqnkhAuHwDxWcfKd1qW87EZJQkCB+4uREg5LvI0yqRzBD0Vv76IlFzRNLjqAY51E/+xDCFw0FgDsaHzVyl1dJhIwEL4Ro0VAagtVESNDJU2Qkr3GOziU3R9J4Fw4cyNroNbTzq1C2XECNbqzMhxv5Y4ucpM2XXmWkSMzIhX6pBjuHOule/ohpThR75VRC5R/LD4e1GGXuMwfFmE6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tb9+zvPpFu5+rycppCogNgojcL6xAF5ZcWkj/oV20wKfBpdr3HJvCEKHs+vS8FApW/YO0Xzv4haGQ9n1NZDA7zphI++KwmNgamRNzV2zl8na/UsrbkwR90hy/A88fOFiSUOg5LQDwFqdVVjkjdIg9SS18Hw/Xj45ld0WoAQY8BlQPPNd+4ok2FS7cj07vdb/vbvb0tRFaT2UTm4L4+Dz9rLdWWIIIRkayZGqSIJrKeCY5Ywrp2E651VqRM4lfdUOb5pi8dZDRWoMfZ/mBSwLXNnZEOIMqXlVebL6cyPyHGcsam2rulhIHhpEv1jLzdWRQvrfK0NpAYL8Xmx7Zbpt7A==
  • Cc: <dmkhn@xxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <anthony.perard@xxxxxxxxxx>, <roger.pau@xxxxxxxxxx>, <teddy.astie@xxxxxxxxxx>, <dmukhin@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 10 Jun 2025 21:38:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-06-10 14:33, Stefano Stabellini wrote:
+Jason

On Tue, 10 Jun 2025, Julien Grall wrote:
But even if we are ok to break compatibility, I don't see the value of
"control_domid". The implication of setting "hardware_domid" is you will
have a separate control domain. At which point, why would it matter to specify
the domain ID?
I just wanted to say that while we (AMD) are looking for a hardware
domain / control domain separation for safety reasons, I don't think we
have a need to specify the domid for either one.

Specifying domids isn't really necessary, but it can be convenience or usability improvement with dom0less/Hyperlaunch. But I don't think control_domid is necessary.

hardware_domid is not used for dom0less/Hyperlaunch with split control and hardware domains. The "capabilities" device tree (DT) property specifies the role of the domain.

Hyperlaunch lets you specify a domid in the DT - there is some auto-allocation logic, but I haven't use it. dom0less doesn't allow specifying a domid today, but it could. dom0less domains are assigned domids sequentially, so you can determine it from the order in the DT.

Knowing the domids can be helpful for configuring userspace, and that only really matters for dom0less/Hyperlaunch. e.g. xenstored wants to know which domid is control.

I think it's nice to have a domid property so that you know when configuring the system which domain is which. You can explicitly read the domid out of the DT and know what it is. Since dom0 userspace needs to refer to domids, this make it clear which domain is which for, as an example, connecting disks.

hardware_domid= is the way of enabling later hardware domain functionality. dom0 boots as dom0. When it creates domid == hardware_domid, that new domain becomes the hardware domain, and dom0 loses hwdom and becomes just the control domain. It's a legacy feature and was a workaround for when Xen could only create a single domain at boot.

Regards,
Jason



 


Rackspace

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