iommufd/selftest: Expand mock_domain with dev_flags
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 24 Oct 2023 13:51:04 +0000 (14:51 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 24 Oct 2023 14:58:44 +0000 (11:58 -0300)
commite04b23c8d4ed977dbab4a4159f9e4d9a878b5c65
treea65f83d7ffc22e319fdb155d14217a781b778552
parentf35f22cc760eb2c7034bf53251399685d611e03f
iommufd/selftest: Expand mock_domain with dev_flags

Expand mock_domain test to be able to manipulate the device capabilities.
This allows testing with mockdev without dirty tracking support advertised
and thus make sure enforce_dirty test does the expected.

To avoid breaking IOMMUFD_TEST UABI replicate the mock_domain struct and
thus add an input dev_flags at the end.

Link: https://lore.kernel.org/r/20231024135109.73787-14-joao.m.martins@oracle.com
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iommufd_test.h
drivers/iommu/iommufd/selftest.c
tools/testing/selftests/iommu/iommufd_utils.h