From patchwork Wed Aug 23 15:09:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang Yan X-Patchwork-Id: 9917597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C46E603FA for ; Wed, 23 Aug 2017 15:11:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EEBD289BC for ; Wed, 23 Aug 2017 15:11:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6877F2899C; Wed, 23 Aug 2017 15:11:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 754D6289BE for ; Wed, 23 Aug 2017 15:11:32 +0000 (UTC) Received: from localhost ([::1]:44191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkXIo-0000py-Cc for patchwork-qemu-devel@patchwork.kernel.org; Wed, 23 Aug 2017 11:10:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkXHh-0000oO-2A for qemu-devel@nongnu.org; Wed, 23 Aug 2017 11:09:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkXHb-000347-Sk for qemu-devel@nongnu.org; Wed, 23 Aug 2017 11:09:33 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:58820) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkXHb-00032b-Ip; Wed, 23 Aug 2017 11:09:27 -0400 Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Wed, 23 Aug 2017 17:09:24 +0200 Received: from linux-gp66.suse.de (nwb-a10-snat.microfocus.com [10.120.13.202]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Wed, 23 Aug 2017 16:09:10 +0100 From: Liang Yan To: sstabellini@kernel.org, anthony.perard@citrix.com Date: Wed, 23 Aug 2017 11:09:03 -0400 Message-Id: <20170823150903.19982-1-lyan@suse.com> X-Mailer: git-send-email 2.14.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.135.221.5 Subject: [Qemu-devel] [PATCH] hw/display/xenfb.c: Add trace_xenfb_key_event X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, xen-devel@lists.xenproject.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP It may be better to add a trace event to monitor the last moment of a key event from QEMU to guest VM Signed-off-by: Liang Yan --- hw/display/trace-events | 1 + hw/display/xenfb.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/display/trace-events b/hw/display/trace-events index ed8cca0755..da498c1def 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -6,6 +6,7 @@ jazz_led_write(uint64_t addr, uint8_t new) "write addr=0x%"PRIx64": 0x%x" # hw/display/xenfb.c xenfb_mouse_event(void *opaque, int dx, int dy, int dz, int button_state, int abs_pointer_wanted) "%p x %d y %d z %d bs 0x%x abs %d" +xenfb_key_event(void *opaque, int scancode, int button_state) "%p scancode %d bs 0x%x" xenfb_input_connected(void *xendev, int abs_pointer_wanted) "%p abs %d" # hw/display/g364fb.c diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index df8b78f6f4..afc43f33a2 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -290,6 +290,8 @@ static void xenfb_key_event(void *opaque, int scancode) scancode |= 0x80; xenfb->extended = 0; } + + trace_xenfb_key_event(opaque, scancode2linux[scancode], down); xenfb_send_key(xenfb, down, scancode2linux[scancode]); }