public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
@ 2026-02-03  1:23 Ted Logan
  2026-02-06 17:54 ` David Matlack
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ted Logan @ 2026-02-03  1:23 UTC (permalink / raw)
  To: David Matlack, Alex Williamson, Shuah Khan
  Cc: kvm, linux-kselftest, linux-kernel, kernel test robot, Ted Logan

Only build vfio self-tests on arm64 and x86_64; these are the only
architectures where the vfio self-tests are run. Addresses compiler
warnings for format and conversions on i386.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/
Signed-off-by: Ted Logan <tedlogan@fb.com>
---
Do not build vfio self-tests for 32-bit architectures, where they're
untested and unmaintained. Only build these tests for arm64 and x86_64,
where they're regularly tested.

Compiler warning fixed by patch:

   In file included from tools/testing/selftests/vfio/lib/include/libvfio.h:6:
   tools/testing/selftests/vfio/lib/include/libvfio/iommu.h:49:2: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
      49 |         VFIO_ASSERT_EQ(__iommu_unmap(iommu, region, NULL), 0);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   tools/testing/selftests/vfio/lib/include/libvfio/assert.h:32:37: note: expanded from macro 'VFIO_ASSERT_EQ'
      32 | #define VFIO_ASSERT_EQ(_a, _b, ...) VFIO_ASSERT_OP(_a, _b, ==, ##__VA_ARGS__)
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   tools/testing/selftests/vfio/lib/include/libvfio/assert.h:27:22: note: expanded from macro 'VFIO_ASSERT_OP'
      26 |         fprintf(stderr, "  Observed: %#lx %s %#lx\n",                           \
         |                                              ~~~~
      27 |                         (u64)__lhs, #_op, (u64)__rhs);                          \
         |                                           ^~~~~~~~~~
---
Changes in v2:
- Add white space around arch checks
- Clean up uname command
- Link to v1: https://lore.kernel.org/r/20260130-vfio-selftest-only-64bit-v1-1-d89ac0944c01@fb.com
---
 tools/testing/selftests/vfio/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
index ead27892ab65..8e90e409e91d 100644
--- a/tools/testing/selftests/vfio/Makefile
+++ b/tools/testing/selftests/vfio/Makefile
@@ -1,3 +1,10 @@
+ARCH ?= $(shell uname -m)
+
+ifeq (,$(filter $(ARCH),arm64 x86_64))
+# Do nothing on unsupported architectures
+include ../lib.mk
+else
+
 CFLAGS = $(KHDR_INCLUDES)
 TEST_GEN_PROGS += vfio_dma_mapping_test
 TEST_GEN_PROGS += vfio_dma_mapping_mmio_test
@@ -28,3 +35,5 @@ TEST_DEP_FILES = $(patsubst %.o, %.d, $(TEST_GEN_PROGS_O) $(LIBVFIO_O))
 -include $(TEST_DEP_FILES)
 
 EXTRA_CLEAN += $(TEST_GEN_PROGS_O) $(TEST_DEP_FILES)
+
+endif

---
base-commit: c3cbc276c2a33b04fc78a86cdb2ddce094cb3614
change-id: 20260130-vfio-selftest-only-64bit-422518bdeba7

Best regards,
-- 
Ted Logan <tedlogan@fb.com>


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

* Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
  2026-02-03  1:23 [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64 Ted Logan
@ 2026-02-06 17:54 ` David Matlack
  2026-02-06 22:05 ` Alex Williamson
  2026-03-17 13:55 ` Matt Evans
  2 siblings, 0 replies; 7+ messages in thread
From: David Matlack @ 2026-02-06 17:54 UTC (permalink / raw)
  To: Ted Logan
  Cc: Alex Williamson, Shuah Khan, kvm, linux-kselftest, linux-kernel,
	kernel test robot

On Mon, Feb 2, 2026 at 5:24 PM Ted Logan <tedlogan@fb.com> wrote:
>
> Only build vfio self-tests on arm64 and x86_64; these are the only
> architectures where the vfio self-tests are run. Addresses compiler
> warnings for format and conversions on i386.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/
> Signed-off-by: Ted Logan <tedlogan@fb.com>

Reviewed-by: David Matlack <dmatlack@google.com>

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

* Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
  2026-02-03  1:23 [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64 Ted Logan
  2026-02-06 17:54 ` David Matlack
@ 2026-02-06 22:05 ` Alex Williamson
  2026-03-17 13:55 ` Matt Evans
  2 siblings, 0 replies; 7+ messages in thread
From: Alex Williamson @ 2026-02-06 22:05 UTC (permalink / raw)
  To: Ted Logan
  Cc: David Matlack, Shuah Khan, kvm, linux-kselftest, linux-kernel,
	kernel test robot

On Mon, 2 Feb 2026 17:23:53 -0800
Ted Logan <tedlogan@fb.com> wrote:

> Only build vfio self-tests on arm64 and x86_64; these are the only
> architectures where the vfio self-tests are run. Addresses compiler
> warnings for format and conversions on i386.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/
> Signed-off-by: Ted Logan <tedlogan@fb.com>
> ---
> Do not build vfio self-tests for 32-bit architectures, where they're
> untested and unmaintained. Only build these tests for arm64 and x86_64,
> where they're regularly tested.
> 
> Compiler warning fixed by patch:
> 
>    In file included from tools/testing/selftests/vfio/lib/include/libvfio.h:6:
>    tools/testing/selftests/vfio/lib/include/libvfio/iommu.h:49:2: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
>       49 |         VFIO_ASSERT_EQ(__iommu_unmap(iommu, region, NULL), 0);
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:32:37: note: expanded from macro 'VFIO_ASSERT_EQ'
>       32 | #define VFIO_ASSERT_EQ(_a, _b, ...) VFIO_ASSERT_OP(_a, _b, ==, ##__VA_ARGS__)
>          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:27:22: note: expanded from macro 'VFIO_ASSERT_OP'
>       26 |         fprintf(stderr, "  Observed: %#lx %s %#lx\n",                           \
>          |                                              ~~~~
>       27 |                         (u64)__lhs, #_op, (u64)__rhs);                          \
>          |                                           ^~~~~~~~~~
> ---
> Changes in v2:
> - Add white space around arch checks
> - Clean up uname command
> - Link to v1: https://lore.kernel.org/r/20260130-vfio-selftest-only-64bit-v1-1-d89ac0944c01@fb.com
> ---
>  tools/testing/selftests/vfio/Makefile | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
> index ead27892ab65..8e90e409e91d 100644
> --- a/tools/testing/selftests/vfio/Makefile
> +++ b/tools/testing/selftests/vfio/Makefile
> @@ -1,3 +1,10 @@
> +ARCH ?= $(shell uname -m)
> +
> +ifeq (,$(filter $(ARCH),arm64 x86_64))
> +# Do nothing on unsupported architectures
> +include ../lib.mk
> +else
> +
>  CFLAGS = $(KHDR_INCLUDES)
>  TEST_GEN_PROGS += vfio_dma_mapping_test
>  TEST_GEN_PROGS += vfio_dma_mapping_mmio_test
> @@ -28,3 +35,5 @@ TEST_DEP_FILES = $(patsubst %.o, %.d, $(TEST_GEN_PROGS_O) $(LIBVFIO_O))
>  -include $(TEST_DEP_FILES)
>  
>  EXTRA_CLEAN += $(TEST_GEN_PROGS_O) $(TEST_DEP_FILES)
> +
> +endif
> 
> ---
> base-commit: c3cbc276c2a33b04fc78a86cdb2ddce094cb3614
> change-id: 20260130-vfio-selftest-only-64bit-422518bdeba7
> 
> Best regards,

Applied to vfio next branch for v7.0/6.20.  Thanks,

Alex

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

* Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
  2026-02-03  1:23 [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64 Ted Logan
  2026-02-06 17:54 ` David Matlack
  2026-02-06 22:05 ` Alex Williamson
@ 2026-03-17 13:55 ` Matt Evans
  2026-03-17 19:05   ` Ted Logan
  2026-04-27 23:12   ` Jason Gunthorpe
  2 siblings, 2 replies; 7+ messages in thread
From: Matt Evans @ 2026-03-17 13:55 UTC (permalink / raw)
  To: Ted Logan, David Matlack, Alex Williamson, Shuah Khan
  Cc: kvm, linux-kselftest, linux-kernel, kernel test robot

Hi Ted,

On 03/02/2026 01:23, Ted Logan wrote:
> Only build vfio self-tests on arm64 and x86_64; these are the only
> architectures where the vfio self-tests are run. Addresses compiler
> warnings for format and conversions on i386.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/
> Signed-off-by: Ted Logan <tedlogan@fb.com>
> ---
> Do not build vfio self-tests for 32-bit architectures, where they're
> untested and unmaintained. Only build these tests for arm64 and x86_64,
> where they're regularly tested.
> 
> Compiler warning fixed by patch:
> 
>    In file included from tools/testing/selftests/vfio/lib/include/libvfio.h:6:
>    tools/testing/selftests/vfio/lib/include/libvfio/iommu.h:49:2: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
>       49 |         VFIO_ASSERT_EQ(__iommu_unmap(iommu, region, NULL), 0);
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:32:37: note: expanded from macro 'VFIO_ASSERT_EQ'
>       32 | #define VFIO_ASSERT_EQ(_a, _b, ...) VFIO_ASSERT_OP(_a, _b, ==, ##__VA_ARGS__)
>          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:27:22: note: expanded from macro 'VFIO_ASSERT_OP'
>       26 |         fprintf(stderr, "  Observed: %#lx %s %#lx\n",                           \
>          |                                              ~~~~
>       27 |                         (u64)__lhs, #_op, (u64)__rhs);                          \
>          |                                           ^~~~~~~~~~
> ---
> Changes in v2:
> - Add white space around arch checks
> - Clean up uname command
> - Link to v1: https://lore.kernel.org/r/20260130-vfio-selftest-only-64bit-v1-1-d89ac0944c01@fb.com
> ---
>  tools/testing/selftests/vfio/Makefile | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
> index ead27892ab65..8e90e409e91d 100644
> --- a/tools/testing/selftests/vfio/Makefile
> +++ b/tools/testing/selftests/vfio/Makefile
> @@ -1,3 +1,10 @@
> +ARCH ?= $(shell uname -m)
> +
> +ifeq (,$(filter $(ARCH),arm64 x86_64))

This fails to build (i.e. elides the build) on my local arm64 machine,
because uname -m returns 'aarch64', not 'arm64'.

Are you seeing an arm64 (Linux! [1]) machine where uname -m is 'arm64'...?

This patch needs some translation, of the sort in
 tools/testing/selftests/mm/Makefile:15


-Matt

[1] Note on macOS/M-Mac, uname -m is indeed 'arm64', but not so on Linux.

> +# Do nothing on unsupported architectures
> +include ../lib.mk
> +else
> +
>  CFLAGS = $(KHDR_INCLUDES)
>  TEST_GEN_PROGS += vfio_dma_mapping_test
>  TEST_GEN_PROGS += vfio_dma_mapping_mmio_test
> @@ -28,3 +35,5 @@ TEST_DEP_FILES = $(patsubst %.o, %.d, $(TEST_GEN_PROGS_O) $(LIBVFIO_O))
>  -include $(TEST_DEP_FILES)
>  
>  EXTRA_CLEAN += $(TEST_GEN_PROGS_O) $(TEST_DEP_FILES)
> +
> +endif
> 
> ---
> base-commit: c3cbc276c2a33b04fc78a86cdb2ddce094cb3614
> change-id: 20260130-vfio-selftest-only-64bit-422518bdeba7
> 
> Best regards,


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

* Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
  2026-03-17 13:55 ` Matt Evans
@ 2026-03-17 19:05   ` Ted Logan
  2026-04-27 23:12   ` Jason Gunthorpe
  1 sibling, 0 replies; 7+ messages in thread
From: Ted Logan @ 2026-03-17 19:05 UTC (permalink / raw)
  To: Matt Evans
  Cc: David Matlack, Alex Williamson, Shuah Khan, kvm, linux-kselftest,
	linux-kernel, kernel test robot

On Tue, Mar 17, 2026 at 01:55:17PM +0000, Matt Evans wrote:
> On 03/02/2026 01:23, Ted Logan wrote:
> > diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
> > index ead27892ab65..8e90e409e91d 100644
> > --- a/tools/testing/selftests/vfio/Makefile
> > +++ b/tools/testing/selftests/vfio/Makefile
> > @@ -1,3 +1,10 @@
> > +ARCH ?= $(shell uname -m)
> > +
> > +ifeq (,$(filter $(ARCH),arm64 x86_64))
> 
> This fails to build (i.e. elides the build) on my local arm64 machine,
> because uname -m returns 'aarch64', not 'arm64'.
> 
> Are you seeing an arm64 (Linux! [1]) machine where uname -m is 'arm64'...?
> 
> This patch needs some translation, of the sort in
>  tools/testing/selftests/mm/Makefile:15
> 
> 
> -Matt
> 
> [1] Note on macOS/M-Mac, uname -m is indeed 'arm64', but not so on Linux.

I didn't have an aarch64 system handy to test when I sent my first
patch, so I went with David's comment in an earlier thread that x86_64
and arm64 are supported. I did just fire up a Linux VM on my Mac and I
see it does indeed report the arch as aarch64, and that it builds the
self-tests without warnings. I'll mail a patch to translate the
architecture as you suggest.

- Ted

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

* Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
  2026-03-17 13:55 ` Matt Evans
  2026-03-17 19:05   ` Ted Logan
@ 2026-04-27 23:12   ` Jason Gunthorpe
  2026-04-28  1:55     ` Sean Christopherson
  1 sibling, 1 reply; 7+ messages in thread
From: Jason Gunthorpe @ 2026-04-27 23:12 UTC (permalink / raw)
  To: Matt Evans
  Cc: Ted Logan, David Matlack, Alex Williamson, Shuah Khan, kvm,
	linux-kselftest, linux-kernel, kernel test robot

On Tue, Mar 17, 2026 at 01:55:17PM +0000, Matt Evans wrote:
> Hi Ted,
> 
> On 03/02/2026 01:23, Ted Logan wrote:
> > Only build vfio self-tests on arm64 and x86_64; these are the only
> > architectures where the vfio self-tests are run. Addresses compiler
> > warnings for format and conversions on i386.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/
> > Signed-off-by: Ted Logan <tedlogan@fb.com>
> > ---
> > Do not build vfio self-tests for 32-bit architectures, where they're
> > untested and unmaintained. Only build these tests for arm64 and x86_64,
> > where they're regularly tested.
> > 
> > Compiler warning fixed by patch:
> > 
> >    In file included from tools/testing/selftests/vfio/lib/include/libvfio.h:6:
> >    tools/testing/selftests/vfio/lib/include/libvfio/iommu.h:49:2: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
> >       49 |         VFIO_ASSERT_EQ(__iommu_unmap(iommu, region, NULL), 0);
> >          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:32:37: note: expanded from macro 'VFIO_ASSERT_EQ'
> >       32 | #define VFIO_ASSERT_EQ(_a, _b, ...) VFIO_ASSERT_OP(_a, _b, ==, ##__VA_ARGS__)
> >          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:27:22: note: expanded from macro 'VFIO_ASSERT_OP'
> >       26 |         fprintf(stderr, "  Observed: %#lx %s %#lx\n",                           \
> >          |                                              ~~~~
> >       27 |                         (u64)__lhs, #_op, (u64)__rhs);                          \
> >          |                                           ^~~~~~~~~~
> > ---
> > Changes in v2:
> > - Add white space around arch checks
> > - Clean up uname command
> > - Link to v1: https://lore.kernel.org/r/20260130-vfio-selftest-only-64bit-v1-1-d89ac0944c01@fb.com
> > ---
> >  tools/testing/selftests/vfio/Makefile | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
> > index ead27892ab65..8e90e409e91d 100644
> > --- a/tools/testing/selftests/vfio/Makefile
> > +++ b/tools/testing/selftests/vfio/Makefile
> > @@ -1,3 +1,10 @@
> > +ARCH ?= $(shell uname -m)
> > +
> > +ifeq (,$(filter $(ARCH),arm64 x86_64))
> 
> This fails to build (i.e. elides the build) on my local arm64 machine,
> because uname -m returns 'aarch64', not 'arm64'.

I have the same issue on x86! The kernel uses x86 is the ARCH when you
run it straight from the top level make

make[4]: Entering directory '/home/jgg/oss/wip/mlx5st/tools/testing/selftests/vfio'
Makefile:1: "Saw ARCH=x86"

Even though this is a 64 bit build.

Jason

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

* Re: [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64
  2026-04-27 23:12   ` Jason Gunthorpe
@ 2026-04-28  1:55     ` Sean Christopherson
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2026-04-28  1:55 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Matt Evans, Ted Logan, David Matlack, Alex Williamson, Shuah Khan,
	kvm, linux-kselftest, linux-kernel, kernel test robot

On Mon, Apr 27, 2026, Jason Gunthorpe wrote:
> On Tue, Mar 17, 2026 at 01:55:17PM +0000, Matt Evans wrote:
> > Hi Ted,
> > 
> > On 03/02/2026 01:23, Ted Logan wrote:
> > > Only build vfio self-tests on arm64 and x86_64; these are the only
> > > architectures where the vfio self-tests are run. Addresses compiler
> > > warnings for format and conversions on i386.
> > > 
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202601211830.aBEjmEFD-lkp@intel.com/
> > > Signed-off-by: Ted Logan <tedlogan@fb.com>
> > > ---
> > > Do not build vfio self-tests for 32-bit architectures, where they're
> > > untested and unmaintained. Only build these tests for arm64 and x86_64,
> > > where they're regularly tested.
> > > 
> > > Compiler warning fixed by patch:
> > > 
> > >    In file included from tools/testing/selftests/vfio/lib/include/libvfio.h:6:
> > >    tools/testing/selftests/vfio/lib/include/libvfio/iommu.h:49:2: warning: format specifies type 'unsigned long' but the argument has type 'u64' (aka 'unsigned long long') [-Wformat]
> > >       49 |         VFIO_ASSERT_EQ(__iommu_unmap(iommu, region, NULL), 0);
> > >          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:32:37: note: expanded from macro 'VFIO_ASSERT_EQ'
> > >       32 | #define VFIO_ASSERT_EQ(_a, _b, ...) VFIO_ASSERT_OP(_a, _b, ==, ##__VA_ARGS__)
> > >          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >    tools/testing/selftests/vfio/lib/include/libvfio/assert.h:27:22: note: expanded from macro 'VFIO_ASSERT_OP'
> > >       26 |         fprintf(stderr, "  Observed: %#lx %s %#lx\n",                           \
> > >          |                                              ~~~~
> > >       27 |                         (u64)__lhs, #_op, (u64)__rhs);                          \
> > >          |                                           ^~~~~~~~~~
> > > ---
> > > Changes in v2:
> > > - Add white space around arch checks
> > > - Clean up uname command
> > > - Link to v1: https://lore.kernel.org/r/20260130-vfio-selftest-only-64bit-v1-1-d89ac0944c01@fb.com
> > > ---
> > >  tools/testing/selftests/vfio/Makefile | 9 +++++++++
> > >  1 file changed, 9 insertions(+)
> > > 
> > > diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
> > > index ead27892ab65..8e90e409e91d 100644
> > > --- a/tools/testing/selftests/vfio/Makefile
> > > +++ b/tools/testing/selftests/vfio/Makefile
> > > @@ -1,3 +1,10 @@
> > > +ARCH ?= $(shell uname -m)
> > > +
> > > +ifeq (,$(filter $(ARCH),arm64 x86_64))
> > 
> > This fails to build (i.e. elides the build) on my local arm64 machine,
> > because uname -m returns 'aarch64', not 'arm64'.
> 
> I have the same issue on x86! The kernel uses x86 is the ARCH when you
> run it straight from the top level make
> 
> make[4]: Entering directory '/home/jgg/oss/wip/mlx5st/tools/testing/selftests/vfio'
> Makefile:1: "Saw ARCH=x86"
> 
> Even though this is a 64 bit build.

Heh, it's much funnier when it's happening to someone else.  :-)

KVM selftests went through these exact pains.  I'm pretty sure these are the
relevant commits (the empty targets one may or may not apply to VFIO).

9af04539d474dda4984ff4909d4568e6123c8cba KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR
67730e6c53d70fb31618230f81c4acee9f72eaa3 KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories
43fbd8cd389faa9760c5152b1c58e893c812953b KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs

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

end of thread, other threads:[~2026-04-28  1:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03  1:23 [PATCH v2] vfio: selftests: only build tests on arm64 and x86_64 Ted Logan
2026-02-06 17:54 ` David Matlack
2026-02-06 22:05 ` Alex Williamson
2026-03-17 13:55 ` Matt Evans
2026-03-17 19:05   ` Ted Logan
2026-04-27 23:12   ` Jason Gunthorpe
2026-04-28  1:55     ` Sean Christopherson

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