summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-08-20 22:16:35 +1000
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-25 13:25:16 +0200
commit3dd7852f1925ec1b3eca32c894e1a84882e145f1 (patch)
tree0378cac36b7527ee99bac686b5065deb5b7ac3ec /cpus.c
parentd07aa7c7bb06fdc9973059889b33dfca1d2efe55 (diff)
downloadqemu-3dd7852f1925ec1b3eca32c894e1a84882e145f1.zip
s390x: Migrate to new NMI interface
This implements an NMI interface for s390 and s390-ccw machines. This removes #ifdef s390 branch in qmp_inject_nmi so new s390's nmi_monitor_handler() callback is going to be used for NMI. Since nmi_monitor_handler()-calling code is platform independent, CPUState::cpu_index is used instead of S390CPU::env.cpu_num. There should not be any change in behaviour as both @cpu_index and @cpu_num are global CPU numbers. Note that s390_cpu_restart() already takes care of the specified cpu, so we don't need to schedule via async_run_on_cpu(). Since the only error s390_cpu_restart() can return is ENOSYS, convert it to QERR_UNSUPPORTED. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/cpus.c b/cpus.c
index 37d90f4e93..eb1ac8577b 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1537,20 +1537,6 @@ void qmp_inject_nmi(Error **errp)
apic_deliver_nmi(cpu->apic_state);
}
}
-#elif defined(TARGET_S390X)
- CPUState *cs;
- S390CPU *cpu;
-
- CPU_FOREACH(cs) {
- cpu = S390_CPU(cs);
- if (cpu->env.cpu_num == monitor_get_cpu_index()) {
- if (s390_cpu_restart(S390_CPU(cs)) == -1) {
- error_set(errp, QERR_UNSUPPORTED);
- return;
- }
- break;
- }
- }
#else
nmi_monitor_handle(monitor_get_cpu_index(), errp);
#endif