vfio/pci: Convert all MemoryRegion to dynamic alloc and consistent functions
[qemu/ar7.git] / target-s390x / interrupt.c
blobbad60a7e13e5e9d98b4215a62ff381892bea4c96
1 /*
2 * QEMU S/390 Interrupt support
4 * Copyright IBM Corp. 2012, 2014
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 */
10 #include "qemu/osdep.h"
11 #include "cpu.h"
12 #include "sysemu/kvm.h"
15 * All of the following interrupts are floating, i.e. not per-vcpu.
16 * We just need a dummy cpustate in order to be able to inject in the
17 * non-kvm case.
19 #if !defined(CONFIG_USER_ONLY)
20 void s390_sclp_extint(uint32_t parm)
22 if (kvm_enabled()) {
23 kvm_s390_service_interrupt(parm);
24 } else {
25 S390CPU *dummy_cpu = s390_cpu_addr2state(0);
27 cpu_inject_ext(dummy_cpu, EXT_SERVICE, parm, 0);
31 void s390_io_interrupt(uint16_t subchannel_id, uint16_t subchannel_nr,
32 uint32_t io_int_parm, uint32_t io_int_word)
34 if (kvm_enabled()) {
35 kvm_s390_io_interrupt(subchannel_id, subchannel_nr, io_int_parm,
36 io_int_word);
37 } else {
38 S390CPU *dummy_cpu = s390_cpu_addr2state(0);
40 cpu_inject_io(dummy_cpu, subchannel_id, subchannel_nr, io_int_parm,
41 io_int_word);
45 void s390_crw_mchk(void)
47 if (kvm_enabled()) {
48 kvm_s390_crw_mchk();
49 } else {
50 S390CPU *dummy_cpu = s390_cpu_addr2state(0);
52 cpu_inject_crw_mchk(dummy_cpu);
56 #endif