From nobody Sun May 19 02:38:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1589795618; cv=none; d=zohomail.com; s=zohoarc; b=LSrOgXCblM0dJVSYNZtqIRxDBjS87DT98D2DEAy4/4nJ3kk+eoplTTZbRHJ+tGvOUUOWQKJ15kp2FBpYrqV6MK6c2vkvBz72+YZK0E8JqOMvMIi1ZbIBGf/FxAvC6kZesuWF7KFMasTdZZOz/I2WNDTN7AfXKdV/6Bq8SdEcW8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589795618; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=evhhH7dZopCrkDO4cvbqtNz/8xpqFu/oQnLDI6akZY4=; b=i6xUtGamxcHA8kcJDLwyrjjbrdpQydzujyE1chXiFgh6T7VsbwOImqUQyDdwBi2/H79NrbTs0SkEu7mJg9OeEXoMiENLbE5BffqXf2VvI9cc1N0/K9pC7ylgKDVqsnv3wQzqiANl5B1tHNlcS/5sNgXTVlqMkxNvbaFWsT5jdvU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589795618776584.8434686256104; Mon, 18 May 2020 02:53:38 -0700 (PDT) Received: from localhost ([::1]:36412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jacSn-0005SS-HM for importer@patchew.org; Mon, 18 May 2020 05:53:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jacRN-00031p-Eq; Mon, 18 May 2020 05:52:09 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:37020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jacRM-000178-QH; Mon, 18 May 2020 05:52:09 -0400 Received: by mail-wm1-x343.google.com with SMTP id z72so9602943wmc.2; Mon, 18 May 2020 02:52:08 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id r9sm5453542wra.52.2020.05.18.02.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 02:52:06 -0700 (PDT) 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=evhhH7dZopCrkDO4cvbqtNz/8xpqFu/oQnLDI6akZY4=; b=BltFr66ADNQznZZyq4/l1R0U72yNemjpeqXd0ESKvgCpvpc80ABMBsnRzCsK8JKBgh /zumwl9cowaht4/Mx3sHkWLlHvauWfR/A4hQfIrqBoLy2Nx+cqEogwoKpF5XkAogMV43 r39WEkJXcO2z0lST1TY/yOum54HQlkFWV8Q/+T08mlc9LpAGRg/3kPActfPprwakVq7L JnfjIS8I3VDISU0xmT7vwhw/vgfjaWKwA1//GzuaVVB7UtFWabivDyc/ktt67du4gQlX gpjvdklz4IjTWvOFBX6B9dwKQjAww5XBXRxcF1k9VDZoasqFqmOvduzaQaZbbHQkgIe4 OgAg== 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=evhhH7dZopCrkDO4cvbqtNz/8xpqFu/oQnLDI6akZY4=; b=HmFzhhphJWbN7Gi9VTOU/59Vrw7dW8oApX98vV/9066vOFCvT+dxzzjdghkLVhci7z ylep1Roc8l3NJzYciz9PuGjZbZYUpoxHrcG4AU6xHk2VhfZs9tJ1xjCHr41e/DkJcHmD SdZIZurqwObtDOdM/S1lbBmywMXvYkM5/XyKW4U8SDJ7w8vUZznhEqb7U7ARZekoecHb y7Pr8yeYBg9Of7I0pc9fKS2fatVbmHIzNtx0JMWyitmweLgZnImDCcNud7ntsx9N9Sy4 RIOOF/YkilhOniINxZ4qXAh0aq0Y6ldqWw49sKs+ha+7lro4AZiDscBOCnTYdlbJIOwU G9gg== X-Gm-Message-State: AOAM530nbFHVJhCVVvFgrwTgGeItpXZC2S8XEFC8SHci+zVBOJ3IRjVx 3KmQs/4Sn8T/dHy4TwJhj3Wl9qTqdL8= X-Google-Smtp-Source: ABdhPJwgC94yI4QFQsBvrvxU+YHPAMnxNWCzzGs32hDuo9rrI7LPahztEZfd6ykHQmlxLtMeCF3R6g== X-Received: by 2002:a05:600c:280b:: with SMTP id m11mr17712702wmb.115.1589795526794; Mon, 18 May 2020 02:52:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/4] hw/arm/integratorcp: Replace hw_error() by qemu_log_mask() Date: Mon, 18 May 2020 11:52:00 +0200 Message-Id: <20200518095203.1013-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200518095203.1013-1-f4bug@amsat.org> References: <20200518095203.1013-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Mitsyanko , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, Paolo Bonzini , "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/integratorcp.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 6d69010d06..5fb54e5aa7 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -20,6 +20,7 @@ #include "exec/address-spaces.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" #include "qemu/error-report.h" #include "hw/char/pl011.h" #include "hw/hw.h" @@ -144,8 +145,9 @@ static uint64_t integratorcm_read(void *opaque, hwaddr = offset, /* ??? Voltage control unimplemented. */ return 0; default: - hw_error("integratorcm_read: Unimplemented offset 0x%x\n", - (int)offset); + qemu_log_mask(LOG_UNIMP, + "%s: Unimplemented offset 0x%" HWADDR_PRIX "\n", + __func__, offset); return 0; } } @@ -252,8 +254,9 @@ static void integratorcm_write(void *opaque, hwaddr off= set, /* ??? Voltage control unimplemented. */ break; default: - hw_error("integratorcm_write: Unimplemented offset 0x%x\n", - (int)offset); + qemu_log_mask(LOG_UNIMP, + "%s: Unimplemented offset 0x%" HWADDR_PRIX "\n", + __func__, offset); break; } } @@ -394,7 +397,8 @@ static uint64_t icp_pic_read(void *opaque, hwaddr offse= t, case 5: /* INT_SOFTCLR */ case 11: /* FRQ_ENABLECLR */ default: - printf ("icp_pic_read: Bad register offset 0x%x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); return 0; } } @@ -430,7 +434,8 @@ static void icp_pic_write(void *opaque, hwaddr offset, case 8: /* FRQ_STATUS */ case 9: /* FRQ_RAWSTAT */ default: - printf ("icp_pic_write: Bad register offset 0x%x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); return; } icp_pic_update(s); @@ -504,7 +509,8 @@ static uint64_t icp_control_read(void *opaque, hwaddr o= ffset, case 3: /* CP_DECODE */ return 0x11; default: - hw_error("icp_control_read: Bad offset %x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); return 0; } } @@ -524,7 +530,8 @@ static void icp_control_write(void *opaque, hwaddr offs= et, /* Nothing interesting implemented yet. */ break; default: - hw_error("icp_control_write: Bad offset %x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 --=20 2.21.3 From nobody Sun May 19 02:38:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1589795598; cv=none; d=zohomail.com; s=zohoarc; b=jOld4RR16IDiQ40KL9bSbBWYJ0NWASENQkL7WkNPDJe+HDJMw2TeXmWORYPePqzc12EFJJVh73yUO32XKFrCN5UzL8vlH9ld74VjgzTIp6ZvyqIIaed04Sn9yxZWboWVoZDJKKgRyiU82gLl9hCjP3JtZrcy5WVX+t6hl2WZSAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589795598; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jz9Gxel1PVIdl5iYkRkenVOs1Gr8Smmd1Imlbqeyfjo=; b=jTIYE6xGsKT8OO987mqpFpGniRgcXRnkp+Fy9UjN2n4DUho4rN06+JKpAMrT8dKgSRi/MmX5AzoL2o2OXnShic41TaJBxcmGqXADWi7aZgyE28oxOt534Qcv2h2T01CHhGy5C2nHTe6GEaNX5XPXBelEbgwDO6dNUL0zgS3etow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589795598139322.3971584300068; Mon, 18 May 2020 02:53:18 -0700 (PDT) Received: from localhost ([::1]:34506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jacSS-0004h2-TL for importer@patchew.org; Mon, 18 May 2020 05:53:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jacRO-00033z-Ps; Mon, 18 May 2020 05:52:14 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jacRO-00017O-3N; Mon, 18 May 2020 05:52:10 -0400 Received: by mail-wr1-x444.google.com with SMTP id h17so11020789wrc.8; Mon, 18 May 2020 02:52:09 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id r9sm5453542wra.52.2020.05.18.02.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 02:52:07 -0700 (PDT) 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=jz9Gxel1PVIdl5iYkRkenVOs1Gr8Smmd1Imlbqeyfjo=; b=ry5THoXj09szFfkYga5A8TR+8fC/TmryUJVMe6iigmu9ZtX5hqfOlKpZcLYsPwDkG7 exbkpD2aEoE2W2R6isWGOenK9YrUskKFQumNcdVpbsTIZicWrHOkgiOfXjWeiOrg0EHm WLD91QP0rJ28vYZa9YeyzmFJlFW4BuaJ7xT/ii3glR7SleQCCxdb5/72LLvona2BIfwY U/6DiSZnsokFKQI+cxQhJS4B2EGTFcKwpi8hKnnyYi+ZrDcFOUrOlKPgflxA+Pbs2wGT 212mHhAa5yZYqxXNw9vOahHI1WL7gsV5t0lJh+4OXmqtRCwT38/Z7NFTfPil5pRf0XT8 FBfw== 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=jz9Gxel1PVIdl5iYkRkenVOs1Gr8Smmd1Imlbqeyfjo=; b=bKuVJO0+1Sr9EdHQN13zCh2KU63LyfIibi3ewNqygCTDmIoAzZsqdUaUjmB8RH44TD Y/B7RYPkEjDFKFireXkXm3LthrUiqhnYZrDt/pxSQSxWm0SbrEwAKTx7Vs+nzv+zMCzN eSxhYTqDdjuLGqL8+NKeZXzLIhhiHlXJIkxJFvn3eIAZm6ID3yQFUttkDTamo7A2nOct FbjUVRar6yU0U9LxgUnQrQtqjRpz745n4muI2px+6doOR0wnBxLzodsvLbjeCWjcOp7G 3k/M/CK6yx5EuVIQp/Asuvq7pZ0fGs/AhE8QvrIZ4vHIGhYRtq3HYYd/4W/Fy4PS4gFz mTvQ== X-Gm-Message-State: AOAM532Y6km/ADVFldPJyVhXfYLtVnmRu0DSJJWoNjKyAYWG8baHD7yL vbws+yZwrfNeczBuxTmfw8gaan6y5ek= X-Google-Smtp-Source: ABdhPJyymC4+daFFmr1JHZFeYlROKCA3/pXO3GF1KBYqJi4dVmOJYSFbLVBvdgh8887kqWd7CrZhYw== X-Received: by 2002:a5d:4312:: with SMTP id h18mr18783564wrq.393.1589795528254; Mon, 18 May 2020 02:52:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/4] hw/arm/pxa2xx: Replace hw_error() by qemu_log_mask() Date: Mon, 18 May 2020 11:52:01 +0200 Message-Id: <20200518095203.1013-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200518095203.1013-1-f4bug@amsat.org> References: <20200518095203.1013-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Mitsyanko , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, Paolo Bonzini , "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/pxa2xx_gpio.c | 7 ++++--- hw/display/pxa2xx_lcd.c | 8 +++++--- hw/dma/pxa2xx_dma.c | 14 +++++++++----- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index f8df3cc227..a01db54a51 100644 --- a/hw/arm/pxa2xx_gpio.c +++ b/hw/arm/pxa2xx_gpio.c @@ -9,7 +9,6 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" @@ -199,7 +198,8 @@ static uint64_t pxa2xx_gpio_read(void *opaque, hwaddr o= ffset, return s->status[bank]; =20 default: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } =20 return 0; @@ -252,7 +252,8 @@ static void pxa2xx_gpio_write(void *opaque, hwaddr offs= et, break; =20 default: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index 464e93161a..d5f2e82a4e 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -11,7 +11,7 @@ */ =20 #include "qemu/osdep.h" -#include "hw/hw.h" +#include "qemu/log.h" #include "hw/irq.h" #include "migration/vmstate.h" #include "ui/console.h" @@ -407,7 +407,8 @@ static uint64_t pxa2xx_lcdc_read(void *opaque, hwaddr o= ffset, =20 default: fail: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } =20 return 0; @@ -562,7 +563,8 @@ static void pxa2xx_lcdc_write(void *opaque, hwaddr offs= et, =20 default: fail: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c index 88ed4b6ff1..8a2eeb32bc 100644 --- a/hw/dma/pxa2xx_dma.c +++ b/hw/dma/pxa2xx_dma.c @@ -9,6 +9,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" @@ -268,7 +269,8 @@ static uint64_t pxa2xx_dma_read(void *opaque, hwaddr of= fset, unsigned int channel; =20 if (size !=3D 4) { - hw_error("%s: Bad access width\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad access width %u\n", + __func__, size); return 5; } =20 @@ -315,8 +317,8 @@ static uint64_t pxa2xx_dma_read(void *opaque, hwaddr of= fset, return s->chan[channel].cmd; } } - - hw_error("%s: Bad offset 0x" TARGET_FMT_plx "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\n", + __func__, offset); return 7; } =20 @@ -327,7 +329,8 @@ static void pxa2xx_dma_write(void *opaque, hwaddr offse= t, unsigned int channel; =20 if (size !=3D 4) { - hw_error("%s: Bad access width\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad access width %u\n", + __func__, size); return; } =20 @@ -420,7 +423,8 @@ static void pxa2xx_dma_write(void *opaque, hwaddr offse= t, break; } fail: - hw_error("%s: Bad offset " TARGET_FMT_plx "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 --=20 2.21.3 From nobody Sun May 19 02:38:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1589795729; cv=none; d=zohomail.com; s=zohoarc; b=X33Q2lmmw7M5UTEeteRWOkvuEc3B131b8c7tlQ6r4lTM+j3u/5FSrBhN/2foYydDpTG7rBWHAupGS/93ul6/VaHZ6n4tMvc8m3iXC/oHNc1cwzoIMOeU6b34pGyBksGKXJSwU3ugxVPZsA3rhpqBRn3Vp92wB9qggbjXnLhmW3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589795729; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pY7ifqJ3Le7BSTemy3hxz4uP2Q82R0++sumXW6Rj3rA=; b=d5Hx4nBSv1VBqVxuJXw9RXT3rDdxodhW+T51zejs+vNyn4L83pGHlDm3+5vidcF9qJvorzG8ZDXYMKMRmV29eQK2BatFp0p3RJDtwL4L/ju6JZhA7QmvUDHfvnNuXU8gQ1BGNfv6x/5uSJr23lX9fcx5Ta+sW4zzwYykAy/7R04= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589795729004183.52519633448753; Mon, 18 May 2020 02:55:29 -0700 (PDT) Received: from localhost ([::1]:42306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jacUZ-0007ml-Md for importer@patchew.org; Mon, 18 May 2020 05:55:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jacRP-000344-S2; Mon, 18 May 2020 05:52:14 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:40988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jacRP-00017b-9S; Mon, 18 May 2020 05:52:11 -0400 Received: by mail-wr1-x442.google.com with SMTP id h17so11020862wrc.8; Mon, 18 May 2020 02:52:10 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id r9sm5453542wra.52.2020.05.18.02.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 02:52:08 -0700 (PDT) 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=pY7ifqJ3Le7BSTemy3hxz4uP2Q82R0++sumXW6Rj3rA=; b=Q0FQv5iPFzXNoTIkx3rArVMrJBp9YaU1FQT8Zp8Fd2LJXYuuSev4FQjM/DBm1afFST FavBwDCY1ZWC3tKSMNVYMH0fbWnXiRqEK6D7fGZukA5JViE1mkEA+Civ2/oBiEzbBjZI BRSY7iACTjQo9Fac964wsCXnlCIZX/J+xv4CUIXRPxtvdi8E2SYbNsLBk2gfSfivlKSC 6BiwIt7yxcuRX01P+vR8T0nZaGAUEy2RD4Lt2x3RsgFJasovFALkrvsxuZ/DJCGNlaOi jTvDjb4v1H1bqWSKrLcjhBB0ag0h/b7bo5AofWCI4U6rWXAZjroBukw5L8Aydo7ZtG+n eR4g== 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=pY7ifqJ3Le7BSTemy3hxz4uP2Q82R0++sumXW6Rj3rA=; b=aBYJr+0cGeytbdgoXL6CWC1FAXnRb0D0C67kzXoDIyWvTHwoaMlg39cVyQ7bdz7lUR Q2N7nIbFvkmBss/BeThdtFI1hd1Wp87CAwoOQ3ce+Rz4+VsNuwa5ETMpvDiBXivBtR6h dNfFIeVhwRwdNzUpx+P9xORNgS6i8PLrhKNd/GLN0UW222IFe6Y5lEX2m6UL4E2A4ViP Z04z4m1HS1WMeepObhWI1FEd0bt05GXy5i9LHHWZtmo3UjwopPMRNpn0NxGyMtMGM3q2 dMP1v7ma5F4pMtCINoy54o9g/rzY5bltc+RJkwudx3utk6IdTJU4LUenXeIwWojre0cN HLYg== X-Gm-Message-State: AOAM530O36As4prfKDuiKhxkpQ9sE+nFwGpUvaZCXVoKagYVDs8qcAw2 tQLGwgD9GexE0Is9nV6xlnavzd98sC4= X-Google-Smtp-Source: ABdhPJzgBJlbj9iXgoaztLMj8L2GdYymlyW+Fi1nq91Owdam8CW7ErVn7rurUL8EorUzjjvZT0vlEg== X-Received: by 2002:adf:a118:: with SMTP id o24mr18278839wro.330.1589795529501; Mon, 18 May 2020 02:52:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/4] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask() Date: Mon, 18 May 2020 11:52:02 +0200 Message-Id: <20200518095203.1013-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200518095203.1013-1-f4bug@amsat.org> References: <20200518095203.1013-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Mitsyanko , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, Paolo Bonzini , "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias --- hw/char/xilinx_uartlite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index c6512285d7..ae4ccd00c7 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -23,7 +23,7 @@ */ =20 #include "qemu/osdep.h" -#include "hw/hw.h" +#include "qemu/log.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" @@ -135,7 +135,8 @@ uart_write(void *opaque, hwaddr addr, switch (addr) { case R_STATUS: - hw_error("write to UART STATUS?\n"); + qemu_log_mask(LOG_GUEST_ERROR, "%s: write to UART STATUS\n", + __func__); break; =20 case R_CTRL: --=20 2.21.3 From nobody Sun May 19 02:38:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1589795671; cv=none; d=zohomail.com; s=zohoarc; b=J/gorP1eBlzA+TZc/HvbpummduvSPY9k1dk892aMUPhG9lZMrbjEEJWx2eP+gYR//FpAreMOK9UDnrA8gTWVYsuqur/aQI3dr46ID0wkeHMjraqCCsnNx6YMUmiD+kgKNaRCfwcIX42Mrq8ce6iZAtN0FGAeuFLZ0w/FXsln3sk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589795671; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ld0kZiwSV3FEUIkheCStHZLy3HZpc3e2fMK1cMK95O0=; b=bTGF2pUfP8TpzaYJpx7mCZMEYMcAtRNkQc/NCrkf6jVBYBVXhY3qfLZdKq1Lm8Db+9uImgwbD3WvRlIJ2SoK1EGeYRdbogUeZCAZ6Rr9HWudj7CXiogrPpkMS/by7thzr/2anwhPrDqQDqkoCJx9n482JdYNggmzFOMY7uFbAlo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589795671029151.55182481785948; Mon, 18 May 2020 02:54:31 -0700 (PDT) Received: from localhost ([::1]:40320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jacTd-0006yw-Ml for importer@patchew.org; Mon, 18 May 2020 05:54:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jacRR-000347-Jk; Mon, 18 May 2020 05:52:14 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:35722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jacRR-00017q-0B; Mon, 18 May 2020 05:52:13 -0400 Received: by mail-wm1-x342.google.com with SMTP id n5so9613152wmd.0; Mon, 18 May 2020 02:52:12 -0700 (PDT) Received: from x1w.redhat.com (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id r9sm5453542wra.52.2020.05.18.02.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 02:52:10 -0700 (PDT) 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=ld0kZiwSV3FEUIkheCStHZLy3HZpc3e2fMK1cMK95O0=; b=LTi9br88Mg+l2JDevPEYBoBXFZ/MUbIh13shVznZvzqkla8ae1/90XG7T/8sxE1DjW PoRHyBT/qiRxpcAGqNrbhmTnevzrKBahzfBD/0L0LuZQaJceDhBZilgjcMA825GbgLHA S0zQ8h06YV1VoSPeKbJ6Fy6eQ7SmZepjd24QwrhTgx77Q8ikYcELUxBFU/r7KW7GN76E W00hEM2mVv8fH0UlhT6xjCBgyh2aYfT9BRoHOMEr6TTzy3QUGao9AVlBmlObV1ofgK91 sISh6m1ipOGroUN2xcVpyEAA6jJ3omIbTVTGPJc5GvRRrqNIPmT8iGhySRERPPyK5TP2 Oh/g== 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=ld0kZiwSV3FEUIkheCStHZLy3HZpc3e2fMK1cMK95O0=; b=UJWKnZZuMP1JXYkdURsCyZ2TA7QrMLvoN9Dw0cE8Ct2TriMPakk/+z5jAuVpddj6yu jkz/dJ69eebsFwYBSUjGGcT7pAQfZLK/rgvrVq6frPO1v7T3ifFnYss6YB9ThUhmogC7 KlPLZleKAfVpOoF66DKWrnf/r5ybKKyyzPcSfKhGzxKASx/cHxAsQqL2mJ+ZMZHgu7rc VByN1WvVa6o3zRfLK+E7E88INfCUZZdqLpzi0XruAp1G8HZc9PyeYNQmheX2e4yLcJaL Fo9Y0vq59W0MUe5YqR3v3iIZqNhVxyL8kVAIDcsDf2pTK60kNyTVphzrf2iAuQvDHTd3 NcIQ== X-Gm-Message-State: AOAM533spA7cRXdpwYH05CZbj+iIORHFrhFhWDaK07B1Hs+hGLb3bjH8 0qycpHX3yRC3HrTW4MAaUc4+oyYk61c= X-Google-Smtp-Source: ABdhPJyi2EV7TFHNBBIV8bWEcttigJ2yrclzxSk8SN+Pb43G8goAUE7MUWNxjHjYZP7GcTtnp4vwmg== X-Received: by 2002:a1c:6287:: with SMTP id w129mr19166621wmb.151.1589795531132; Mon, 18 May 2020 02:52:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/4] hw/timer/exynos4210_mct: Replace hw_error() by qemu_log_mask() Date: Mon, 18 May 2020 11:52:03 +0200 Message-Id: <20200518095203.1013-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200518095203.1013-1-f4bug@amsat.org> References: <20200518095203.1013-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Igor Mitsyanko , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, Paolo Bonzini , "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/timer/exynos4210_mct.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 570cf7075b..8398b774b2 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -54,7 +54,6 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" -#include "hw/hw.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/timer.h" @@ -62,7 +61,6 @@ #include "hw/ptimer.h" =20 #include "hw/arm/exynos4210.h" -#include "hw/hw.h" #include "hw/irq.h" =20 //#define DEBUG_MCT @@ -1158,8 +1156,8 @@ static uint64_t exynos4210_mct_read(void *opaque, hwa= ddr offset, break; =20 default: - hw_error("exynos4210.mct: bad read offset " - TARGET_FMT_plx "\n", offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); break; } return value; @@ -1484,8 +1482,8 @@ static void exynos4210_mct_write(void *opaque, hwaddr= offset, break; =20 default: - hw_error("exynos4210.mct: bad write offset " - TARGET_FMT_plx "\n", offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); break; } } --=20 2.21.3