AMD/IOMMU: abstract maximum number of page table levels

We will want to use the constant elsewhere.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
This commit is contained in:
Jan Beulich committed 2022-04-05 14:20:04 +02:00
1 parent 54c5cef492
commit a038b514c1
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -106,6 +106,7 @@ struct amd_iommu_dte {
bool tv:1;
unsigned int :5;
unsigned int had:2;
#define IOMMU_MAX_PT_LEVELS 6
unsigned int paging_mode:3;
uint64_t pt_root:40;
bool ppr:1;
+1 -1
View File
@@ -337,7 +337,7 @@ int amd_iommu_alloc_root(struct domain *d)
return 0;
}
unsigned int __read_mostly amd_iommu_max_paging_mode = 6;
unsigned int __read_mostly amd_iommu_max_paging_mode = IOMMU_MAX_PT_LEVELS;
int __read_mostly amd_iommu_min_paging_mode = 1;
static int cf_check amd_iommu_domain_init(struct domain *d)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.