[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v4 7/8] xen/arm: introduce nr_spis
We don't have a clear way to know how many virtual SPIs we need for the dom0-less domains. Introduce a new option under xen,domain to specify the number of SPIs to allocate for a domain. The property is optional. When absent, we'll use the physical number of GIC lines for dom0-less domains, just like for dom0. Given that dom0-less VMs are meant for static partitioning scenarios where the number of VMs is very low, increased memory overhead should not be a problem, and it is possible to minimize it using "nr_spis". Remove the old setting of nr_spis based on the presence of the vpl011. Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx> Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> --- Changes in v4: - improve commit message Changes in v3: - improve commit message - introduce nr_spis --- xen/arch/arm/domain_build.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 256c83462a..86cbe4e67b 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2280,7 +2280,6 @@ void __init create_domUs(void) struct domain *d; struct xen_domctl_createdomain d_cfg = { .arch.gic_version = XEN_DOMCTL_CONFIG_GIC_NATIVE, - .arch.nr_spis = 0, .flags = XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap, .max_evtchn_port = -1, .max_grant_frames = 64, @@ -2290,13 +2289,13 @@ void __init create_domUs(void) if ( !dt_device_is_compatible(node, "xen,domain") ) continue; - if ( dt_property_read_bool(node, "vpl011") ) - d_cfg.arch.nr_spis = GUEST_VPL011_SPI - 32 + 1; - if ( !dt_property_read_u32(node, "cpus", &d_cfg.max_vcpus) ) panic("Missing property 'cpus' for domain %s\n", dt_node_name(node)); + if ( !dt_property_read_u32(node, "nr_spis", &d_cfg.arch.nr_spis) ) + d_cfg.arch.nr_spis = gic_number_lines() - 32; + d = domain_create(++max_init_domid, &d_cfg, false); if ( IS_ERR(d) ) panic("Error creating domain %s\n", dt_node_name(node)); -- 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |