public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vfio: selftests: Allow builds when ARCH=x86
@ 2026-04-28 23:27 David Matlack
  2026-04-29 12:46 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: David Matlack @ 2026-04-28 23:27 UTC (permalink / raw)
  To: kvm, linux-kernel, linux-kselftest
  Cc: Alex Williamson, David Matlack, Sean Christopherson, Shuah Khan,
	Ted Logan, Jason Gunthorpe

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@nvidia.com>
Closes: https://lore.kernel.org/kvm/20260427231217.GA1670652@nvidia.com/
Signed-off-by: David Matlack <dmatlack@google.com>
---
Cc: Sean Christopherson <seanjc@google.com>

 tools/testing/selftests/vfio/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

base-commit: 2a4c0c11c0193889446cdb6f1540cc2b9aff97dd
-- 
2.54.0.545.g6539524ca2-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vfio: selftests: Allow builds when ARCH=x86
  2026-04-28 23:27 [PATCH] vfio: selftests: Allow builds when ARCH=x86 David Matlack
@ 2026-04-29 12:46 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2026-04-29 12:46 UTC (permalink / raw)
  To: David Matlack
  Cc: kvm, linux-kernel, linux-kselftest, Alex Williamson,
	Sean Christopherson, Shuah Khan, Ted Logan

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@nvidia.com>
> Closes: https://lore.kernel.org/kvm/20260427231217.GA1670652@nvidia.com/
> Signed-off-by: David Matlack <dmatlack@google.com>
> ---
> Cc: Sean Christopherson <seanjc@google.com>
> 
>  tools/testing/selftests/vfio/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-29 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 23:27 [PATCH] vfio: selftests: Allow builds when ARCH=x86 David Matlack
2026-04-29 12:46 ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox