mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org,
	Alex Williamson <alex@shazbot.org>,
	 Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v2 5/5] KVM: selftests: List the known IOMMU modes in irq_test's help output
Date: Wed, 4 Nov 2026 13:50:46 -0800	[thread overview]
Message-ID: <auuotv1vFpocCSeW@google.com> (raw)
In-Reply-To: <auue7S_vdnGtTM3c@google.com>

On Wed, Nov 04, 2026, David Matlack wrote:
> On 2026-11-04 06:53 AM, Sean Christopherson wrote:
> > const char *iommu_mode_names(void)
> > {
> > 	return __iommu_mode_names(false);
> > }
> 
> How about listing both? That keeps -h consistent with how other KVM
> selftests list the options for their arguments (e.g. backing_src_help()
> lists every backing src type), while also showing which modes can
> actually be used. e.g. on a system with only the legacy VFIO container:
> 
>   # ./irq_test -h
>   ...
>   -t	Override the IOMMU mode to use
>   	Options: iommufd, vfio_type1v2_iommu, vfio_type1_iommu, iommufd_compat_type1v2, iommufd_compat_type1
>   	Available: vfio_type1v2_iommu, vfio_type1_iommu

That'd be awesome!

> The available modes also get printed when the requested mode is not
> available, i.e. when the __TEST_REQUIRE() fails:
> 
>   # ./irq_test -d 0000:01:00.0 -t iommufd
>   1..0 # SKIP - IOMMU mode 'iommufd' is not available.  Available modes: vfio_type1v2_iommu, vfio_type1_iommu.
> 
> libvfio exposes iommu_mode_names_all() and iommu_mode_names_available()
> for this, built on your helper for juggling all vs. available.

      reply	other threads:[~2026-11-04 21:50 UTC|newest]

Thread overview: 9+ 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 ` [PATCH v2 5/5] KVM: selftests: List the known IOMMU modes in irq_test's help output David Matlack
2026-11-04 14:53   ` Sean Christopherson
2026-11-04 21:09     ` David Matlack
2026-11-04 21:50       ` Sean Christopherson [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=auuotv1vFpocCSeW@google.com \
    --to=seanjc@google.com \
    --cc=alex@shazbot.org \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.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®