]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/amd: Lock DTE before updating the entry with WRITE_ONCE()
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 18 Nov 2024 05:49:36 +0000 (05:49 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 18 Dec 2024 08:37:42 +0000 (09:37 +0100)
commit457da57646686fcb38b3f61b153920ca08200078
treee869ef9243349081e0781bec548e8faccb79ea2c
parent66ea3f96ae2b02cf543f3373b67aa6b8c6794926
iommu/amd: Lock DTE before updating the entry with WRITE_ONCE()

When updating only within a 64-bit tuple of a DTE, just lock the DTE and
use WRITE_ONCE() because it is writing to memory read back by HW.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20241118054937.5203-9-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/iommu.c