]> git.proxmox.com Git - qemu.git/blame - target-s390x/interrupt.c
qom: add a fast path to object_class_dynamic_cast
[qemu.git] / target-s390x / interrupt.c
CommitLineData
000a1a38
CB
1/*
2 * QEMU S/390 Interrupt support
3 *
4 * Copyright IBM, Corp. 2012
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or (at your
7 * option) any later version. See the COPYING file in the top-level directory.
8 */
9
10#include "cpu.h"
9c17d615 11#include "sysemu/kvm.h"
000a1a38
CB
12
13#if !defined(CONFIG_USER_ONLY)
14/* service interrupts are floating therefore we must not pass an cpustate */
15void s390_sclp_extint(uint32_t parm)
16{
17 S390CPU *dummy_cpu = s390_cpu_addr2state(0);
18 CPUS390XState *env = &dummy_cpu->env;
19
20 if (kvm_enabled()) {
21#ifdef CONFIG_KVM
1bc22652
AF
22 kvm_s390_interrupt_internal(dummy_cpu, KVM_S390_INT_SERVICE, parm,
23 0, 1);
000a1a38
CB
24#endif
25 } else {
26 env->psw.addr += 4;
f9466733 27 cpu_inject_ext(dummy_cpu, EXT_SERVICE, parm, 0);
000a1a38
CB
28 }
29}
30#endif