On 2026-04-28 07:55 PM, Jason Gunthorpe wrote: > On Tue, Apr 28, 2026 at 03:53:01PM -0700, David Matlack wrote: > > > > If it is then we don't even need the __LP64__ stuff I posted. > > > > > > > > But when I look at the top-level Makefile and imagine running make > > > > without setting ARCH on the command line on a 32-bit x86 host, ARCH > > > > will be set to SUBARCH, which will be x86. > > > > > > Yep. So the big question is, why doesn't anyone complain about KVM > > > selftests not > > > building on 32-bit? Because they most definitely don't build. > > > > I guess no one's building on 32-bit hosts anymore? :) > > Well, if that's the case and kvm is broken too, then just ignore it > and turn on vfio for x86 like kvm does? > > No sense in just fixing it for VFIO..
That's fair... So something like this? From: David Matlack <[email protected]> Date: Tue, 28 Apr 2026 22:57:48 +0000 Subject: [PATCH] vfio: selftests: Allow builds when ARCH=x86 Allow builds when ARCH=x86 since the top-level Makefile can set ARCH=x86 even for 64-bit x86 builds. ARCH=x86 can also be set if the host is 32-bit x86, but based on the fact that KVM selftests allow ARCH=x86 but also don't build for 32-bit x86, this isn't an issue in practice. Reported-by: Jason Gunthorpe <[email protected]> Signed-off-by: David Matlack <[email protected]> diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile index 0684932d91bf..40165d087a0b 100644 --- a/tools/testing/selftests/vfio/Makefile +++ b/tools/testing/selftests/vfio/Makefile @@ -1,6 +1,6 @@ ARCH ?= $(shell uname -m) -ifeq (,$(filter $(ARCH),aarch64 arm64 x86_64)) +ifeq (,$(filter $(ARCH),aarch64 arm64 x86 x86_64)) # Do nothing on unsupported architectures include ../lib.mk else /usr/local/google/home/dmatlack/kernel/trees/vfio

