intel_iommu: piotlb invalidation should notify unmap
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Thu, 12 Dec 2024 08:37:51 +0000 (16:37 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 15 Jan 2025 18:06:27 +0000 (13:06 -0500)
commit1ab93575bdcb2972c99a174a957b598f7457a899
treef08566d717088a06a5875e169a3629d1f248b9f0
parentdd8200503e230a4e32f930f5a57556b04651c16f
intel_iommu: piotlb invalidation should notify unmap

This is used by some emulated devices which caches address
translation result. When piotlb invalidation issued in guest,
those caches should be refreshed.

There is already a similar implementation in iotlb invalidation.
So update vtd_iotlb_page_invalidate_notify() to make it work
also for piotlb invalidation.

For device that does not implement ATS capability or disable
it but still caches the translation result, it is better to
implement ATS cap or enable it if there is need to cache the
translation result.

Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@eviden.com>
Message-Id: <20241212083757.605022-15-zhenzhong.duan@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/intel_iommu.c