Skip to contentSkip to conversation

Allow Hypervisor build with more than 64 CPUs

PATCH In review Bill Burns 2 participants 2 messages Aug 15, 2008 – Aug 17, 2008

Subsystems (2)
lore
Share & tools
lore

Bill Burns

author
#0 lore raw

PATCH 1/1 Allow Hypervisor build with more than 64 CPUs

Trying to build the Xen hypervisor with max_phys_cpus=128 for x86_64 fails. (Note that this was on a 3.1 base, but unstable appears to have the same issue).

There is a build assertion due to the size of the page_info structure and the shadow_page_info structures get out of sync due to the presence of cpumask_t in the page info structure (which grows with more than 64 CPUs).

The proposed fix is to tack on the following to the end of shadow_page_info structure.

Kudo's to Eduardo Habkost for the workaround.

arch/x86/mm/shadow/private.h renamed from arch/x86/mm/shadow/private.h.orig +6 -0
@@ -243,6 +243,12 @@ struct shadow_page_info
         /* For non-pinnable shadows, a higher entry that points at us */
         paddr_t up;
     };
+#if NR_CPUS > 64
+    /* Need to add some padding to match struct page_info size,
+    * if cpumask_t is larger than a long
+    */
+    u8 padding[sizeof(cpumask_t)-sizeof(long)];
+#endif
 };
#1 lore raw
Quoted 4 lines · Bill Burns

Trying to build the Xen hypervisor with max_phys_cpus=128 for x86_64 fails. (Note that this was on a 3.1 base, but unstable appears to have the same issue).

Quoted 8 lines

There is a build assertion due to the size of the page_info structure and the shadow_page_info structures get out of sync due to the presence of cpumask_t in the page info structure (which grows with more than 64 CPUs).

The proposed fix is to tack on the following to the end of shadow_page_info structure.

This should be fixed in c/s 18324 by relaxing the BUILD_BUG_ON().

-- Keir