summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd/amd_iommu_types.h
diff options
context:
space:
mode:
authorVasant Hegde <vasant.hegde@amd.com>2023-03-21 12:23:47 +0300
committerJoerg Roedel <jroedel@suse.de>2023-03-22 17:43:39 +0300
commit0d571dcbe7c6d36dcfcb8e04a49cc01fe462d171 (patch)
treed75be2be5e0d6751ccedec4dade0189e5f268f1b /drivers/iommu/amd/amd_iommu_types.h
parente8d018dd0257f744ca50a729e3d042cf2ec9da65 (diff)
downloadlinux-0d571dcbe7c6d36dcfcb8e04a49cc01fe462d171.tar.xz
iommu/amd: Allocate page table using numa locality info
Introduce 'struct protection_domain->nid' variable. It will contain IOMMU NUMA node ID. And allocate page table pages using IOMMU numa locality info. This optimizes page table walk by IOMMU. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20230321092348.6127-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd/amd_iommu_types.h')
-rw-r--r--drivers/iommu/amd/amd_iommu_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index 3d684190b4d5..e5cfdeaaad48 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -549,6 +549,7 @@ struct protection_domain {
spinlock_t lock; /* mostly used to lock the page table*/
u16 id; /* the domain id written to the device table */
int glx; /* Number of levels for GCR3 table */
+ int nid; /* Node ID */
u64 *gcr3_tbl; /* Guest CR3 table */
unsigned long flags; /* flags to find out type of domain */
unsigned dev_cnt; /* devices assigned to this domain */