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 <dpsm...@apertussolutions.com>
Reviewed-by: Jason Andryuk <jason.andr...@amd.com>
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