lkml.org 
[lkml]   [2023]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 4/6] iommufd/selftest: Add mock_domain_cache_invalidate_user support
From
On 2023/12/7 02:16, Jason Gunthorpe wrote:
> On Fri, Nov 17, 2023 at 05:07:15AM -0800, Yi Liu wrote:
>> +static int
>> +mock_domain_cache_invalidate_user(struct iommu_domain *domain,
>> + struct iommu_user_data_array *array,
>> + u32 *error_code)
>> +{
>> + struct mock_iommu_domain_nested *mock_nested =
>> + container_of(domain, struct mock_iommu_domain_nested, domain);
>> + struct iommu_hwpt_invalidate_selftest inv;
>> + int rc = 0;
>> + int i, j;
>> +
>> + if (domain->type != IOMMU_DOMAIN_NESTED)
>> + return -EINVAL;
>
> The core code already checked this, and it is only present on
> domain_nested_ops so it is checked twice already..

would drop it. thanks.

--
Regards,
Yi Liu

\
 
 \ /
  Last update: 2023-12-11 12:24    [W:1.929 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site