Skip to contentSkip to conversation

vfio: selftests: Add luuid to libvfio.mk's list of libraries, not to the Makefile

PATCH In review Sean Christopherson 3 participants 3 messages Jun 30

Subsystems (4)
lore
Share & tools
lore

Sean Christopherson

author reviewer
#0 lore raw

PATCH 1/1 vfio: selftests: Add luuid to libvfio.mk's list of libraries, not to the Makefile

Link to the uuid library as part of libvfio.mk instead of as only linking it via VFIO selftests' Makefile, as the whole point of providing libvfio.mk is to allow linking the VFIO library functionality into KVM selftests, without KVM selftests having to know the gory details or duplicate code.

Cc Raghavendra Rao Ananta <[email protected]>
Cc David Matlack <[email protected]>
Cc Vipin Sharma <[email protected]>
Cc Alex Williamson <[email protected]>
Fixes e65f1bf8a2db ("vfio: selftests: Extend container/iommufd setup for passing vf_token")

---

I would either like to land this in 7.2-rcN (ideally rc2 or rc3), or take it through the KVM x86 tree for 7.3, as it's blocking a KVM selftest[*] that's been in the works for more than a year. I can throw the IRQ selftest in its own topic branch, so even 7.2-rc5 would be "fine", but I would much prefer to get this (or an equivalent fix) into Linus' tree sooner than later.

[*] https://lore.kernel.org/all/[email protected]

 tools/testing/selftests/vfio/Makefile       | 2 --
 tools/testing/selftests/vfio/lib/libvfio.mk | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/vfio/Makefile +0 -2
index e6e8cb52ab03..2c32c48db509 100644
@@ -29,8 +29,6 @@ CFLAGS += $(EXTRA_CFLAGS)
 
 LDFLAGS += -pthread
 
-LDLIBS += -luuid
-
 $(TEST_GEN_PROGS): $(OUTPUT)/%: $(OUTPUT)/%.o $(LIBVFIO_O)
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< $(LIBVFIO_O) $(LDLIBS) -o $@
 
tools/testing/selftests/vfio/lib/libvfio.mk +2 -0
index 2b8d73b7d329..67942b085068 100644
@@ -26,6 +26,8 @@ $(LIBVFIO_O_DIRS):
 
 CFLAGS += -I$(LIBVFIO_SRCDIR)/include
 
+LDLIBS += -luuid
+
 $(LIBVFIO_O): $(LIBVFIO_OUTPUT)/%.o : $(LIBVFIO_SRCDIR)/%.c | $(LIBVFIO_O_DIRS)
 	$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
 

base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482

Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Sean Christopherson

Link to the uuid library as part of libvfio.mk instead of as only linking it via VFIO selftests' Makefile, as the whole point of providing libvfio.mk is to allow linking the VFIO library functionality into KVM selftests, without KVM selftests having to know the gory details or duplicate code.

Cc Raghavendra Rao Ananta <[email protected]>
Cc David Matlack <[email protected]>
Cc Vipin Sharma <[email protected]>
Cc Alex Williamson <[email protected]>
Fixes e65f1bf8a2db ("vfio: selftests: Extend container/iommufd setup for passing vf_token")
Quoted 9 lines

---

I would either like to land this in 7.2-rcN (ideally rc2 or rc3), or take it through the KVM x86 tree for 7.3, as it's blocking a KVM selftest[*] that's been in the works for more than a year. I can throw the IRQ selftest in its own topic branch, so even 7.2-rc5 would be "fine", but I would much prefer to get this (or an equivalent fix) into Linus' tree sooner than later.

[*] https://lore.kernel.org/all/[email protected]

Sounds good to me. Alex can we take this in one of the next RCs?

maintainer
#2 lore raw
Quoted 23 lines · On Tue, 30 Jun 2026 21:44:07 +0000 David Matlack <[email protected]> wrote:
Quoted 11 lines · Sean Christopherson

Link to the uuid library as part of libvfio.mk instead of as only linking it via VFIO selftests' Makefile, as the whole point of providing libvfio.mk is to allow linking the VFIO library functionality into KVM selftests, without KVM selftests having to know the gory details or duplicate code.

Cc Raghavendra Rao Ananta <[email protected]>
Cc David Matlack <[email protected]>
Cc Vipin Sharma <[email protected]>
Cc Alex Williamson <[email protected]>
Fixes e65f1bf8a2db ("vfio: selftests: Extend container/iommufd setup for passing vf_token")
Quoted 8 lines

---

I would either like to land this in 7.2-rcN (ideally rc2 or rc3), or take it through the KVM x86 tree for 7.3, as it's blocking a KVM selftest[*] that's been in the works for more than a year. I can throw the IRQ selftest in its own topic branch, so even 7.2-rc5 would be "fine", but I would much prefer to get this (or an equivalent fix) into Linus' tree sooner than later.

Quoted 3 lines
Quoted 1 line

[*] https://lore.kernel.org/all/[email protected]

Sounds good to me. Alex can we take this in one of the next RCs?

I'm intending a pull request this week with the bitfield and module option latching fixes that are currently in linux-next, I'll pull this into that as well. Thanks,

Alex