From 1b98fb99d39732231a247acb04823b1ddb5570a1 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Thu, 30 Nov 2017 17:27:32 +0100 Subject: s390x/ioinst: pass the retaddr to all IO instructions TCG needs the retaddr when injecting an interrupt. Let's just pass it along and use RA_IGNORED for KVM. The value will be completely ignored for KVM. Convert program_interrupt() to s390_program_interrupt() directly, making use of the passed address. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand Message-Id: <20171130162744.25442-5-david@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/kvm.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'target/s390x/kvm.c') diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index f205e0a2ca..5e448e4136 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -1124,32 +1124,32 @@ static int handle_b2(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) switch (ipa1) { case PRIV_B2_XSCH: - ioinst_handle_xsch(cpu, env->regs[1]); + ioinst_handle_xsch(cpu, env->regs[1], RA_IGNORED); break; case PRIV_B2_CSCH: - ioinst_handle_csch(cpu, env->regs[1]); + ioinst_handle_csch(cpu, env->regs[1], RA_IGNORED); break; case PRIV_B2_HSCH: - ioinst_handle_hsch(cpu, env->regs[1]); + ioinst_handle_hsch(cpu, env->regs[1], RA_IGNORED); break; case PRIV_B2_MSCH: - ioinst_handle_msch(cpu, env->regs[1], run->s390_sieic.ipb); + ioinst_handle_msch(cpu, env->regs[1], run->s390_sieic.ipb, RA_IGNORED); break; case PRIV_B2_SSCH: - ioinst_handle_ssch(cpu, env->regs[1], run->s390_sieic.ipb); + ioinst_handle_ssch(cpu, env->regs[1], run->s390_sieic.ipb, RA_IGNORED); break; case PRIV_B2_STCRW: - ioinst_handle_stcrw(cpu, run->s390_sieic.ipb); + ioinst_handle_stcrw(cpu, run->s390_sieic.ipb, RA_IGNORED); break; case PRIV_B2_STSCH: - ioinst_handle_stsch(cpu, env->regs[1], run->s390_sieic.ipb); + ioinst_handle_stsch(cpu, env->regs[1], run->s390_sieic.ipb, RA_IGNORED); break; case PRIV_B2_TSCH: /* We should only get tsch via KVM_EXIT_S390_TSCH. */ fprintf(stderr, "Spurious tsch intercept\n"); break; case PRIV_B2_CHSC: - ioinst_handle_chsc(cpu, run->s390_sieic.ipb); + ioinst_handle_chsc(cpu, run->s390_sieic.ipb, RA_IGNORED); break; case PRIV_B2_TPI: /* This should have been handled by kvm already. */ @@ -1157,19 +1157,19 @@ static int handle_b2(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) break; case PRIV_B2_SCHM: ioinst_handle_schm(cpu, env->regs[1], env->regs[2], - run->s390_sieic.ipb); + run->s390_sieic.ipb, RA_IGNORED); break; case PRIV_B2_RSCH: - ioinst_handle_rsch(cpu, env->regs[1]); + ioinst_handle_rsch(cpu, env->regs[1], RA_IGNORED); break; case PRIV_B2_RCHP: - ioinst_handle_rchp(cpu, env->regs[1]); + ioinst_handle_rchp(cpu, env->regs[1], RA_IGNORED); break; case PRIV_B2_STCPS: /* We do not provide this instruction, it is suppressed. */ break; case PRIV_B2_SAL: - ioinst_handle_sal(cpu, env->regs[1]); + ioinst_handle_sal(cpu, env->regs[1], RA_IGNORED); break; case PRIV_B2_SIGA: /* Not provided, set CC = 3 for subchannel not operational */ @@ -1673,7 +1673,8 @@ static int handle_tsch(S390CPU *cpu) cpu_synchronize_state(cs); - ret = ioinst_handle_tsch(cpu, cpu->env.regs[1], run->s390_tsch.ipb); + ret = ioinst_handle_tsch(cpu, cpu->env.regs[1], run->s390_tsch.ipb, + RA_IGNORED); if (ret < 0) { /* * Failure. -- cgit v1.2.3-55-g7522