forked from luck/tmp_suning_uos_patched
iommu: Implement DOMAIN_ATTR_PAGING attribute
This attribute of a domain can be queried to find out if the domain supports setting up page-tables using the iommu_map() and iommu_unmap() functions. Signed-off-by: Joerg Roedel <joro@8bytes.org>
This commit is contained in:
parent
57886518a8
commit
d2e1216016
|
@ -869,6 +869,7 @@ int iommu_domain_get_attr(struct iommu_domain *domain,
|
|||
enum iommu_attr attr, void *data)
|
||||
{
|
||||
struct iommu_domain_geometry *geometry;
|
||||
bool *paging;
|
||||
int ret = 0;
|
||||
|
||||
switch (attr) {
|
||||
|
@ -876,6 +877,10 @@ int iommu_domain_get_attr(struct iommu_domain *domain,
|
|||
geometry = data;
|
||||
*geometry = domain->geometry;
|
||||
|
||||
break;
|
||||
case DOMAIN_ATTR_PAGING:
|
||||
paging = data;
|
||||
*paging = (domain->ops->pgsize_bitmap != 0UL);
|
||||
break;
|
||||
default:
|
||||
if (!domain->ops->domain_get_attr)
|
||||
|
|
|
@ -59,6 +59,7 @@ struct iommu_domain {
|
|||
|
||||
enum iommu_attr {
|
||||
DOMAIN_ATTR_GEOMETRY,
|
||||
DOMAIN_ATTR_PAGING,
|
||||
DOMAIN_ATTR_MAX,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user