From patchwork Tue Aug 4 14:00:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 11700457 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6472A722 for ; Tue, 4 Aug 2020 14:03:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0D932086A for ; Tue, 4 Aug 2020 14:03:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="cWVXHol1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0D932086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2xXb-0002Jx-HD for patchwork-qemu-devel@patchwork.kernel.org; Tue, 04 Aug 2020 10:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2xV6-0000kE-8f for qemu-devel@nongnu.org; Tue, 04 Aug 2020 10:01:08 -0400 Received: from mout.gmx.net ([212.227.15.18]:42905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2xV4-000383-A4 for qemu-devel@nongnu.org; Tue, 04 Aug 2020 10:01:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1596549659; bh=2t00/wToPXdci/sCMNt4gNmLdt2OOd+Fs0qy1+SNfwk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=cWVXHol1mx9oz21RpXiTpcVwOsuUpYgjApfP8ti1JDEMclhP3PauaGhfrdKnCbiP4 j7JbbtkP2HEA4DTrZiKEGb3kEuASP+cauyseKcFNV5Q3kye6if9l7ozoCpLEhDKHtQ Vgilmc4aMfvsyT8Yng00lzSGlxErVpo5+kbizFpQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ls3530.fritz.box ([92.116.144.148]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MN5eR-1kLJra2nhd-00J2xE; Tue, 04 Aug 2020 16:00:59 +0200 From: Helge Deller To: peter.maydell@linaro.org, qemu-devel@nongnu.org Subject: [PATCH v3 5/8] hw/hppa/lasi: Don't abort on invalid IMR value Date: Tue, 4 Aug 2020 16:00:53 +0200 Message-Id: <20200804140056.7690-6-deller@gmx.de> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200804140056.7690-1-deller@gmx.de> References: <20200804140056.7690-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:2Rl3PMapyfvrI/et7avVNtw3KKpxJ48Fgn/ai0em8/Jvuf/fH8l SIHWKHAQX+4pnLqt6qtapLU8xfM/mJOY6zBlBQg8+KWN2zmBZ4PXX3okGw38aAESySJ323r 8fQtiaG6yIPH1sMAEIpZ1akZHIxKJe4npag2oeKeoQZpdP2dNYnmTQIVIZokal9seKD6I29 +on5d2vaqN1dmCeyfyauw== X-UI-Out-Filterresults: notjunk:1;V03:K0:pWyls6/Nt1Y=:Pi8aC16AabB1sa91WrLrpf bjjKbkIYhGevGM+sqtPdqM+Un2YVjH+DMlgbMwAbDlFNVutIlCpr6fXsvAZp5o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48z9fTig5brEtVQMBYuQjQ8o8poSSlscRFE6FY QfNeYQK/T7HAlgXD7Zy0GaStJ/Quu6j4QwYkfn0Q5q+eddl7iNhb/pGpV2MIXqg76bEZiV5hB sI6sCjMlwLSb8tnaB Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/04 09:08:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: Helge Deller , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" NetBSD initializes the LASI IMR value with 0xffffffff to disable all LASI interrupts. This triggered an assert() and stopped the emulation. By replacing the check with a warning in the guest log we now allow NetBSD to boot again. Signed-off-by: Helge Deller --- hw/hppa/lasi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.21.3 diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c index ffcbb988b8..7b4a168468 100644 --- a/hw/hppa/lasi.c +++ b/hw/hppa/lasi.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" +#include "qemu/log.h" #include "qapi/error.h" #include "cpu.h" #include "trace.h" @@ -170,8 +171,10 @@ static MemTxResult lasi_chip_write_with_attrs(void *opaque, hwaddr addr, /* read-only. */ break; case LASI_IMR: - s->imr = val; /* 0x20 ?? */ - assert((val & LASI_IRQ_BITS) == val); + s->imr = val; + if (((val & LASI_IRQ_BITS) != val) && (val != 0xffffffff)) + qemu_log_mask(LOG_GUEST_ERROR, + "LASI: tried to set invalid %lx IMR value.\n", val); break; case LASI_IPR: /* Any write to IPR clears the register. */