Skip to content

Commit 4f178e0

Browse files
yiliu1765joergroedel
authored andcommitted
iommu/vt-d: Drop s1_pgtbl from dmar_domain
dmar_domian has stored the s1_cfg which includes the s1_pgtbl info, so no need to store s1_pgtbl, hence drop it. Signed-off-by: Yi Liu <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 95e2eaf commit 4f178e0

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

drivers/iommu/intel/iommu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,6 @@ struct dmar_domain {
653653
struct {
654654
/* parent page table which the user domain is nested on */
655655
struct dmar_domain *s2_domain;
656-
/* user page table pointer (in GPA) */
657-
unsigned long s1_pgtbl;
658656
/* page table attributes */
659657
struct iommu_hwpt_vtd_s1 s1_cfg;
660658
/* link to parent domain siblings */

drivers/iommu/intel/nested.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ struct iommu_domain *intel_nested_domain_alloc(struct iommu_domain *parent,
162162

163163
domain->use_first_level = true;
164164
domain->s2_domain = s2_domain;
165-
domain->s1_pgtbl = vtd.pgtbl_addr;
166165
domain->s1_cfg = vtd;
167166
domain->domain.ops = &intel_nested_domain_ops;
168167
domain->domain.type = IOMMU_DOMAIN_NESTED;

drivers/iommu/intel/pasid.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev,
560560
u32 pasid, struct dmar_domain *domain)
561561
{
562562
struct iommu_hwpt_vtd_s1 *s1_cfg = &domain->s1_cfg;
563-
pgd_t *s1_gpgd = (pgd_t *)(uintptr_t)domain->s1_pgtbl;
564563
struct dmar_domain *s2_domain = domain->s2_domain;
565564
u16 did = domain_id_iommu(domain, iommu);
566565
struct dma_pte *pgd = s2_domain->pgd;
@@ -611,7 +610,7 @@ int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev,
611610
if (s1_cfg->addr_width == ADDR_WIDTH_5LEVEL)
612611
pasid_set_flpm(pte, 1);
613612

614-
pasid_set_flptr(pte, (uintptr_t)s1_gpgd);
613+
pasid_set_flptr(pte, s1_cfg->pgtbl_addr);
615614

616615
if (s1_cfg->flags & IOMMU_VTD_S1_SRE) {
617616
pasid_set_sre(pte);

0 commit comments

Comments
 (0)