[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 15/15] x86/hyperlaunch: add capabilities to boot domain
On 12/2/24 07:23, Jan Beulich wrote: On 23.11.2024 19:20, Daniel P. Smith wrote:--- a/xen/arch/x86/domain_builder/fdt.c +++ b/xen/arch/x86/domain_builder/fdt.c @@ -209,6 +209,19 @@ static int __init process_domain_node( bd->max_vcpus = val; printk(" max vcpus: %d\n", bd->max_vcpus); } + if ( match_fdt_property(fdt, prop, "capabilities" ) ) + { + if ( fdt_prop_as_u32(prop, &bd->capabilities) != 0 ) + { + printk(" failed processing domain id for domain %s\n", + name == NULL ? "unknown" : name); + return -EINVAL; + } + printk(" caps: "); + if ( bd->capabilities & BUILD_CAPS_CONTROL ) + printk("c"); + printk("\n"); + }What if any of the other bits is set? I'm not sure what you are getting at, but there is another cap added later for HARDWARE and it will print an 'h' next to the 'c' if set. --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -992,6 +992,7 @@ static size_t __init domain_cmdline_size( static struct domain *__init create_dom0(struct boot_info *bi) { char *cmdline = NULL; + int create_flags = 0;Once again unsigned int please. ack. @@ -1023,7 +1024,10 @@ static struct domain *__init create_dom0(struct boot_info *bi) /* Create initial domain. Not d0 for pvshim. */ if ( bd->domid == DOMID_INVALID ) bd->domid = get_initial_domain_id(); - d = domain_create(bd->domid, &dom0_cfg, pv_shim ? 0 : CDF_privileged); + if ( bd->capabilities & BUILD_CAPS_CONTROL ) + create_flags |= CDF_privileged;Nit: Indentation. ack. v/r, dps
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |