• Andrei Dulea's avatar
    iommu/amd: Unmap all L7 PTEs when downgrading page-sizes · cc449541
    Andrei Dulea authored
    When replacing a large mapping created with page-mode 7 (i.e.
    non-default page size), tear down the entire series of replicated PTEs.
    Besides providing access to the old mapping, another thing that might go
    wrong with this issue is on the fetch_pte() code path that can return a
    PDE entry of the newly re-mapped range.
    
    While at it, make sure that we flush the TLB in case alloc_pte() fails
    and returns NULL at a lower level.
    
    Fixes: 6d568ef9 ("iommu/amd: Allow downgrading page-sizes in alloc_pte()")
    Signed-off-by: default avatarAndrei Dulea <adulea@amazon.de>
    cc449541
amd_iommu.c 107 KB