Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vioscsi] Fix SDV defects #1181

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions vioscsi/vioscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,9 @@ VioScsiInterrupt(
return FALSE;
}

RhelDbgPrint(TRACE_LEVEL_VERBOSE, " IRQL (%d)\n", KeGetCurrentIrql());
//NOTE : SDV banned function
//RhelDbgPrint(TRACE_LEVEL_VERBOSE, " IRQL (%d)\n", KeGetCurrentIrql());
benyamin-codez marked this conversation as resolved.
Show resolved Hide resolved

intReason = virtio_read_isr_status(&adaptExt->vdev);

if (intReason == 1 || adaptExt->dump_mode) {
Expand Down Expand Up @@ -1777,13 +1779,16 @@ CompleteRequest(
time_msec, srbExt->time, counter.QuadPart, freq.QuadPart);
if (time_msec >= adaptExt->resp_time)
{
UCHAR OpCode = SRB_CDB(Srb)->CDB6GENERIC.OperationCode;
RhelDbgPrint(TRACE_LEVEL_WARNING, "Response Time SRB 0x%p : time %I64d (%lu) : length %d : OpCode 0x%x (%s)\n",
Srb, time_msec, SRB_GET_TIMEOUTVALUE(Srb) * 1000, SRB_DATA_TRANSFER_LENGTH(Srb),
OpCode, DbgGetScsiOpStr(OpCode));
DbgPrint("Response Time SRB 0x%p : time %I64d (%lu) : length %d : OpCode 0x%x (%s)\n",
Srb, time_msec, SRB_GET_TIMEOUTVALUE(Srb) * 1000, SRB_DATA_TRANSFER_LENGTH(Srb),
OpCode, DbgGetScsiOpStr(OpCode));
PCDB cdb = SRB_CDB(Srb);
if (cdb) { // Check for SDV compliance
UCHAR OpCode = cdb->CDB6GENERIC.OperationCode;
RhelDbgPrint(TRACE_LEVEL_WARNING, "Response Time SRB 0x%p : time %I64d (%lu) : length %d : OpCode 0x%x (%s)\n",
Srb, time_msec, SRB_GET_TIMEOUTVALUE(Srb) * 1000, SRB_DATA_TRANSFER_LENGTH(Srb),
OpCode, DbgGetScsiOpStr(OpCode));
DbgPrint("Response Time SRB 0x%p : time %I64d (%lu) : length %d : OpCode 0x%x (%s)\n",
Srb, time_msec, SRB_GET_TIMEOUTVALUE(Srb) * 1000, SRB_DATA_TRANSFER_LENGTH(Srb),
OpCode, DbgGetScsiOpStr(OpCode));
}
}
}
else
Expand Down