From nobody Sun Sep 14 22:31:44 2025 Delivered-To: importer@patchew.org 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; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582804707; cv=none; d=zohomail.com; s=zohoarc; b=I0Gsko9JrrIZwY/CYIMT8YE6/F8ZoY7PqesbT8UrmqSnHLoc2rDS7rFa5mRGrKS8NKDoCjVhKaHGaCfIyC+T+bNQMZmuO2dykyoHGwLHdhNTEFF214g17D4nuqRUb8EjJLvzoaGpaPEo0oH+gO2Q+kaMeoUbwo8GiWq/QQ7LxsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582804707; 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=qYjkvjArQCV2KpCuMfUNlWvBu91W/UkeoeZoQfuJVS8=; b=hWgXkG+COv8v4Mr36pWH19rSf7JjdiveP9BITgd+U8mUw8godlxrrpn0hIvzMQBSOLLyr9g706FV+Pjr6k/Da0Czxcm+7RmTBcLD5wlGYHYWbloU+xioxK3BoLulbIGB+Y7ddJDrxXbBiuWfHx1uv3+RYmYLK9OJ4IJcDPTI+jw= 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 1582804707567445.4089573446171; Thu, 27 Feb 2020 03:58:27 -0800 (PST) Received: from localhost ([::1]:58092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7HoA-0004mX-GO for importer@patchew.org; Thu, 27 Feb 2020 06:58:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51027) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7Hkh-0007uT-DC for qemu-devel@nongnu.org; Thu, 27 Feb 2020 06:54:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7Hkf-000167-8L for qemu-devel@nongnu.org; Thu, 27 Feb 2020 06:54:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:60395 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j7Hkf-00015Y-4o for qemu-devel@nongnu.org; Thu, 27 Feb 2020 06:54:49 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-vGHDOaYsOSuf5jb0ObIXsA-1; Thu, 27 Feb 2020 06:54:41 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 593EC1005512; Thu, 27 Feb 2020 11:54:40 +0000 (UTC) Received: from localhost (ovpn-117-2.ams2.redhat.com [10.36.117.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44A9019C58; Thu, 27 Feb 2020 11:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582804488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qYjkvjArQCV2KpCuMfUNlWvBu91W/UkeoeZoQfuJVS8=; b=RV7QrcPUwMwldl4BnneKaLT+Lvzp8z/dbfP4ct0755IUccwWFFUvFEakLS3XGCAJ8jDqXR cMdU38TH7WuUoIYT64c4ka8EclscT9mGC0fgMDQoWrtmhB/Ms62ccQny94SDwRLAYoUi/D rUTkOPTBoNu7xmjGIdppPllOuibnUc0= X-MC-Unique: vGHDOaYsOSuf5jb0ObIXsA-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 1/7] target/s390x/translate: Fix RNSBG instruction Date: Thu, 27 Feb 2020 12:54:25 +0100 Message-Id: <20200227115431.32364-2-cohuck@redhat.com> In-Reply-To: <20200227115431.32364-1-cohuck@redhat.com> References: <20200227115431.32364-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Thomas Huth , qemu-s390x@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org, David Hildenbrand 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" From: Thomas Huth RNSBG is handled via the op_rosbg() helper function. But RNSBG has the opcode 0xEC54, i.e. 0x54 as second byte, while op_rosbg() currently checks for 0x55. This seems to be a typo, fix it to use 0x54 instead, so that op_rosbg() does not abort() anymore if a program uses RNSBG. I've checked with a simple test function that I now get the same results with KVM and with TCG: static void test_rnsbg(void) { uint64_t r1, r2; r2 =3D 0xffff000000000000UL; r1 =3D 0x123456789bdfaaaaUL; asm volatile (" rnsbg %0,%1,12,61,16 " : "+r"(r1) : "r"(r2)); printf("r1 afterwards: 0x%lx\n", r1); } Buglink: https://bugs.launchpad.net/qemu/+bug/1860920 Signed-off-by: Thomas Huth Message-Id: <20200130133417.10531-1-thuth@redhat.com> Fixes: d6c6372e186e ("target-s390: Implement R[NOX]SBG") Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- target/s390x/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 0bd2073718ed..4f6f1e31cdfd 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -3874,7 +3874,7 @@ static DisasJumpType op_rosbg(DisasContext *s, DisasO= ps *o) =20 /* Operate. */ switch (s->fields.op2) { - case 0x55: /* AND */ + case 0x54: /* AND */ tcg_gen_ori_i64(o->in2, o->in2, ~mask); tcg_gen_and_i64(o->out, o->out, o->in2); break; --=20 2.21.1