[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 5/6] xen/arm: introduce nr_spis
We don't have a clear way to know how many virtual SPIs we need for the boot domains. Introduce a new option under xen,domain to specify the number of SPIs to allocate for the domain. The property is optional, when absent, we'll use the physical number of gic lines for dom0less domains, just like for dom0. Given that dom0less 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 minimizing it by using "nr_spis". Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx> --- 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 0057a509d1..fc4e5bc4ca 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2270,7 +2270,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, @@ -2280,13 +2279,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 |