Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754659AbbBFFXA (ORCPT ); Fri, 6 Feb 2015 00:23:00 -0500 Received: from ozlabs.org ([103.22.144.67]:35153 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbbBFFWX (ORCPT ); Fri, 6 Feb 2015 00:22:23 -0500 From: Rusty Russell To: "lkml" Cc: Rusty Russell Subject: [PATCH 07/29] lguest: suppress PS/2 keyboard polling. Date: Fri, 6 Feb 2015 15:51:50 +1030 Message-Id: <1423200112-5354-8-git-send-email-rusty@rustcorp.com.au> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423200112-5354-1-git-send-email-rusty@rustcorp.com.au> References: <1423200112-5354-1-git-send-email-rusty@rustcorp.com.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1059 Lines: 33 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 --- tools/lguest/lguest.c | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/