linux-stable/arch
Arnd Bergmann 6214f5c966 x86/xen: add CPU dependencies for 32-bit build
[ Upstream commit 93cd059764 ]

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: db2832309a ("x86/xen: fix percpu vcpu_info allocation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Tested-by: Alyssa Ross <hi@alyssa.is>
Link: https://lore.kernel.org/r/20231204084722.3789473-1-arnd@kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-01 12:42:35 +00:00
..
alpha
arc
arm ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init 2024-01-01 12:42:26 +00:00
arm64 arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3 2024-01-01 12:42:25 +00:00
csky
hexagon
ia64
loongarch LoongArch: Implement constant timer shutdown interface 2023-12-20 17:01:58 +01:00
m68k
microblaze
mips MIPS: Loongson64: Enable DMA noncoherent support 2023-12-13 18:45:35 +01:00
nios2
openrisc
parisc parisc: Fix asm operand number out of range build error in bug table 2023-12-13 18:45:30 +01:00
powerpc cred: get rid of CONFIG_DEBUG_CREDENTIALS 2023-12-20 17:01:51 +01:00
riscv kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP 2023-12-20 17:02:03 +01:00
s390 s390/vx: fix save/restore of fpu kernel context 2024-01-01 12:42:26 +00:00
sh sh: bios: Revive earlyprintk support 2023-11-20 11:59:22 +01:00
sparc sparc32: fix a braino in fault handling in csum_and_copy_..._user() 2023-10-27 20:06:06 -04:00
um
x86 x86/xen: add CPU dependencies for 32-bit build 2024-01-01 12:42:35 +00:00
xtensa
.gitignore
Kconfig