From nobody Mon Feb 9 20:10:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513791335861445.8736811314784; Wed, 20 Dec 2017 09:35:35 -0800 (PST) Received: from localhost ([::1]:60449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRiH4-0004Cu-H1 for importer@patchew.org; Wed, 20 Dec 2017 12:35:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRhyU-0004mU-6a for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRhyT-0007JO-BX for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:10 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:39003) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRhyT-0007J3-4e for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:09 -0500 Received: by mail-wm0-x244.google.com with SMTP id i11so11095992wmf.4 for ; Wed, 20 Dec 2017 09:16:09 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-251-125.clienti.tiscali.it. [78.12.251.125]) by smtp.gmail.com with ESMTPSA id f125sm2751101wme.45.2017.12.20.09.16.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Dec 2017 09:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xb3ideVOQilzPcbANaBhagw4MFAyC7x3pFpkU7CX3lE=; b=AF4KV1gnAYeK5IqLN+rdJ/roqNwi9roJj7ZCtf2kqFsugd19TkxuDd+WuGi4PJJTkM B6q5nb04n41UtZCRgAHHZdDRneTJvHY17s83hAJ5xLQLggcm67mSFss22Prp9e1YiEgO uD2gjuKENpQpkqFU9SYcKXxFOd2Nkau6ioRSeo3V61FxtPiH0lTIz53F8d9CbeICbGVp y6S2lNdk/HN448hfZSTEyoMAOTsaIk4zqdWwxJ8uxF12cZ2fTTkHTM/LF7+7St5Igtoa p2INTS6RvSHdWrOUzHuw9N1Ay9Lje3DpkY+qQOEES0hCm8ZY9JWMkUCBOUzoZb5n/dCT cWVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Xb3ideVOQilzPcbANaBhagw4MFAyC7x3pFpkU7CX3lE=; b=lKpMs0y1T9mfCdBtPFQ25nfR3qB8KTR3xdH+YjY1Xz0sqca3/16rMPWWWz5YqsC5VS zJUhgFoh6lemEEAVXJLEHieQDJneRRZejHCG2xYGtiLDvBV8K6Y2YSiBCVhuzCSe2/hP XigHuABfBIUbgQvi1ZCdivSG5pN0rWM6rVfjzkf0cj6p65iOph0VQwtqwkz5tXVuvtEr b1E1LfKF8k4R6vJM85klXQEVEtyIbHYC7sh9VbTMw25xWPPfFR7vHHDsTirG9aTJisKq botsHjLlNm6m0XZSnjKNnnX2tixkyd8DnUO/t16jUG8PRmrSqmYaIu8wrlP8o14oqXxX sKCA== X-Gm-Message-State: AKGB3mKD8mGW+RXFbiLe91XcN0D/raClRjV3vAmD4U7db7eB18BiJK7d qSWpIzJ0bn+4A7vFO3Z6f2bx8LDi X-Google-Smtp-Source: ACJfBosnJS0W4geGD4oIjmL1vJRkhQKGNzr7haqQcBTMXQtOhT3v5tXrDk8AqadOEGFx72U/pOjBJA== X-Received: by 10.28.48.4 with SMTP id w4mr7354265wmw.16.1513790167856; Wed, 20 Dec 2017 09:16:07 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 18:14:43 +0100 Message-Id: <1513790098-9815-32-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513790098-9815-1-git-send-email-pbonzini@redhat.com> References: <1513790098-9815-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 31/46] hw/i386/vmport: replace fprintf() by trace events or LOG_UNIMP 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20171215034356.4449-2-f4bug@amsat.org> [Replace unknown command tracepoint with LOG_UNIMP, add generic tracepoint for vmport commands. - Paolo] Signed-off-by: Paolo Bonzini --- hw/i386/trace-events | 4 ++++ hw/i386/vmport.c | 14 +++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/i386/trace-events b/hw/i386/trace-events index d43b4b6..22d4464 100644 --- a/hw/i386/trace-events +++ b/hw/i386/trace-events @@ -113,3 +113,7 @@ amdvi_mode_invalid(uint8_t level, uint64_t addr)"error:= translation level 0x%"PR amdvi_page_fault(uint64_t addr) "error: page fault accessing guest physica= l address 0x%"PRIx64 amdvi_iotlb_hit(uint8_t bus, uint8_t slot, uint8_t func, uint64_t addr, ui= nt64_t txaddr) "hit iotlb devid %02x:%02x.%x gpa 0x%"PRIx64" hpa 0x%"PRIx64 amdvi_translation_result(uint8_t bus, uint8_t slot, uint8_t func, uint64_t= addr, uint64_t txaddr) "devid: %02x:%02x.%x gpa 0x%"PRIx64" hpa 0x%"PRIx64 + +# hw/i386/vmport.c +vmport_register(unsigned char command, void *func, void *opaque) "command:= 0x%02x func: %p opaque: %p" +vmport_command(unsigned char command) "command: 0x%02x" diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index eb880c6..9b8c688 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -27,8 +27,7 @@ #include "hw/i386/pc.h" #include "sysemu/hw_accel.h" #include "hw/qdev.h" - -/* #define VMPORT_DEBUG */ +#include "trace.h" =20 #define VMPORT_CMD_GETVERSION 0x0a #define VMPORT_CMD_GETRAMSIZE 0x14 @@ -54,6 +53,7 @@ void vmport_register(unsigned char command, VMPortReadFun= c *func, void *opaque) return; } =20 + trace_vmport_register(command, func, opaque); port_state->func[command] =3D func; port_state->opaque[command] =3D opaque; } @@ -76,13 +76,9 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr = addr, } =20 command =3D env->regs[R_ECX]; - if (command >=3D VMPORT_ENTRIES) { - return eax; - } - if (!s->func[command]) { -#ifdef VMPORT_DEBUG - fprintf(stderr, "vmport: unknown command %x\n", command); -#endif + trace_vmport_command(command); + if (command >=3D VMPORT_ENTRIES || !s->func[command]) { + qemu_log_mask(LOG_UNIMP, "vmport: unknown command %x\n", command); return eax; } =20 --=20 1.8.3.1