lkml.org 
[lkml]   [2023]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/5] iommufd/selftest: Add IOMMU_TEST_OP_ACCESS_SET_IOAS coverage
On Fri, Mar 10, 2023 at 04:06:52PM -0800, Nicolin Chen wrote:
> On Fri, Mar 10, 2023 at 04:15:33PM -0400, Jason Gunthorpe wrote:
> > On Wed, Mar 08, 2023 at 06:25:59AM -0800, Nicolin Chen wrote:
> > > Add a new IOMMU_TEST_OP_ACCESS_SET_IOAS to allow setting access->ioas
> > > individually, corresponding to the iommufd_access_set_ioas() helper.
> > >
> > > Reviewed-by: Kevin Tian <kevin.tian@intel.com>
> > > Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> > > ---
> > > drivers/iommu/iommufd/iommufd_test.h | 4 +++
> > > drivers/iommu/iommufd/selftest.c | 26 +++++++++++++++----
> > > tools/testing/selftests/iommu/iommufd_utils.h | 22 ++++++++++++++--
> > > 3 files changed, 45 insertions(+), 7 deletions(-)
> >
> > I'd prefer we keep it so that the IOAS can be setup with an argument,
> > this will greatly help syzkaller
> >
> > Lets have it so a 0 ioas will avoid the setup so the second call can
> > happen
>
> I assume that you mean the iommufd_access_set_ioas() call and
> the "unsigned int ioas_id" input of iommufd_test_create_access?

I changed it to keep the id in iommufd_test_create_access().
Instead, I renamed the IOMMU_TEST_OP_ACCESS_SET_IOAS ioctl to
IOMMU_TEST_OP_ACCESS_REPLACE_IOAS. So an access can be created
by the original ioctl, and then be replaced using the new one.

Thanks
Nic

\
 
 \ /
  Last update: 2023-03-27 01:02    [W:0.075 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site