From patchwork Thu Oct 18 13:11:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12336 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 6DE8F23DE2 for ; Thu, 18 Oct 2012 13:11:50 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0A236A18611 for ; Thu, 18 Oct 2012 13:11:49 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so6108395iag.11 for ; Thu, 18 Oct 2012 06:11:49 -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=j9pMGoFz7QQZlxSaCn8hc0Kg7YRHUqGuPeesv9iyWW0=; b=kdJGnBGwKgqyJ1xtnw6oTfF4pUMov5b5+t+Y4EL22SKsBqnCWyx3GSNZIrnW5kXaoj 13ouPhoPFDGp0fMAlKD12JQQtcs/kSGVcdhVUnN0Vx5iT/kwRc2YlxaHRXONi0h79K/z kdJfzubsQpI545Y+4fyxIZeciYL8z/YuMoGmxHNcwk5TgPgf6FKukuXphN9HTmoeX0kQ eFM7yiN0oX8fard530hMEU1ztijWaYY8UgxOVWzUUJx7h2IC3vKIFlsQwDq2/GN0qZfs AjcG7ySI3quOoRS56Xz38XBkWYmzoURIAuaiJskHnTHSLCgtylkHZWYSWgFq9XoUkLGa 1kxw== Received: by 10.50.168.37 with SMTP id zt5mr4626244igb.57.1350565909783; Thu, 18 Oct 2012 06:11:49 -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 n20csp1069416igt; Thu, 18 Oct 2012 06:11:46 -0700 (PDT) Received: by 10.152.124.180 with SMTP id mj20mr18527341lab.43.1350565905724; Thu, 18 Oct 2012 06:11:45 -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 d9si16126801lae.10.2012.10.18.06.11.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Oct 2012 06:11:45 -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 1TOpt0-0006Eb-FX; Thu, 18 Oct 2012 14:11:42 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Blue Swirl Subject: [PATCH v2 1/8] qemu-log: Add new log category for guest bugs Date: Thu, 18 Oct 2012 14:11:35 +0100 Message-Id: <1350565902-23940-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1350565902-23940-1-git-send-email-peter.maydell@linaro.org> References: <1350565902-23940-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQnyILl9FcyOugRiJBmnPfhxeLdAMt7eUQuxlOuNaY++b7s8FfcGxNN4gh5s3oDor8r4nISa 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 */