mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Matlack <dmatlack@google.com>
To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org
Cc: Alex Williamson <alex@shazbot.org>,
	David Matlack <dmatlack@google.com>,
	 Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Shuah Khan <shuah@kernel.org>
Subject: [PATCH v2 5/5] KVM: selftests: List the known IOMMU modes in irq_test's help output
Date: Tue,  3 Nov 2026 00:22:05 +0000	[thread overview]
Message-ID: <20261103002205.3348519-6-dmatlack@google.com> (raw)
In-Reply-To: <20261103002205.3348519-1-dmatlack@google.com>

List the names of all known IOMMU modes in the help output for irq_test's
-t option, using iommu_mode_names() from the VFIO selftests library, and
clarify that the IOMMU mode is auto-detected by default.

The help output currently claims that the only valid modes are
vfio_type1_iommu and iommufd, which was never true, and would get stale
any time a mode is added to the VFIO selftests library.

Signed-off-by: David Matlack <dmatlack@google.com>
---
 tools/testing/selftests/kvm/irq_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/kvm/irq_test.c b/tools/testing/selftests/kvm/irq_test.c
index 8a345472df5f..ef69f9d7ac3d 100644
--- a/tools/testing/selftests/kvm/irq_test.c
+++ b/tools/testing/selftests/kvm/irq_test.c
@@ -159,7 +159,8 @@ static void help(const char *name)
 	printf("-i	The number of IRQs to generate during the test\n");
 	printf("-m	Pin target vCPU to random physical CPU before triggering interrupt\n");
 	printf("-n	Deliver 50 percent of IRQs as non-maskable interrupts\n");
-	printf("-t	Override the IOMMU type to use (vfio_type1_iommu or iommufd)\n");
+	printf("-t	Override the IOMMU mode to use instead of auto-detecting it (%s)\n",
+	       iommu_mode_names());
 	printf("-v	Number of vCPUS to run\n");
 	printf("-x	Use xAPIC mode instead of x2APIC mode in the guest\n");
 	printf("\n");
-- 
2.56.0.385.gac671c819a-goog


      parent reply	other threads:[~2026-11-03  0:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  0:22 [PATCH v2 0/5] vfio: selftests: Automatically detect the IOMMU mode David Matlack
2026-11-03  0:22 ` [PATCH v2 1/5] vfio: selftests: Automatically detect the IOMMU mode in iommu_init() David Matlack
2026-11-03  0:22 ` [PATCH v2 2/5] vfio: selftests: Skip tests when the IOMMU mode is not available David Matlack
2026-11-03  0:22 ` [PATCH v2 3/5] vfio: selftests: Print the known IOMMU modes on an unrecognized mode David Matlack
2026-11-03  0:22 ` [PATCH v2 4/5] KVM: selftests: Use VFIO selftests library to pick IOMMU mode in irq_test David Matlack
2026-11-03  0:22 ` David Matlack [this message]

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=20261103002205.3348519-6-dmatlack@google.com \
    --to=dmatlack@google.com \
    --cc=alex@shazbot.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=shuah@kernel.org \
    /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®