projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7bfaa7
)
iommu/amd: Do not allocate io_pgtable_ops for passthrough domain
author
Vasant Hegde
<vasant.hegde@amd.com>
Thu, 5 Jan 2023 09:17:28 +0000
(09:17 +0000)
committer
Joerg Roedel
<jroedel@suse.de>
Fri, 13 Jan 2023 16:02:34 +0000
(17:02 +0100)
In passthrough mode we do not use IOMMU page table. Hence we don't need
to allocate io_pgtable_ops.
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link:
https://lore.kernel.org/r/20230105091728.42469-1-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/amd/iommu.c
b/drivers/iommu/amd/iommu.c
index cbeaab55c0dbccb3e3c4e0ad86839f6cd52a137d..b7c1eac1dfa512b0c31fa43bad7ca20e8c582aa1 100644
(file)
--- a/
drivers/iommu/amd/iommu.c
+++ b/
drivers/iommu/amd/iommu.c
@@
-2072,6
+2072,10
@@
static struct protection_domain *protection_domain_alloc(unsigned int type)
if (ret)
goto out_err;
+ /* No need to allocate io pgtable ops in passthrough mode */
+ if (type == IOMMU_DOMAIN_IDENTITY)
+ return domain;
+
pgtbl_ops = alloc_io_pgtable_ops(pgtable, &domain->iop.pgtbl_cfg, domain);
if (!pgtbl_ops) {
domain_id_free(domain->id);