From nobody Tue Feb 10 12:43:11 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1593354678; cv=none; d=zohomail.com; s=zohoarc; b=ZExKk42qqcvaGLt+w62fh0J7MAwPDxCK/ctdbbLTUb5W+/HR6Dr4DJrpwfhppNkRa8LFp13ZPqUDrfJ+9/hP6ZjPh/l2ShNKKRlJXiIpC80Uon3dvChjg6NkgneAxiu5oiuMe6ZFPMQj9beHZ0hdPYVmKOj6Expj3A5Uy18Hmq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593354678; h=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=Vmpo8pB4pBMBpoqr8J9eP1BB+PRV+N1N9F23e1inTwA=; b=AxMKwS28UGN7iiLanh//BGCMdURUZBIG4QwevbHHX0FHeyPpYydZ2Mij8WeW36Oz8iFBvIXF/uMqUssMRCEc6gbMR5sajJ1T27tGNsnsC7QnqQ0ZqbycrsBezhpqrozZPUJ525lVtDYjaVbIcZT3cVsOljNgg7dmN0TDBwtY3Nw= 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 1593354678493171.37106180942226; Sun, 28 Jun 2020 07:31:18 -0700 (PDT) Received: from localhost ([::1]:39804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpYKz-0008AL-86 for importer@patchew.org; Sun, 28 Jun 2020 10:31:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38578) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpYEm-0006Yt-TC for qemu-devel@nongnu.org; Sun, 28 Jun 2020 10:24:52 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:33716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpYEl-0004mY-4h for qemu-devel@nongnu.org; Sun, 28 Jun 2020 10:24:52 -0400 Received: by mail-wr1-x443.google.com with SMTP id f18so5983671wrs.0 for ; Sun, 28 Jun 2020 07:24:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id h13sm5321555wml.42.2020.06.28.07.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jun 2020 07:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vmpo8pB4pBMBpoqr8J9eP1BB+PRV+N1N9F23e1inTwA=; b=DWewYRK+RJ1GyPHDAcYN9AIsDv4Z9Xse4I6QjRetBl9d+NJp5Ya+qyhCU6WuIOJgnm u+v1Z+1dM4gSgc1u+IenpHj99w3kl+d/55pd+HT3f4MF7l3rBZQ4cAbNh7coUIxSijGb QMaX+0MgTwmftF6MArSrncbJR0pxZUeM283NjVhcTS1MKwNMbzPMuKiAq2vb0d/Mp6Vi xwuTETp/eMWAZgipsT/hbYlZEpLvOstb73ukG1LrxanWtNv73XEeaWdRqLWrivXgjunp ZhQvCLjdfUuFuaZdIBV8k61CWepUH4Hac+eEFXU6k10kO9Dw91RTXLtMEeV2QKlUIAaB 3PUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vmpo8pB4pBMBpoqr8J9eP1BB+PRV+N1N9F23e1inTwA=; b=lORBVtkA0oUNhOGUgCyEYD3Ota959yGYTLCnCIiXD28l72PMJDNRITx8t4EwHAkHHp OWiixdflC3Pca+3SH1dIvOD6hRzvRlOQIm0k1cL3CD12aMPSSOoD/vGlRiixKEyJWebH MhLLgt36L+a+vm221xgO6mCxRoFwIg6RVdo6k/JNupkktzSvr+eqHJ80+gUyZbGAfYEr btnSTKaedhttS8atIX/g490+p5zOyhwCS+oCubzOGQp87t6OOomJxP5xsPSEoXYaYPn/ 3p76jj9rrWC8sqS50amMEcRJCoKvNCDerlXTx0jbD9B2SPxgT4eG53B2zggTepvG9CdD 0Cfw== X-Gm-Message-State: AOAM531pJ3JRgIGm4Gmin8penGmDuD14LFq3dbCV2uF0MALDjCTSOiiI +jM9oCgriFzultZgJv3+7y04Vg== X-Google-Smtp-Source: ABdhPJyqa2XyCjk2yQL7M5LZSne1r7wL1p7G1bCoT7V1Oh+HIroBjIOFg/sJwPk/Y7iP76Iv8OUzVg== X-Received: by 2002:adf:c44d:: with SMTP id a13mr13387256wrg.205.1593354289855; Sun, 28 Jun 2020 07:24:49 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 15/17] hw/arm/pxa2xx_pic: Use LOG_GUEST_ERROR for bad guest register accesses Date: Sun, 28 Jun 2020 15:24:27 +0100 Message-Id: <20200628142429.17111-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200628142429.17111-1-peter.maydell@linaro.org> References: <20200628142429.17111-1-peter.maydell@linaro.org> MIME-Version: 1.0 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::443; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x443.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Instead of using printf() for logging guest accesses to invalid register offsets in the pxa2xx PIC device, use the usual qemu_log_mask(LOG_GUEST_ERROR,...). This was the only user of the REG_FMT macro in pxa.h, so we can remove that. Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/arm/pxa.h | 1 - hw/arm/pxa2xx_pic.c | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h index f6dfb5c0cf0..8843e5f9107 100644 --- a/include/hw/arm/pxa.h +++ b/include/hw/arm/pxa.h @@ -184,7 +184,6 @@ struct PXA2xxI2SState { }; =20 # define PA_FMT "0x%08lx" -# define REG_FMT "0x" TARGET_FMT_plx =20 PXA2xxState *pxa270_init(MemoryRegion *address_space, unsigned int sdram_s= ize, const char *revision); diff --git a/hw/arm/pxa2xx_pic.c b/hw/arm/pxa2xx_pic.c index 105c5e63f2f..ceee6aa48db 100644 --- a/hw/arm/pxa2xx_pic.c +++ b/hw/arm/pxa2xx_pic.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" +#include "qemu/log.h" #include "cpu.h" #include "hw/arm/pxa.h" #include "hw/sysbus.h" @@ -166,7 +167,9 @@ static uint64_t pxa2xx_pic_mem_read(void *opaque, hwadd= r offset, case ICHP: /* Highest Priority register */ return pxa2xx_pic_highest(s); default: - printf("%s: Bad register offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, + "pxa2xx_pic_mem_read: bad register offset 0x%" HWADD= R_PRIx + "\n", offset); return 0; } } @@ -199,7 +202,9 @@ static void pxa2xx_pic_mem_write(void *opaque, hwaddr o= ffset, s->priority[32 + ((offset - IPR32) >> 2)] =3D value & 0x8000003f; break; default: - printf("%s: Bad register offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, + "pxa2xx_pic_mem_write: bad register offset 0x%" + HWADDR_PRIx "\n", offset); return; } pxa2xx_pic_update(opaque); --=20 2.20.1