From: Pranjal Shrivastava <praan@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com>,
Alex Williamson <alex@shazbot.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Mostafa Saleh <smostafa@google.com>,
Daniel Mentz <danielmentz@google.com>,
Samiullah Khawaja <skhawaja@google.com>,
iommu@lists.linux.dev, kvm@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
Logan Odell <loganodell@google.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 7/7] vfio/selftests: Add observability test for IO page table usage
Date: Mon, 30 Nov 2026 15:28:22 +0000 [thread overview]
Message-ID: <aw2WFpzpwJFF0r_m@google.com> (raw)
In-Reply-To: <DN4PXTY768YS.3I99BQYLC8VXI@google.com>
On Wed, Nov 25, 2026 at 04:33:32PM -0800, David Matlack wrote:
> On Thu Oct 1, 2026 at 3:45 PM PDT, Pranjal Shrivastava wrote:
> > Add a new selftest, vfio_nr_pages_test, to validate the iommu-nr-pages
> > fdinfo metric across all IOMMU backends (Type 1 and IOMMUFD native/compat).
>
> What's the status of this series? Should we expect another version
> (e.g. after the discussion on the shrinker RFC and at LPC)?
>
> nit: Please use "vfio: selftests:" as the shortlog prefix for VFIO
> selftests (see Documentation/driver-api/vfio-selftests.rst).
>
Yes. Following the discussion at LPC, Jason would prefer to expose this
only through iommufd rather than VFIO type1, so I'm reworking the series
along those lines and plan to post it soon. That drops the type1 fdinfo
patch and this VFIO selftest.
> I gave this a try in QEMU with an emulated Intel IOMMU (which uses
> generic_pt, so it reports iommu-nr-pages), on top of this series. It
> fails in every mode except iommufd, which skips. Details below.
>
> [...]
>
Thanks a lot for testing this, and you're right about both the fd
selection and the PROT_NONE mapping. Your point about the final
assertion carries over though: I'll make the iommufd selftest check that
the count goes back down after a full-table unmap, rather than asserting
that it stays up.
Thanks,
Praan
prev parent reply other threads:[~2026-11-30 15:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 22:45 [RFC PATCH 0/7] iommu: Introduce Page Table Observability Framework Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 1/7] iommu: Add infrastructure for per-domain IOPT accounting Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 2/7] iommu: Implement domain-attributed page allocation Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 3/7] iommupt: Enable per-domain IOPT attribution Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 4/7] vfio/type1: Expose IO page table usage via fdinfo Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 5/7] iommufd: " Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 6/7] iommufd/selftest: Add observability test for iommu-nr-pages Pranjal Shrivastava
2026-10-01 22:45 ` [RFC PATCH 7/7] vfio/selftests: Add observability test for IO page table usage Pranjal Shrivastava
2026-11-26 0:33 ` David Matlack
2026-11-30 15:28 ` Pranjal Shrivastava [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=aw2WFpzpwJFF0r_m@google.com \
--to=praan@google.com \
--cc=alex@shazbot.org \
--cc=corbet@lwn.net \
--cc=danielmentz@google.com \
--cc=dmatlack@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=loganodell@google.com \
--cc=rdunlap@infradead.org \
--cc=robin.murphy@arm.com \
--cc=skhan@linuxfoundation.org \
--cc=skhawaja@google.com \
--cc=smostafa@google.com \
--cc=will@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