From nobody Thu May 2 12:00:34 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1507134453709846.7882573769465; Wed, 4 Oct 2017 09:27:33 -0700 (PDT) Received: from localhost ([::1]:36061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzmVp-0002Nt-TC for importer@patchew.org; Wed, 04 Oct 2017 12:27:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzmUb-0001b4-4W for qemu-devel@nongnu.org; Wed, 04 Oct 2017 12:25:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzmUX-0003El-U3 for qemu-devel@nongnu.org; Wed, 04 Oct 2017 12:25:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57546) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dzmUX-0003DG-Nx for qemu-devel@nongnu.org; Wed, 04 Oct 2017 12:25:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 997CD25762; Wed, 4 Oct 2017 16:25:48 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DBE5C600CD; Wed, 4 Oct 2017 16:25:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 997CD25762 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com From: Cornelia Huck To: qemu-devel@nongnu.org Date: Wed, 4 Oct 2017 18:25:43 +0200 Message-Id: <20171004162543.12233-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 04 Oct 2017 16:25:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, david@redhat.com, Cornelia Huck , agraf@suse.de, borntraeger@de.ibm.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Just as for external interrupts and I/O interrupts, we need to initialize mchk_index during cpu reset. Signed-off-by: Cornelia Huck Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- Trying a device_add with a ccw device under tcg currently insta-crashes qemu. Probably nobody ever tried the crw machine check support that I hacked in... Needs more work to avoid a guest kernel panic next; but let's pick the low-hanging fruit first. --- target/s390x/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 4e1823a3e0..3fdf9bae70 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -111,6 +111,7 @@ static void s390_cpu_initial_reset(CPUState *s) for (i =3D 0; i < ARRAY_SIZE(env->io_index); i++) { env->io_index[i] =3D -1; } + env->mchk_index =3D -1; =20 /* tininess for underflow is detected before rounding */ set_float_detect_tininess(float_tininess_before_rounding, @@ -148,6 +149,7 @@ static void s390_cpu_full_reset(CPUState *s) for (i =3D 0; i < ARRAY_SIZE(env->io_index); i++) { env->io_index[i] =3D -1; } + env->mchk_index =3D -1; =20 /* tininess for underflow is detected before rounding */ set_float_detect_tininess(float_tininess_before_rounding, --=20 2.13.6