From: Matt Chapman Subject: [PATCH] move MAX_VIRT_CPUS into arch header Date: Tue, 14 Jun 2005 14:51:49 -0600 Message-ID: <20050614205149.GA32227@kirby.fc.hp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This patch moves the definition of MAX_VIRT_CPUS from xen.h into arch-${ARCH}.h (which is included from xen.h). The initial reason is that the current value of MAX_VIRT_CPUS overflows the shared_info page on ia64. Eventually we plan to move the VCPU data onto separate pages. However, this is an interim fix and I imagine that the value of MAX_VIRT_CPUS may indeed be architecture-dependent - for example, longer bitmasks on a 64-bit machine may make it easier to support more virtual CPUs. Matt Signed-off-by: Matthew Chapman --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="max-virt-cpus.patch" ===== xen/include/public/arch-ia64.h 1.10 vs edited ===== --- 1.10/xen/include/public/arch-ia64.h Fri Jun 10 16:34:29 2005 +++ edited/xen/include/public/arch-ia64.h Tue Jun 14 14:37:56 2005 @@ -14,6 +14,10 @@ #define _MEMORY_PADDING(_X) #define MEMORY_PADDING +/* Maximum number of virtual CPUs in multi-processor guests. */ +/* WARNING: before changing this, check that shared_info fits on a page */ +#define MAX_VIRT_CPUS 1 + #ifndef __ASSEMBLY__ /* NB. Both the following are 64 bits each. */ ===== xen/include/public/arch-x86_32.h 1.39 vs edited ===== --- 1.39/xen/include/public/arch-x86_32.h Wed Jun 1 03:49:23 2005 +++ edited/xen/include/public/arch-x86_32.h Tue Jun 14 14:37:15 2005 @@ -73,6 +73,9 @@ #define machine_to_phys_mapping ((u32 *)HYPERVISOR_VIRT_START) #endif +/* Maximum number of virtual CPUs in multi-processor guests. */ +#define MAX_VIRT_CPUS 32 + #ifndef __ASSEMBLY__ /* NB. Both the following are 32 bits each. */ ===== xen/include/public/arch-x86_64.h 1.41 vs edited ===== --- 1.41/xen/include/public/arch-x86_64.h Fri Jun 10 02:25:43 2005 +++ edited/xen/include/public/arch-x86_64.h Tue Jun 14 14:37:42 2005 @@ -73,6 +73,9 @@ #define HYPERVISOR_VIRT_END (0xFFFF880000000000UL) #endif +/* Maximum number of virtual CPUs in multi-processor guests. */ +#define MAX_VIRT_CPUS 32 + #ifndef __ASSEMBLY__ /* The machine->physical mapping table starts at this address, read-only. */ ===== xen/include/public/xen.h 1.133 vs edited ===== --- 1.133/xen/include/public/xen.h Fri Jun 10 16:34:29 2005 +++ edited/xen/include/public/xen.h Tue Jun 14 14:38:13 2005 @@ -287,9 +287,6 @@ /* Event channel endpoints per domain. */ #define NR_EVENT_CHANNELS 1024 -/* Support for multi-processor guests. */ -#define MAX_VIRT_CPUS 32 - /* * Per-VCPU information goes here. This will be cleaned up more when Xen * actually supports multi-VCPU guests. --OgqxwSJOaUobr8KG Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --OgqxwSJOaUobr8KG--