[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2 6/8] tools/libxl: Make DT node of GICv3 according to max_vcpus
From: Chen Baozi <baozich@xxxxxxxxx> Since the size of GICR is determined by the number of CPU cores, add 'nr_cpus' parameter when creating its DT node and set gicr0_size dynamically. Signed-off-by: Chen Baozi <baozich@xxxxxxxxx> --- tools/libxl/libxl_arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index c5088c4..75d2aed 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -407,13 +407,13 @@ static int make_gicv2_node(libxl__gc *gc, void *fdt, return 0; } -static int make_gicv3_node(libxl__gc *gc, void *fdt) +static int make_gicv3_node(libxl__gc *gc, void *fdt, const int nr_cpus) { int res; const uint64_t gicd_base = GUEST_GICV3_GICD_BASE; const uint64_t gicd_size = GUEST_GICV3_GICD_SIZE; const uint64_t gicr0_base = GUEST_GICV3_GICR0_BASE; - const uint64_t gicr0_size = GUEST_GICV3_GICR0_SIZE; + const uint64_t gicr0_size = GUEST_GICV3_RDIST_STRIDE * nr_cpus; const char *name = GCSPRINTF("interrupt-controller@%"PRIx64, gicd_base); res = fdt_begin_node(fdt, name); @@ -640,7 +640,7 @@ next_resize: GUEST_GICC_BASE, GUEST_GICC_SIZE) ); break; case XEN_DOMCTL_CONFIG_GIC_V3: - FDT( make_gicv3_node(gc, fdt) ); + FDT( make_gicv3_node(gc, fdt, info->max_vcpus) ); break; default: LOG(ERROR, "Unknown GIC version %s", -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |