aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-02-10 23:45:10 -0500
committerRusty Russell <rusty@rustcorp.com.au>2015-02-11 01:17:32 -0500
commit48fd6b71d60ef66ef2d791045d750168c0d09201 (patch)
treefcb01466eada372e4de571eff88fb5af41d36096
parentc565650b1028bc551e5d16dd0ec8f7078da7cace (diff)
lguest: suppress PS/2 keyboard polling.
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 <rusty@rustcorp.com.au>
-rw-r--r--tools/lguest/lguest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c
index b2217657f62c..485fe13db12e 100644
--- a/tools/lguest/lguest.c
+++ b/tools/lguest/lguest.c
@@ -1259,6 +1259,10 @@ static void emulate_insn(const u8 insn[])
1259 else 1259 else
1260 mask = 0xFFFFFFFF; 1260 mask = 0xFFFFFFFF;
1261 1261
1262 /* This is the PS/2 keyboard status; 1 means ready for output */
1263 if (port == 0x64)
1264 val = 1;
1265
1262 /* 1266 /*
1263 * If it was an "IN" instruction, they expect the result to be read 1267 * If it was an "IN" instruction, they expect the result to be read
1264 * into %eax, so we change %eax. 1268 * into %eax, so we change %eax.