Skip to content

Commit 94a568c

Browse files
John Sperbeckjoergroedel
authored andcommitted
iommu/amd: use full 64-bit value in build_completion_wait()
We started using a 64 bit completion value. Unfortunately, we only stored the low 32-bits, so a very large completion value would never be matched in iommu_completion_wait(). Fixes: c69d89a ("iommu/amd: Use 4K page for completion wait write-back semaphore") Signed-off-by: John Sperbeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 7e18e42 commit 94a568c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,8 @@ static void build_completion_wait(struct iommu_cmd *cmd,
939939
memset(cmd, 0, sizeof(*cmd));
940940
cmd->data[0] = lower_32_bits(paddr) | CMD_COMPL_WAIT_STORE_MASK;
941941
cmd->data[1] = upper_32_bits(paddr);
942-
cmd->data[2] = data;
942+
cmd->data[2] = lower_32_bits(data);
943+
cmd->data[3] = upper_32_bits(data);
943944
CMD_SET_TYPE(cmd, CMD_COMPL_WAIT);
944945
}
945946

0 commit comments

Comments
 (0)