From nobody Sat Nov 8 07:17:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1550141439057527.3910397419403; Thu, 14 Feb 2019 02:50:39 -0800 (PST) Received: from localhost ([127.0.0.1]:46054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guEbE-0003qr-2C for importer@patchew.org; Thu, 14 Feb 2019 05:50:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guEYj-0002H2-Er for qemu-devel@nongnu.org; Thu, 14 Feb 2019 05:48:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guEYi-0002gj-5S for qemu-devel@nongnu.org; Thu, 14 Feb 2019 05:48:01 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:55037) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guEYh-0002Uy-Qk; Thu, 14 Feb 2019 05:48:00 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MlfGs-1hLLuW3hXG-00imvM; Thu, 14 Feb 2019 11:47:43 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 14 Feb 2019 11:47:11 +0100 Message-Id: <20190214104717.3543-9-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190214104717.3543-1-laurent@vivier.eu> References: <20190214104717.3543-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:iaG/nFgEendP6IDARXyTKjdsT7UpTyxg0+hriBohdWV6KSBFIyM 3ZYDO8HFuCJy2+CmRxZW6gDJyX9r+U4T+TVkCtKaea4kNebmf0jD/gw5e8bFMaogy4FHgTW JjJQQJvnn0MoZQ8oEeat92gnV3ZFIxq5jA+JatowoouzZOMIjgmo0mDTN+l5U6hVJvRYgSh FbAA26VuJ3yRFytzPgQvg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ySIu+flUAaM=:dRQQ3e5+t0Ve3mK1PyaUR6 +3eegs8b89JaX3BMhztTgrcWJnxXYxWCqM3v9KKtRq/vkUYNfn2SnzfhBQDYYuxn4yeaLe7wY DxWWBbQo8QQf9grK1ttknBuLp9XMjTOM+e2nkDUHOgqZUe6OWXSDUz85uetoRwWZlBT4veCtl OvDVoUVMqIBWLP4OV1to9pNz0RAIABluNE/3bvZuXkDS3oARIfD6G4sG3khqaJJuvjgHOi+Jn RrXTUqFzzgFQ+88IoK2GEFGuKLkzpEV32u3E4Y55g9wow9FbSBI4GMPiZttBk9+mkeTrpuNk4 EplbmsJxbtDtsLkS9xcj6ff3qzJoU9LLDCB/HP8cZbrQtSinWW4hZP/FTf179/x8LHo0eXLnq 8/qa8iwlFauHuhhUAIjzY//v0/OpCY2wyixoV5/Fgz03Os8SlIciByvx5T/fGwOjsM11YWxs8 lSzmsE1+FUS3eUIZWYME6jNpNkcElMkYDacsDNqPNCYVyL9vTNqiLyQbNS65hshNBnJpNhMyV fr/JGpksv4lb/3qjhc+n96uvHMJ0VeuEymZ07zirJvL4MSVVfsEo6RUofaiIUkrUwXRXE8rqP izHg1NHa9Q1lAne9wpCdpk2N76FhqTW78VJ/ChI8ZyBxyQcamxjxIEf+Iw2OutB0gLxRE3x0V Xv+Yj6HzLDlzXikALVqvnpY9OjVZzOe1uJ9uKIruMmSLYmTldci6m56tc24KEO54vF9152+6X kf0b95L28erEj1w6jXcXoLrosM0Cp6zGekrQRNFizBQXmjwSp2mxQyLNHqA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.187 Subject: [Qemu-devel] [PULL 08/14] pckbd: Convert DPRINTF->trace 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: kvm@vger.kernel.org, "Michael S. Tsirkin" , libvir-list@redhat.com, Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Tokarev , Laurent Vivier , Markus Armbruster , qemu-trivial@nongnu.org, Kamil Rytarowski , Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , "Dr. David Alan Gilbert" , Artyom Tarasenko Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Message-Id: <20181016112232.23241-1-dgilbert@redhat.com> Signed-off-by: Laurent Vivier --- hw/input/pckbd.c | 19 ++++++------------- hw/input/trace-events | 7 +++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index 72e7d5f6cc50..47a606f5e3a0 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -30,14 +30,7 @@ #include "hw/input/i8042.h" #include "sysemu/sysemu.h" =20 -/* debug PC keyboard */ -//#define DEBUG_KBD -#ifdef DEBUG_KBD -#define DPRINTF(fmt, ...) \ - do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) -#endif +#include "trace.h" =20 /* Keyboard Controller Commands */ #define KBD_CCMD_READ_MODE 0x20 /* Read mode bits */ @@ -210,7 +203,7 @@ static uint64_t kbd_read_status(void *opaque, hwaddr ad= dr, KBDState *s =3D opaque; int val; val =3D s->status; - DPRINTF("kbd: read status=3D0x%02x\n", val); + trace_pckbd_kbd_read_status(val); return val; } =20 @@ -224,7 +217,7 @@ static void kbd_queue(KBDState *s, int b, int aux) =20 static void outport_write(KBDState *s, uint32_t val) { - DPRINTF("kbd: write outport=3D0x%02x\n", val); + trace_pckbd_outport_write(val); s->outport =3D val; qemu_set_irq(s->a20_out, (val >> 1) & 1); if (!(val & 1)) { @@ -237,7 +230,7 @@ static void kbd_write_command(void *opaque, hwaddr addr, { KBDState *s =3D opaque; =20 - DPRINTF("kbd: write cmd=3D0x%02" PRIx64 "\n", val); + trace_pckbd_kbd_write_command(val); =20 /* Bits 3-0 of the output port P2 of the keyboard controller may be pu= lsed * low for approximately 6 micro seconds. Bits 3-0 of the KBD_CCMD_PUL= SE @@ -326,7 +319,7 @@ static uint64_t kbd_read_data(void *opaque, hwaddr addr, else val =3D ps2_read_data(s->kbd); =20 - DPRINTF("kbd: read data=3D0x%02x\n", val); + trace_pckbd_kbd_read_data(val); return val; } =20 @@ -335,7 +328,7 @@ static void kbd_write_data(void *opaque, hwaddr addr, { KBDState *s =3D opaque; =20 - DPRINTF("kbd: write data=3D0x%02" PRIx64 "\n", val); + trace_pckbd_kbd_write_data(val); =20 switch(s->write_cmd) { case 0: diff --git a/hw/input/trace-events b/hw/input/trace-events index 3965a842aee5..8e53ae5bbf15 100644 --- a/hw/input/trace-events +++ b/hw/input/trace-events @@ -14,6 +14,13 @@ adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "= reg %d obuf[0] 0x%2.2x o adb_mouse_request_change_addr(int devaddr) "change addr to 0x%x" adb_mouse_request_change_addr_and_handler(int devaddr, int handler) "chang= e addr and handler to 0x%x, 0x%x" =20 +# hw/input/pckbd.c +pckbd_kbd_read_data(uint32_t val) "0x%02x" +pckbd_kbd_read_status(int status) "0x%02x" +pckbd_outport_write(uint32_t val) "0x%02x" +pckbd_kbd_write_command(uint64_t val) "0x%02"PRIx64 +pckbd_kbd_write_data(uint64_t val) "0x%02"PRIx64 + # hw/input/ps2.c ps2_put_keycode(void *opaque, int keycode) "%p keycode 0x%02x" ps2_keyboard_event(void *opaque, int qcode, int down, unsigned int modifie= r, unsigned int modifiers) "%p qcode %d down %d modifier 0x%x modifiers 0x%= x" --=20 2.20.1