Re: [PATCH v3 06/16] KVM: selftests: Add IRQ injection test
From: Sean Christopherson
Date: Tue May 26 2026 - 21:59:37 EST
On Tue, Apr 21, 2026, Josh Hilke wrote:
> From: David Matlack <dmatlack@xxxxxxxxxx>
>
> Add a new test, irq_test.c, which verifies that KVM correctly injects
> interrupts into a running guest when triggered via an eventfd bound to a
> GSI using the irqfd mechanism.
Can you add some color explaining that this will/should work with IRQ bypass?
I assume it does right out of the gate.
> Suggested-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> Link: https://lore.kernel.org/kvm/20250404193923.1413163-68-seanjc@xxxxxxxxxx/
> Co-developed-by: Josh Hilke <jrhilke@xxxxxxxxxx>
> Signed-off-by: Josh Hilke <jrhilke@xxxxxxxxxx>
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
> ---
> tools/testing/selftests/kvm/Makefile.kvm | 1 +
> tools/testing/selftests/kvm/irq_test.c | 173 +++++++++++++++++++++++
> 2 files changed, 174 insertions(+)
> create mode 100644 tools/testing/selftests/kvm/irq_test.c
>
> diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> index d944b81cad7d..693c03372a31 100644
> --- a/tools/testing/selftests/kvm/Makefile.kvm
> +++ b/tools/testing/selftests/kvm/Makefile.kvm
> @@ -156,6 +156,7 @@ TEST_GEN_PROGS_x86 += rseq_test
> TEST_GEN_PROGS_x86 += steal_time
> TEST_GEN_PROGS_x86 += system_counter_offset_test
> TEST_GEN_PROGS_x86 += pre_fault_memory_test
> +TEST_GEN_PROGS_x86 += irq_test
Ignore pre_fault_memory_test, sort alphabetically.