[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 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: Mon, 25 Nov 2024 19:05:38 -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=bHUzhEc7ag4FYbCYpJ/G5wIKonovNV4qSMljZEScPNk=; b=GEkMGSijt7JE13gjyT0w6ICSaVHwv1oHLN9AdhhAKmd8kTm5oGHMTiBxbbLQvjoDicTfmTOeJoZ7VFfgyo4NssP4VEw/hAhe4Q+q+BalyzV7KVu3A+3LCaR/UBpMC3s2O9zbB0Mpw2xr1SnnUjB1QMQIOLD7Pz1kSjuhAL/9i0uJjcBN2KfKwpu5h09pYQ6uQaXpK+vND1b/HOCML3KKhRlUogq6Wbgf12xfw9iQltcwFiNRVc4bx9Dp2zAhrO3tTnyfJwxM46wFNz7S9H/JeaxGHtIaSKI2kVhWqsYn1UkpS7bbcD5M9wyz7qAgnzg9PlV59V98sC9kPzOWSCNxVQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Oh86FwKKJqDdx230f21TiH5+Grpw/jHx0/UTd7/VgaG9u8JpHv0mrnETRV1Dtk9N6Ycl1dheQApnvyh45CQhucJg8j+RlC2vw0ofyXvLmMlo0Qti+iGG1DuFMpNoCaGRvIgcidOuyvDEMmHpdCbAPycLf+Uk0hUTguJWwvwFd+0KkHXZMI0ZUKHkUhzy8cUc51JLojW/Ct/XO6YZb6S5l6LVtN/AL6KUbYaZZ4DmJZXbq/JgVqcAX53YfU1K+IJFmuM2TEyyh/QXKpOfxU/8YiLbxEa7RIJ+e7uwA98RgRRYhkmvZjB7Qw/2Ic/tuAbG5SLeM0tXA4X7nGCLQIHulA==
- 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: Tue, 26 Nov 2024 01:47:30 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2024-11-23 13:20, 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.
Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
---
diff --git a/xen/arch/x86/domain_builder/fdt.c
b/xen/arch/x86/domain_builder/fdt.c
index b8ace5c18c6a..d24e265f2378 100644
--- a/xen/arch/x86/domain_builder/fdt.c
+++ b/xen/arch/x86/domain_builder/fdt.c
@@ -197,6 +197,18 @@ static int __init process_domain_node(
bd->max_pages = PFN_DOWN(kb * SZ_1K);
printk(" max memory: %ld\n", bd->max_pages << PAGE_SHIFT);
}
+ if ( match_fdt_property(fdt, prop, "cpus" ) )
I think I forgot to mention it on earlier ones, but I think all these
match_fdt_property() should be chained together with "else if".
With that
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
+ {
+ uint32_t val = UINT_MAX;
+ if ( fdt_prop_as_u32(prop, &val) != 0 )
+ {
+ printk(" failed processing max_vcpus for domain %s\n",
+ name == NULL ? "unknown" : name);
+ return -EINVAL;
+ }
+ bd->max_vcpus = val;
+ printk(" max vcpus: %d\n", bd->max_vcpus);
+ }
}
fdt_for_each_subnode(node, fdt, dom_node)
|