Commit 6b38a108 authored by Aashish Sharma's avatar Aashish Sharma Committed by Joerg Roedel
Browse files

iommu/vt-d: Fix unused invalidation hint in qi_desc_iotlb



Invalidation hint (ih) in the function 'qi_desc_iotlb' is initialized
to zero and never used. It is embedded in the 0th bit of the 'addr'
parameter. Get the correct 'ih' value from there.

Fixes: f701c9f3 ("iommu/vt-d: Factor out invalidation descriptor composition")
Signed-off-by: default avatarAashish Sharma <aashish@aashishsharma.net>
Link: https://lore.kernel.org/r/20251009010903.1323979-1-aashish@aashishsharma.net


Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent cb3db5a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1097,7 +1097,7 @@ static inline void qi_desc_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
				 struct qi_desc *desc)
{
	u8 dw = 0, dr = 0;
	int ih = 0;
	int ih = addr & 1;

	if (cap_write_drain(iommu->cap))
		dw = 1;