From: Ian Campbell Subject: Re: [PATCH 14/38] arm: do not set max_vcpus = 8 in arch_domain_create. Date: Thu, 7 Jun 2012 17:57:01 +0100 Message-ID: <1339088221.22331.6.camel@zakaz.uk.xensource.com> References: <1338565113.17466.141.camel@zakaz.uk.xensource.com> <1338565207-2888-1-git-send-email-ian.campbell@citrix.com> <1338565207-2888-14-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-06-06 at 16:26 +0100, Stefano Stabellini wrote: > On Fri, 1 Jun 2012, Ian Campbell wrote: > > XEN_DOMCTL_max_vcpus cannot reduce max_vcpus and therefore we can't create a > > smaller guest. > > > > The limit of 8 (due to GIC limits) should be expressed elsewhere, likely in > > MAX_VIRT_CPUS -- but making that change caused: > > Are you sure? I made that change and I didn't see the error. > I think this patch should set MAX_VIRT_CPUS to 8 as well as removing > max_vcpus = 8. This was the same heap corruption again as seen in "[PATCH 16/38] arm: Add simple cpu_{sibling,core}_mask" and having fixed that I don't see the crash with MAX_VIRT_CPUS == 8 any more... The patch becomes: >From b68c4abe1dec44f3ed87a0d7ae98f4269043cce3 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 7 Jun 2012 16:52:46 +0000 Subject: [PATCH] arm: do not set max_vcpus = 8 in arch_domain_create. XEN_DOMCTL_max_vcpus cannot reduce max_vcpus and therefore we can't create a smaller guest. The limit of 8 (due to GIC limits) should be expressed in MAX_VIRT_CPUS. Signed-off-by: Ian Campbell --- xen/arch/arm/domain.c | 2 -- xen/include/asm-arm/config.h | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 1336dc4..040a2ce 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -338,8 +338,6 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) goto fail; } - d->max_vcpus = 8; - if ( (rc = domain_vgic_init(d)) != 0 ) goto fail; diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 91e87e1..7d02cc7 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -27,7 +27,7 @@ #define NR_CPUS 128 #endif -#define MAX_VIRT_CPUS 128 /* XXX */ +#define MAX_VIRT_CPUS 8 #define MAX_HVM_VCPUS MAX_VIRT_CPUS #define asmlinkage /* Nothing needed */ -- 1.7.9.1