Skip to contentSkip to conversation

move MAX_VIRT_CPUS into arch header

PATCH New Matt Chapman 1 participant 1 message Jun 14, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 move MAX_VIRT_CPUS into arch header

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

===== xen/include/public/arch-ia64.h 1.10 vs edited =====

xen/include/public/arch-ia64.h +4 -0
@@ -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 =====

xen/include/public/arch-x86_32.h +3 -0
@@ -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 =====

xen/include/public/arch-x86_64.h +3 -0
@@ -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 =====

xen/include/public/xen.h +0 -3
@@ -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.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel