Skip to content

Commit 903bb0c

Browse files
arndbgregkh
authored andcommitted
x86/xen: add CPU dependencies for 32-bit build
[ Upstream commit 93cd059 ] Xen only supports modern CPUs even when running a 32-bit kernel, and it now requires a kernel built for a 64 byte (or larger) cache line: In file included from <command-line>: In function 'xen_vcpu_setup', inlined from 'xen_vcpu_setup_restore' at arch/x86/xen/enlighten.c:111:3, inlined from 'xen_vcpu_restore' at arch/x86/xen/enlighten.c:141:3: include/linux/compiler_types.h:435:45: error: call to '__compiletime_assert_287' declared with attribute error: BUILD_BUG_ON failed: sizeof(*vcpup) > SMP_CACHE_BYTES arch/x86/xen/enlighten.c:166:9: note: in expansion of macro 'BUILD_BUG_ON' 166 | BUILD_BUG_ON(sizeof(*vcpup) > SMP_CACHE_BYTES); | ^~~~~~~~~~~~ Enforce the dependency with a whitelist of CPU configurations. In normal distro kernels, CONFIG_X86_GENERIC is enabled, and this works fine. When this is not set, still allow Xen to be built on kernels that target a 64-bit capable CPU. Fixes: db28323 ("x86/xen: fix percpu vcpu_info allocation") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Tested-by: Alyssa Ross <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 2550d96 commit 903bb0c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/xen/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config XEN
99
select PARAVIRT_CLOCK
1010
select X86_HV_CALLBACK_VECTOR
1111
depends on X86_64 || (X86_32 && X86_PAE)
12+
depends on X86_64 || (X86_GENERIC || MPENTIUM4 || MCORE2 || MATOM || MK8)
1213
depends on X86_LOCAL_APIC && X86_TSC
1314
help
1415
This is the Linux Xen port. Enabling this will allow the

0 commit comments

Comments
 (0)