Re: [PATCH] vfio: selftests: Allow builds when ARCH=x86

From: Jason Gunthorpe

Date: Wed Apr 29 2026 - 08:46:42 EST


On Tue, Apr 28, 2026 at 11:27:06PM +0000, David Matlack wrote:
> Allow builds when ARCH=x86 since the top-level Makefile can set ARCH=x86
> even for 64-bit x86 builds.
>
> Note that ARCH=x86 could also indicate a native build on a 32-bit x86
> host. However, it doesn't seem like anyone is building selftests
> natively on 32-bit x86 hosts these days since KVM selftests allow
> ARCH=x86 and fail to compile on 32-bit x86.
>
> If someone reports an issue on 32-bit native builds we can harden the
> KVM and VFIO selftests to explicitly check 64-bit (see the discussion in
> the Closes link below).
>
> Fixes: a55d4bbbe644 ("vfio: selftests: only build tests on arm64 and x86_64")
> Reported-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Closes: https://lore.kernel.org/kvm/20260427231217.GA1670652@xxxxxxxxxx/
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
> ---
> Cc: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> tools/testing/selftests/vfio/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason