[PATCH v1 06/12] iommufd/selftest: Implement mock_get_viommu_size and mock_viommu_init
Tian, Kevin
kevin.tian at intel.com
Fri Jun 13 00:34:33 PDT 2025
> From: Nicolin Chen <nicolinc at nvidia.com>
> Sent: Friday, June 13, 2025 1:12 AM
>
> On Thu, Jun 12, 2025 at 08:17:19AM +0000, Tian, Kevin wrote:
> > > From: Nicolin Chen <nicolinc at nvidia.com>
> > > Sent: Tuesday, June 10, 2025 1:13 AM
> > >
> > > Sanitize the inputs and report the size of struct mock_viommu on success,
> > > in mock_get_viommu_size().
> > >
> > > The core will ensure the viommu_type is set to the core vIOMMU object,
> so
> > > simply init the driver part in mock_viommu_init().
> > >
> > > The mock_viommu_alloc() will be cleaned up once the transition is done.
> > >
> > > Signed-off-by: Nicolin Chen <nicolinc at nvidia.com>
> >
> > Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> >
> > btw I didn't see where mock_viommu->s2_parent is set in the original
> > code. Is it a bug or oversight?
>
> Looks like that was missing.. But it shouldn't trigger any bug
> since mock_nested->parent doesn't have any meaningful value in
> the code..
>
> Perhaps we should think of adding some use case out of it. Or,
> we'd need to clean it away..
>
Then it's kind of dead code. If we cannot find meaningful use then
better to remove it.
More information about the linux-arm-kernel
mailing list