Skip to content

Commit c201226

Browse files
aikdjbw
authored andcommitted
crypto/ccp: Allow multiple streams on the same root bridge
With SEV-TIO the low-level TSM driver is responsible for allocating a Stream ID. The Stream ID needs to be unique within each IDE partner port. Fix the Stream ID selection to reuse the host bridge stream resource id which is a pool of 256 ids per host bridge on AMD platforms. Otherwise, only one device per-host bridge can establish Selective Stream IDE. Fixes: 4be4235 ("crypto/ccp: Implement SEV-TIO PCIe IDE (phase1)") Signed-off-by: Alexey Kardashevskiy <aik@amd.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://patch.msgid.link/20260123053057.1350569-3-aik@amd.com [djbw: clarify end user impact in changelog] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 403dd7d commit c201226

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/crypto/ccp/sev-dev-tsm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ static int stream_alloc(struct pci_dev *pdev, struct pci_ide **ide,
198198
if (!ide1)
199199
return -EFAULT;
200200

201-
/* Blindly assign streamid=0 to TC=0, and so on */
202-
ide1->stream_id = tc;
201+
ide1->stream_id = ide1->host_bridge_stream;
203202

204203
ide[tc] = ide1;
205204

0 commit comments

Comments
 (0)