Skip to content

[Deepin-Kernel-SIG] [linux 6.6-y] [ToDo] Backport ("iommu/amd: Set the pgsize_bitmap correctly") to v6.6 #904

@Avenger-285714

Description

@Avenger-285714

Need to backport:

commit 7a41dcb
Author: Jason Gunthorpe jgg@nvidia.com
Date: Thu Aug 29 21:06:12 2024 -0300

iommu/amd: Set the pgsize_bitmap correctly

When using io_pgtable the correct pgsize_bitmap is stored in the cfg, both
v1_alloc_pgtable() and v2_alloc_pgtable() set it correctly.

This fixes a bug where the v2 pgtable had the wrong pgsize as
protection_domain_init_v2() would set it and then do_iommu_domain_alloc()
immediately resets it.

Remove the confusing ops.pgsize_bitmap since that is not used if the
driver sets domain.pgsize_bitmap.

Fixes: 1342881 ("iommu/amd: Add domain_alloc_user based domain allocation")
Reviewed-by: Vasant Hegde vasant.hegde@amd.com
Signed-off-by: Jason Gunthorpe jgg@nvidia.com
Link: https://lore.kernel.org/r/3-v2-831cdc4d00f3+1a315-amd_iopgtbl_jgg@nvidia.com
Signed-off-by: Joerg Roedel jroedel@suse.de

Link: #837
Link: #859

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions