From patchwork Sun Oct 14 13:11:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 191358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 24BA22C0096 for ; Mon, 15 Oct 2012 00:18:19 +1100 (EST) Received: from localhost ([::1]:51826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNNzJ-0007VX-67 for incoming@patchwork.ozlabs.org; Sun, 14 Oct 2012 09:12:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNNyZ-0005Eh-RJ for qemu-devel@nongnu.org; Sun, 14 Oct 2012 09:11:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNNyY-0002Sn-Ee for qemu-devel@nongnu.org; Sun, 14 Oct 2012 09:11:27 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:42693 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNNyY-0002Rm-7g for qemu-devel@nongnu.org; Sun, 14 Oct 2012 09:11:26 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TNNyO-0004GA-5u; Sun, 14 Oct 2012 14:11:16 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Sun, 14 Oct 2012 14:11:10 +0100 Message-Id: <1350220276-16349-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1350220276-16349-1-git-send-email-peter.maydell@linaro.org> References: <1350220276-16349-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 217.169.0.38 Cc: Blue Swirl , patches@linaro.org Subject: [Qemu-devel] [PATCH 1/7] qemu-log: Add new log category for guest bugs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add a new category for device models to log guest behaviour which is likely to be a guest bug of some kind (accessing nonexistent registers, reading 32 bit wide registers with a byte access, etc). Making this its own log category allows those who care (mostly guest OS authors) to see the complaints without bothering most users. Signed-off-by: Peter Maydell --- qemu-log.c | 3 +++ qemu-log.h | 1 + 2 files changed, 4 insertions(+) diff --git a/qemu-log.c b/qemu-log.c index 396aafd..a4c3d1f 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -116,6 +116,9 @@ const CPULogItem cpu_log_items[] = { "show all i/o ports accesses" }, { LOG_UNIMP, "unimp", "log unimplemented functionality" }, + { LOG_GUEST_ERROR, "guest_errors", + "log when the guest OS does something invalid (eg accessing a\n" + "non-existent register)" }, { 0, NULL, NULL }, }; diff --git a/qemu-log.h b/qemu-log.h index 5ccecf3..ce6bb09 100644 --- a/qemu-log.h +++ b/qemu-log.h @@ -35,6 +35,7 @@ static inline bool qemu_log_enabled(void) #define CPU_LOG_TB_CPU (1 << 8) #define CPU_LOG_RESET (1 << 9) #define LOG_UNIMP (1 << 10) +#define LOG_GUEST_ERROR (1 << 11) /* Returns true if a bit is set in the current loglevel mask */