From patchwork Wed Aug 26 21:13:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 11739625 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 7E62B13B1 for ; Wed, 26 Aug 2020 21:17:41 +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 5354D20737 for ; Wed, 26 Aug 2020 21:17:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="RXK3koUs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5354D20737 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]:57096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB2nc-0001uM-BB for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Aug 2020 17:17:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB2k6-0008Ox-Rv for qemu-devel@nongnu.org; Wed, 26 Aug 2020 17:14:02 -0400 Received: from mout.gmx.net ([212.227.17.22]:47441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB2k2-0002V7-Ft for qemu-devel@nongnu.org; Wed, 26 Aug 2020 17:14:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1598476430; bh=ffjQD9P6e3SE1TvisnqQkLG+rj6/1Nng0HQOzVbN1Mw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RXK3koUskAtpzEbiHNM/CwbFTQiry0bWpITi/kqEa/vrqfZ67SGQgqc/u8RaeOZVd LwB8EFoOxdC9GHsLvmXm0pIbpyR1xZSM5FDFmM0bJVbcjqOfCZkgfDkhnEw30cI6KC XGOy4lTgEIynhqTcCIQJIw2Fc+iku5/BetKptaHI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from ls3530.fritz.box ([92.116.186.77]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MwQTF-1kRcFf0tzZ-00sQ1e; Wed, 26 Aug 2020 23:13:50 +0200 From: Helge Deller To: peter.maydell@linaro.org, qemu-devel@nongnu.org Subject: [PULL v5 05/12] hw/hppa/lasi: Don't abort on invalid IMR value Date: Wed, 26 Aug 2020 23:13:38 +0200 Message-Id: <20200826211345.14295-6-deller@gmx.de> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200826211345.14295-1-deller@gmx.de> References: <20200826211345.14295-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:3kfGOFg2TmyHoaLpgmi0KvD+71Gb0OFxCKmK850eyct/5vSNYqH ORiNOeDd2o2TH+rsfFpskImz6yaTz7aoS6a6ubo3UgeXg83MRXapQcraSRcMzgR25Py0Pre sNO5sdwRS+It3QY7PlElVQ5TRJ9R6lqfhSVgjAJ/X6HblNiPvIljLXgLuhmzQa3WpkWx5z5 0mNGiwk5gahFQTEwjyR8w== X-UI-Out-Filterresults: notjunk:1;V03:K0:kElX1+bVBs0=:TH5s3t88ySSaPteL+yx4g/ oUkNbF+JlpsoMM9mpj6JdCh4IJWwgD46wYJekpoIVZtK+frDFyPlnYrzTVG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dOvNF+74NXcGAQXaWulbh /6NH6HUKrcARE3bv67YONItNnzuLKZ8pPxU4RuQ76tZRsELFlc0DswPGFP98FQvovz+t1MVDt Z392F+flCh2dnNxQf Received-SPF: pass client-ip=212.227.17.22; envelope-from=deller@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 16:12:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.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=-0.001, 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.21.3 diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c index ffcbb988b8..194aa3e619 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,11 @@ 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", + (unsigned long) val); break; case LASI_IPR: /* Any write to IPR clears the register. */