From: Joao Martins <joao.m.martins@oracle.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: iommu@lists.linux.dev, Kevin Tian <kevin.tian@intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Avihai Horon <avihaih@nvidia.com>,
Alex Williamson <alex.williamson@redhat.com>,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Subject: Re: [PATCH v1 0/9] iommufd/iova_bitmap: Bug fixes for IOMMU dirty tracking
Date: Tue, 6 Feb 2024 18:32:07 +0000 [thread overview]
Message-ID: <91aee5f5-82ce-476a-bb53-cc65c369db2c@oracle.com> (raw)
In-Reply-To: <20240206181333.GE10476@nvidia.com>
On 06/02/2024 18:13, Jason Gunthorpe wrote:
> On Fri, Feb 02, 2024 at 01:34:06PM +0000, Joao Martins wrote:
>
>> I have a separate set of changes, that proved also instrumental in
>> reproducing some of these corner cases in a more predictable manner but
>> with IOMMU drivers instead, rather than IOMMUFD mock IOMMU driver...
>> without relying on VF specific behaviour. Though, it relies on being
>> able to map IOVAs as dirty. This is not included in this series, as I
>> am not sure yet if such direction would make sense (outside of testing).
>> Comments, appreciated.
>
> I would love to have a test suite that could drive real HW. I think
> that would make a big improvement to iommu driver quality.
>
Ideally we would merge the selftests to use real hw domain rather than mock
domain, and skip what's not supported when hardware lacks. Specially as we add
more and more features (IOPF, DPT, nesting) and underlying testing, it seems the
most natural point of consolidation.
Dirty tracking is a little strange because one needs some sort of block/packet
I/O done to hit the path of having something allocated, which usually requires
some driver operating to mark things dirty plus page allocator luck in picking
the right pages. So the straightforward way to manipulate all this without any
of this complexity on real hardware is this is to "map as dirty" and check if
something is missing. It proved useful in these bugs as I couldn't reproduce
this by just using the thing (even sharing the same test as Avihai). In any
case, the gotcha is consuming a new perm bit.
>> The selftests in this series (a large majority of the series changes)
>> are meant to be kept in this order to be more clear in history that the
>> selftests exercise a given fix added earlier in the series.
>> The last patch is an efficiency improvement, but can act as workaround if
>> the IOVA ranges are smaller than 64G, which is why it is placed last.
>>
>> [I think this should be targetted for -rc rather than -next]
>
> OK, I took it for -rc
>
> It is bit unfortunate that the number of huge pages needed to run the
> test has increased but it seems necessary to reach all of those
> corners...
>
One thing that I have here as TODO is to make sure we check if the necessary
amount of hugepages is set and instead of 'scarying' the user with 'test failed'
we SKIP("...") with some reporting of how many are missing for the test.
next prev parent reply other threads:[~2024-02-06 18:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 13:34 [PATCH v1 0/9] iommufd/iova_bitmap: Bug fixes for IOMMU dirty tracking Joao Martins
2024-02-02 13:34 ` [PATCH v1 1/9] iommufd/iova_bitmap: Bounds check mapped::pages access Joao Martins
2024-02-07 16:49 ` Avihai Horon
2024-02-02 13:34 ` [PATCH v1 2/9] iommufd/iova_bitmap: Switch iova_bitmap::bitmap to an u8 array Joao Martins
2024-02-07 16:50 ` Avihai Horon
2024-02-02 13:34 ` [PATCH v1 3/9] iommufd/selftest: Test u64 unaligned bitmaps Joao Martins
2024-02-02 13:34 ` [PATCH v1 4/9] iommufd/iova_bitmap: Handle recording beyond the mapped pages Joao Martins
2024-02-07 16:51 ` Avihai Horon
2024-05-24 11:22 ` Joao Martins
2024-02-02 13:34 ` [PATCH v1 5/9] iommufd/selftest: Refactor dirty bitmap tests Joao Martins
2024-02-02 13:34 ` [PATCH v1 6/9] iommufd/selftest: Refactor mock_domain_read_and_clear_dirty() Joao Martins
2024-02-02 13:34 ` [PATCH v1 7/9] iommufd/selftest: Hugepage mock domain support Joao Martins
2024-02-02 13:34 ` [PATCH v1 8/9] iommufd/selftest: Add mock IO hugepages tests Joao Martins
2024-02-02 13:34 ` [PATCH v1 9/9] iommufd/iova_bitmap: Consider page offset for the pages to be pinned Joao Martins
2024-02-07 16:52 ` Avihai Horon
2024-02-06 18:13 ` [PATCH v1 0/9] iommufd/iova_bitmap: Bug fixes for IOMMU dirty tracking Jason Gunthorpe
2024-02-06 18:32 ` Joao Martins [this message]
2024-02-06 20:57 ` Joao Martins
2024-02-07 8:41 ` Tian, Kevin
2024-02-07 10:23 ` Joao Martins
2024-02-08 8:21 ` Tian, Kevin
2024-02-08 17:23 ` Jason Gunthorpe
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=91aee5f5-82ce-476a-bb53-cc65c369db2c@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=avihaih@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=suravee.suthikulpanit@amd.com \
/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