Skip to content

Commit

Permalink
OvmfPkg: Fix the issue in IO #VE handler
Browse files Browse the repository at this point in the history
  • Loading branch information
gaojiaqi7 committed Aug 30, 2021
1 parent 93ea9c5 commit 47627d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OvmfPkg/Library/VmTdExitLib/VmTdExitVeHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,18 @@ IoExit(
Val = 0;
if (Write == TRUE) {
CopyMem (&Val, (VOID *) Regs->Rsi, Size);
Regs->Rsi += Size;
}
Regs->Rsi += Size;

Status = TdVmCall(EXIT_REASON_IO_INSTRUCTION, Size, Write, Port, Val, (Write ? NULL : &Val));
if (Status != 0) {
break;
}
if (Write == FALSE) {
CopyMem ((VOID *) Regs->Rdi, &Val, Size);
Regs->Rdi += Size;
}
Regs->Rdi += Size;

if (Veinfo->ExitQualification.Io.Rep) {
Regs->Rcx -= 1;
}
Expand Down

0 comments on commit 47627d1

Please sign in to comment.