[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 15/16] x86/hyperlaunch: add max vcpu parsing of hyperlaunch device tree
On Wed Apr 9, 2025 at 11:33 PM BST, Denis Mukhin wrote: > On Tuesday, April 8th, 2025 at 9:07 AM, Alejandro Vallejo <agarciav@xxxxxxx> > wrote: > >> >> >> From: "Daniel P. Smith" dpsmith@xxxxxxxxxxxxxxxxxxxx >> >> >> 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 >> >> Reviewed-by: Jason Andryuk jason.andryuk@xxxxxxx >> >> --- >> xen/arch/x86/dom0_build.c | 3 +++ >> xen/arch/x86/domain-builder/fdt.c | 11 +++++++++++ >> xen/arch/x86/include/asm/boot-domain.h | 2 ++ >> 3 files changed, 16 insertions(+) >> >> diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c >> index 36fb090643..7b3e31a08f 100644 >> --- a/xen/arch/x86/dom0_build.c >> +++ b/xen/arch/x86/dom0_build.c >> @@ -635,6 +635,9 @@ int __init construct_dom0(const struct boot_domain *bd) >> if ( !get_memsize(&dom0_max_size, LONG_MAX) && bd->max_pages ) >> >> dom0_size.nr_pages = bd->max_pages; >> >> >> + if ( opt_dom0_max_vcpus_max == UINT_MAX && bd->max_vcpus ) >> >> + opt_dom0_max_vcpus_max = bd->max_vcpus; >> >> + >> if ( is_hvm_domain(d) ) >> rc = dom0_construct_pvh(bd); >> else if ( is_pv_domain(d) ) >> diff --git a/xen/arch/x86/domain-builder/fdt.c >> b/xen/arch/x86/domain-builder/fdt.c >> index 338b4838c2..5fcb767bdd 100644 >> --- a/xen/arch/x86/domain-builder/fdt.c >> +++ b/xen/arch/x86/domain-builder/fdt.c >> @@ -246,6 +246,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); > > Suggest adding XENLOG_ERR to the error message. And XENLOG_INFO to the one below. Ack. Cheers, Alejandro
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |