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: 12212 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0ACB42418C for ; Sun, 14 Oct 2012 13:11:23 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id AE1B8A18C46 for ; Sun, 14 Oct 2012 13:11:22 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so6506595iej.11 for ; Sun, 14 Oct 2012 06:11:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=YjSOVULMqk5TfVuOJ43ohx4safdNP65QHH+1TzHU6wA=; b=NB1i9mT7SHWJJSu1UEIE6BqgiaNcliHOlQ2J8eYW3x0Mzz1lSxh6XEWPAwa01/9zDC +22FZyeOgJV8AKND+71tSiprPQeRJryCTEaYhXLifU+zeW8Zb+D7rul4ImXVKJLeV9Gb /0qIhsvXRRdRLkYoDcrHltV5+q7mBam8rMSi4cfyD6uoRXTl3sSOchyG70ZwKbGoKnll 1ykB1U+c0FR9761XwgkvYTgvGlClI1tgO75fk/BrIxOKDj3gtAsEeZGjQphGSRwvw8pe bDpQBQNpu9K8LWpXenDxO1Vjya7Qq5oaMQWu3uTob27l2F3N1hinYM5mQtBAWeJp6HKQ yOtw== Received: by 10.42.145.66 with SMTP id e2mr6897078icv.18.1350220282163; Sun, 14 Oct 2012 06:11:22 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp450960igt; Sun, 14 Oct 2012 06:11:20 -0700 (PDT) Received: by 10.204.131.75 with SMTP id w11mr2523503bks.111.1350220279579; Sun, 14 Oct 2012 06:11:19 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id gs13si20618896bkc.73.2012.10.14.06.11.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Oct 2012 06:11:19 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org, Blue Swirl Subject: [PATCH 1/7] qemu-log: Add new log category for guest bugs 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-Gm-Message-State: ALoCoQnqYCob8wbfnsV2Vm3uqFJCJq60ydPi8/R8kX3uEljcQ/n4A4Zm7ERetDwSk4/ZYCv6x19A 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 */