mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Hilke <jrhilke@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 David Matlack <dmatlack@google.com>,
	Alex Williamson <alex@shazbot.org>,
	Josh Hilke <jrhilke@google.com>
Subject: [PATCH v4 01/19] KVM: selftests: Build and link selftests/vfio/lib into KVM selftests
Date: Sat, 30 May 2026 00:21:16 +0000	[thread overview]
Message-ID: <20260530002134.558837-2-jrhilke@google.com> (raw)
In-Reply-To: <20260530002134.558837-1-jrhilke@google.com>

From: David Matlack <dmatlack@google.com>

Include libvfio.mk into the KVM selftests Makefile and link it into all
KVM selftests by adding it to LIBKVM_OBJS.

This lays the groundwork for future changes to utilize VFIO devices to
verify IRQ bypass in KVM selftests.

Note that KVM selftests build their own copy of sefltests/vfio/lib and
the resulting object files are placed in $(OUTPUT)/lib. This allows the
KVM and VFIO selftests to apply different CFLAGS when building without
conflicting with each other.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Josh Hilke <jrhilke@google.com>
---
 tools/testing/selftests/kvm/Makefile.kvm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
index 6471fa214a9f..b3e223f45575 100644
--- a/tools/testing/selftests/kvm/Makefile.kvm
+++ b/tools/testing/selftests/kvm/Makefile.kvm
@@ -252,6 +252,7 @@ OVERRIDE_TARGETS = 1
 # which causes the environment variable to override the makefile).
 include ../lib.mk
 include ../cgroup/lib/libcgroup.mk
+include ../vfio/lib/libvfio.mk
 
 INSTALL_HDR_PATH = $(top_srcdir)/usr
 LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
@@ -306,7 +307,9 @@ LIBKVM_S := $(filter %.S,$(LIBKVM))
 LIBKVM_C_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_C))
 LIBKVM_S_OBJ := $(patsubst %.S, $(OUTPUT)/%.o, $(LIBKVM_S))
 LIBKVM_STRING_OBJ := $(patsubst %.c, $(OUTPUT)/%.o, $(LIBKVM_STRING))
-LIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ) $(LIBCGROUP_O)
+LIBKVM_OBJS = $(LIBKVM_C_OBJ) $(LIBKVM_S_OBJ) $(LIBKVM_STRING_OBJ)
+LIBKVM_OBJS += $(LIBCGROUP_O)
+LIBKVM_OBJS += $(LIBVFIO_O)
 SPLIT_TEST_GEN_PROGS := $(patsubst %, $(OUTPUT)/%, $(SPLIT_TESTS))
 SPLIT_TEST_GEN_OBJ := $(patsubst %, $(OUTPUT)/$(ARCH)/%.o, $(SPLIT_TESTS))
 
-- 
2.54.0.929.g9b7fa37559-goog


  reply	other threads:[~2026-05-30  0:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-30  0:21 [PATCH v4 00/19] KVM: selftests: Link with VFIO selftests lib Josh Hilke
2026-05-30  0:21 ` Josh Hilke [this message]
2026-05-30  0:21 ` [PATCH v4 02/19] KVM: selftests: Add /proc/interrupts parsing helpers for IRQ test Josh Hilke
2026-06-01 19:19   ` Sean Christopherson
2026-05-30  0:21 ` [PATCH v4 03/19] KVM: selftests: Add guest read/write macros Josh Hilke
2026-05-30  0:21 ` [PATCH v4 04/19] KVM: selftests: Rename guest_rng to kvm_rng Josh Hilke
2026-05-30  0:21 ` [PATCH v4 05/19] KVM: selftests: Add helper to generate random u64 in range [min,max] Josh Hilke
2026-05-30  0:21 ` [PATCH v4 06/19] KVM: selftests: Add IRQ injection test Josh Hilke
2026-05-30  0:21 ` [PATCH v4 07/19] KVM: selftests: Verify IRQ bypass works in IRQ test Josh Hilke
2026-05-30  0:21 ` [PATCH v4 08/19] KVM: selftests: Verify interrupts are received when IRQ affinity changes " Josh Hilke
2026-06-01 20:02   ` Sean Christopherson
2026-05-30  0:21 ` [PATCH v4 09/19] KVM: selftests: Verify IRQs wake up halted vCPUs " Josh Hilke
2026-05-30  0:21 ` [PATCH v4 10/19] KVM: selftests: Verify interrupts are received after modifying IRQ routes " Josh Hilke
2026-05-30  0:21 ` [PATCH v4 11/19] KVM: selftests: Make number of IRQs configurable " Josh Hilke
2026-05-30  0:21 ` [PATCH v4 12/19] KVM: selftests: Verify non-postable IRQ remapping " Josh Hilke
2026-05-30  0:21 ` [PATCH v4 13/19] KVM: selftests: Add kvm_gettid() wrapper and convert users Josh Hilke
2026-05-30  0:21 ` [PATCH v4 14/19] KVM: selftests: Add kvm_sched_getaffinity() " Josh Hilke
2026-06-01 19:27   ` Sean Christopherson
2026-05-30  0:21 ` [PATCH v4 15/19] KVM: selftests: Add pin_task_to_random_cpu() helper function Josh Hilke
2026-05-30  0:21 ` [PATCH v4 16/19] KVM: selftests: Verify vCPU migration during IRQ delivery in IRQ test Josh Hilke
2026-05-30  0:21 ` [PATCH v4 17/19] KVM: selftests: Print vCPU affinity on timeout during " Josh Hilke
2026-05-30  0:21 ` [PATCH v4 18/19] KVM: selftests: Make number of vCPUs configurable in " Josh Hilke
2026-05-30  0:21 ` [PATCH v4 19/19] KVM: selftests: Add xAPIC support " Josh Hilke
2026-05-30  0:26 ` [PATCH v4 00/19] KVM: selftests: Link with VFIO selftests lib Josh Hilke
2026-06-01 19:07 ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260530002134.558837-2-jrhilke@google.com \
    --to=jrhilke@google.com \
    --cc=alex@shazbot.org \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®