From: Chen Baozi Date: Tue, 30 Jun 2015 08:00:22 +0000 (+0800) Subject: xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2949 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8f853b74df5ceeeda6f55efcb710397827967fd5;p=xen.git xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 After we have increased the size of GICR in address space for guest and made use of both AFF0 and AFF1 in (v)MPIDR, we are now able to support up to 4096 vCPUs in theory. However, it will cost 512M address space for GICR region, which is unnecessarily big at the moment. Considering the max CPU number that GIC-500 can support and the old value of MAX_VIRT_CPUS before commit aa25a61, we increase its value to 128. Signed-off-by: Chen Baozi Acked-by: Ian Campbell --- diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index dbb1ba0cf6..683e3cc200 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -910,7 +910,6 @@ static int vgic_v3_distr_mmio_write(struct vcpu *v, mmio_info_t *info) rank = vgic_rank_offset(v, 64, gicd_reg - GICD_IROUTER, DABT_DOUBLE_WORD); if ( rank == NULL ) goto write_ignore; - BUG_ON(v->domain->max_vcpus > 8); new_irouter = *r; vgic_lock_rank(v, rank, flags); diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 3b23e0519d..817c216f6d 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -47,7 +47,11 @@ #define NR_CPUS 128 #endif +#ifdef CONFIG_ARM_64 +#define MAX_VIRT_CPUS 128 +#else #define MAX_VIRT_CPUS 8 +#endif #define asmlinkage /* Nothing needed */