From patchwork Tue Oct 30 08:44:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 195426 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 9FFF82C00B4 for ; Tue, 30 Oct 2012 21:45:01 +1100 (EST) Received: from localhost ([::1]:58334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7SF-0003se-KK for incoming@patchwork.ozlabs.org; Tue, 30 Oct 2012 04:45:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7RF-0002aD-KG for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:44:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TT7R9-0003nX-Tr for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:44:45 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:45766 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7R9-0003kI-MI for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:44:39 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TT7Qw-0005MA-0v; Tue, 30 Oct 2012 08:44:26 +0000 From: Peter Maydell To: Anthony Liguori Date: Tue, 30 Oct 2012 08:44:17 +0000 Message-Id: <1351586664-20525-22-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1351586664-20525-1-git-send-email-peter.maydell@linaro.org> References: <1351586664-20525-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: qemu-devel@nongnu.org, Paul Brook Subject: [Qemu-devel] [PATCH 21/28] hw/versatile_i2c: Use LOG_GUEST_ERROR 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 Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell --- hw/versatile_i2c.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/versatile_i2c.c b/hw/versatile_i2c.c index 44e7e40..ad71e9d 100644 --- a/hw/versatile_i2c.c +++ b/hw/versatile_i2c.c @@ -40,7 +40,8 @@ static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, if (offset == 0) { return (s->out & 1) | (s->in << 1); } else { - hw_error("%s: Bad offset 0x%x\n", __func__, (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad offset 0x%x\n", __func__, (int)offset); return -1; } } @@ -58,7 +59,8 @@ static void versatile_i2c_write(void *opaque, hwaddr offset, s->out &= ~value; break; default: - hw_error("%s: Bad offset 0x%x\n", __func__, (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad offset 0x%x\n", __func__, (int)offset); } bitbang_i2c_set(s->bitbang, BITBANG_I2C_SCL, (s->out & 1) != 0); s->in = bitbang_i2c_set(s->bitbang, BITBANG_I2C_SDA, (s->out & 2) != 0);