Re: [PATCH v2 07/14] KVM: selftests: Add support for physical device MSI triggers

Josh Hilke
2026-04-02T03:23:54Z

On Wed, Apr 01, 2026 at 01:24:46PM -0700, Sean Christopherson wrote:
> On Tue, Mar 31, 2026, Josh Hilke wrote:
> > From: David Matlack <dmatlack@google.com>
> >
> > Add the '-d' flag to vfio_pci_irq_test to trigger interrupts using the
> > physical device hardware instead of emulating them via eventfd writes.
> > This leverages the VFIO library's driver support to provide a more
> > realistic validation of the hardware-to-guest interrupt path.
>
> I don't think this should be optional, I think the test should unconditionally
> validate both path. The "signal eventfd directly" is effectively a smoke test
> of the full functionality; if that doesn't work, validating that sending via the
> device itself is pointless.
>
> To keep the runtime reasonable, maybe do only 10% of the iterations for the eventfd
> version, capped at a lowish hardcoded value?

We can only use physical device interrupts if there is a VFIO selftest
driver for the device. I can update the test in v3 to validate both
paths if there's a driver, and fall back to using just eventfds
otherwise.