Skip to content

Commit

Permalink
lguest: suppress PS/2 keyboard polling.
Browse files Browse the repository at this point in the history
While hacking on getting I/O out to the lguest launcher, I noticed
that returning 0xFF for the PS/2 keyboard status made it spin for a
while thinking there was a key pending.  Fix this by returning 1
instead of 0xFF.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Feb 11, 2015
1 parent c565650 commit 48fd6b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,10 @@ static void emulate_insn(const u8 insn[])
else
mask = 0xFFFFFFFF;

/* This is the PS/2 keyboard status; 1 means ready for output */
if (port == 0x64)
val = 1;

/*
* If it was an "IN" instruction, they expect the result to be read
* into %eax, so we change %eax.
Expand Down

0 comments on commit 48fd6b7

Please sign in to comment.