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

Re: [PATCH v2 14/15] x86/hyperlaunch: add max vcpu parsing of hyperlaunch device tree


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 15 Jan 2025 14:40:17 -0500
  • 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=udt1fbaIw7+u/kBiW+PlOwvsGK27pKZIQeuT72Zs2hg=; b=PGqnS2Od4j+3SkJmgW3p0sAx0X7ii4QIV0xl2fRnUoeL2z2aVCro1qaZpktgUJOym1mVFhoP4yitcf7kLmBgpvDUBEhriGxWvLgQJFZWt39bwTNJQgaRo7h1z+m3JmuSAI0rSFLoWMsrH6HWBPz8FJt3mSde/mvyLY24b6dOLsx4hTWc2ZgNAsD/27dxCoRAp4N04YrOeIU4HlyZLEZH0JpjlbpMrh1+i+DXduoxqj2Tuz4CpJxUwlvSmrxL8Y7K5U30OuwZ+JuSbTMVswqJ4b2yFiKsxEizR3lJ1s+Hx/A81LEA0+1X29KnHbt5dFiwCDIQA6w/v5k2c6uIbMSxdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kghExDesPkVx+i/z4CqhbWzKEk0uDhzmc+qtnfNbVMX9cgWPfw2E7JbEoO4NLyJPqNmslSSZ+CQSvPvNUERV6tmBiAaLdcGLnawBTXWnOIG14Vd/qxxCmI87sozKsj/WeqZe+psouLktM+5Nnu0FSzT0sWEjM/tsPDPHgsR7i6lV5+MyH+mpuuVD92+Jx7kbO74Vz2+uqA8GnDFKu+/ZslwEClAX4WGV9W5tGgudgeIOsRLoZuM9SkjXsHMK9n/vnPr7amoA1VTFV/WgwdG+8cGRdI+/EN0bNhS+ljj8Z9FW2S4ZrYWrpKR6xWuDH8TlBoYsYd8BE6f5h/z/ByXmIg==
  • 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, 15 Jan 2025 19:40:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2024-12-26 11:57, Daniel P. Smith wrote:
Introduce the `cpus` property, named as such for dom0less compatibility, that
represents the maximum number of vpcus to allocate for a domain. In the device
tree, it will be encoded as a u32 value.

s/vpcus/vcpus/

I would remove "maximum". Today, the DT only has `cpus`, and you get all of them. So implicitly cpus=max_vcpus.

I could see a future max_vcpus property. In that case, you would get `cpus` online and the rest offline.

Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

diff --git a/xen/arch/x86/domain-builder/fdt.c 
b/xen/arch/x86/domain-builder/fdt.c
index aff1b8c3235d..70a793db199b 100644
--- a/xen/arch/x86/domain-builder/fdt.c
+++ b/xen/arch/x86/domain-builder/fdt.c
@@ -147,6 +147,17 @@ static int __init process_domain_node(
              bd->max_pages = PFN_DOWN(kb * SZ_1K);
              printk("  max memory: %ld kb\n", kb);
          }
+        else if ( strncmp(prop_name, "cpus", name_len) == 0 )
+        {
+            uint32_t val = UINT_MAX;
+            if ( fdt_prop_as_u32(prop, &val) != 0 )
+            {
+                printk("  failed processing max_vcpus for domain %s\n", name);

s/max_vcpus/cpus/

Regards,
Jason



 


Rackspace

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