[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231211130651.GC2944114@nvidia.com>
Date: Mon, 11 Dec 2023 09:06:51 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Yi Liu <yi.l.liu@...el.com>
Cc: joro@...tes.org, alex.williamson@...hat.com, kevin.tian@...el.com,
robin.murphy@....com, baolu.lu@...ux.intel.com, cohuck@...hat.com,
eric.auger@...hat.com, nicolinc@...dia.com, kvm@...r.kernel.org,
mjrosato@...ux.ibm.com, chao.p.peng@...ux.intel.com,
yi.y.sun@...ux.intel.com, peterx@...hat.com, jasowang@...hat.com,
shameerali.kolothum.thodi@...wei.com, lulu@...hat.com,
suravee.suthikulpanit@....com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
zhenzhong.duan@...el.com, joao.m.martins@...cle.com,
xin.zeng@...el.com, yan.y.zhao@...el.com
Subject: Re: [PATCH v6 6/6] iommufd/selftest: Add coverage for
IOMMU_HWPT_INVALIDATE ioctl
On Mon, Dec 11, 2023 at 07:28:42PM +0800, Yi Liu wrote:
> On 2023/12/7 02:19, Jason Gunthorpe wrote:
> > On Fri, Nov 17, 2023 at 05:07:17AM -0800, Yi Liu wrote:
> > > From: Nicolin Chen <nicolinc@...dia.com>
> > >
> > > Add test cases for the IOMMU_HWPT_INVALIDATE ioctl and verify it by using
> > > the new IOMMU_TEST_OP_MD_CHECK_IOTLB.
> > >
> > > Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> > > Signed-off-by: Yi Liu <yi.l.liu@...el.com>
> > > ---
> > > tools/testing/selftests/iommu/iommufd.c | 71 +++++++++++++++++++
> > > tools/testing/selftests/iommu/iommufd_utils.h | 39 ++++++++++
> > > 2 files changed, 110 insertions(+)
> > >
> > > diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c
> > > index c8763b880a16..2781d5bc6309 100644
> > > --- a/tools/testing/selftests/iommu/iommufd.c
> > > +++ b/tools/testing/selftests/iommu/iommufd.c
> > > @@ -116,6 +116,7 @@ TEST_F(iommufd, cmd_length)
> > > TEST_LENGTH(iommu_destroy, IOMMU_DESTROY, id);
> > > TEST_LENGTH(iommu_hw_info, IOMMU_GET_HW_INFO, __reserved);
> > > TEST_LENGTH(iommu_hwpt_alloc, IOMMU_HWPT_ALLOC, __reserved);
> > > + TEST_LENGTH(iommu_hwpt_invalidate, IOMMU_HWPT_INVALIDATE, out_driver_error_code);
> > > TEST_LENGTH(iommu_ioas_alloc, IOMMU_IOAS_ALLOC, out_ioas_id);
> > > TEST_LENGTH(iommu_ioas_iova_ranges, IOMMU_IOAS_IOVA_RANGES,
> > > out_iova_alignment);
> > > @@ -271,7 +272,9 @@ TEST_F(iommufd_ioas, alloc_hwpt_nested)
> > > struct iommu_hwpt_selftest data = {
> > > .iotlb = IOMMU_TEST_IOTLB_DEFAULT,
> > > };
> > > + struct iommu_hwpt_invalidate_selftest inv_reqs[2] = {0};
> >
> > Don't use {0}
>
> sure. I'll use memset then.
Just use = {}
Jason
Powered by blists - more mailing lists