iommu/amd: Switch amd_iommu_update_ga() to use modify_irte_ga()
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 30 May 2023 14:11:33 +0000 (10:11 -0400)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Jun 2023 12:47:08 +0000 (14:47 +0200)
commita42f0c7a4118ffa395866cc7f5522d71a86fc4dd
tree8e781c89267b35c1799ed0ec8555d268609e4a3e
parent75a616168b7810c30aa26819153c64df43bc9d9e
iommu/amd: Switch amd_iommu_update_ga() to use modify_irte_ga()

The modify_irte_ga() uses cmpxchg_double() to update the IRTE in one shot,
which is necessary when adding IRTE cache disabling support since
the driver no longer need to flush the IRT for hardware to take effect.

Please note that there is a functional change where the IsRun and
Destination bits of IRTE are now cached in the struct amd_ir_data.entry.

Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20230530141137.14376-2-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c