From nobody Sat Feb 7 08:27:08 2026 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 1511902074185511.52004858534804; Tue, 28 Nov 2017 12:47:54 -0800 (PST) Received: from localhost ([::1]:40058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJmmo-00047F-U9 for importer@patchew.org; Tue, 28 Nov 2017 15:47:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJma0-0001EL-N6 for qemu-devel@nongnu.org; Tue, 28 Nov 2017 15:34:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJmZz-0003wB-R8 for qemu-devel@nongnu.org; Tue, 28 Nov 2017 15:34:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37543) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eJmZz-0003vf-LL; Tue, 28 Nov 2017 15:34:07 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB8FC5F7BB; Tue, 28 Nov 2017 20:34:06 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-100.ams2.redhat.com [10.36.116.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25CDE60851; Tue, 28 Nov 2017 20:34:04 +0000 (UTC) From: David Hildenbrand To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org Date: Tue, 28 Nov 2017 21:33:24 +0100 Message-Id: <20171128203326.6062-15-david@redhat.com> In-Reply-To: <20171128203326.6062-1-david@redhat.com> References: <20171128203326.6062-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 28 Nov 2017 20:34:06 +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 v1 for-2.12 14/15] s390x/tcg: drop program_interrupt() 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: Christian Borntraeger , Cornelia Huck , David Hildenbrand , Alexander Graf , Richard Henderson 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" All users are gone, we can finally drop it and make sure that all new new program interrupt injections are reminded of the retaddr - as they have to use program_interrupt_ra() now. Signed-off-by: David Hildenbrand --- target/s390x/cpu.h | 1 - target/s390x/interrupt.c | 22 ++++++++-------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 617f9b0148..890a25c1d6 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -719,7 +719,6 @@ void s390_io_interrupt(uint16_t subchannel_id, uint16_t= subchannel_nr, uint32_t io_int_parm, uint32_t io_int_word); /* automatically detect the instruction length */ #define ILEN_AUTO 0xff -void program_interrupt(CPUS390XState *env, uint32_t code, int ilen); void program_interrupt_ra(CPUS390XState *env, uint32_t code, int ilen, uintptr_t ra); /* service interrupts are floating therefore we must not pass an cpustate = */ diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index 6ce06bb549..c0996187ef 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -37,13 +37,20 @@ static void tcg_s390_program_interrupt(CPUS390XState *e= nv, uint32_t code, #endif } =20 -void program_interrupt(CPUS390XState *env, uint32_t code, int ilen) +void program_interrupt_ra(CPUS390XState *env, uint32_t code, int ilen, + uintptr_t ra) { S390CPU *cpu =3D s390_env_get_cpu(env); =20 qemu_log_mask(CPU_LOG_INT, "program interrupt at %#" PRIx64 "\n", env->psw.addr); =20 +#ifdef CONFIG_TCG + if (tcg_enabled() && ra) { + cpu_restore_state(CPU(cpu), ra); + } +#endif + if (kvm_enabled()) { kvm_s390_program_interrupt(cpu, code); } else if (tcg_enabled()) { @@ -53,19 +60,6 @@ void program_interrupt(CPUS390XState *env, uint32_t code= , int ilen) } } =20 -void program_interrupt_ra(CPUS390XState *env, uint32_t code, int ilen, - uintptr_t ra) -{ - S390CPU *cpu =3D s390_env_get_cpu(env); - -#ifdef CONFIG_TCG - if (tcg_enabled() && ra) { - cpu_restore_state(CPU(cpu), ra); - } -#endif - program_interrupt(env, code, ilen); -} - #if !defined(CONFIG_USER_ONLY) static void cpu_inject_service(S390CPU *cpu, uint32_t param) { --=20 2.14.3