From: Rusty Russell Date: Wed, 11 Feb 2015 04:45:10 +0000 (+1030) Subject: lguest: suppress PS/2 keyboard polling. X-Git-Tag: firefly_0821_release~176^2~2282^2~40 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=48fd6b71d60ef66ef2d791045d750168c0d09201;p=firefly-linux-kernel-4.4.55.git 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 --- 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[]) 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.