]>
Commit | Line | Data |
---|---|---|
000a1a38 CB |
1 | /* |
2 | * QEMU S/390 Interrupt support | |
3 | * | |
79afc36d | 4 | * Copyright IBM Corp. 2012, 2014 |
000a1a38 CB |
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 | ||
9615495a | 10 | #include "qemu/osdep.h" |
000a1a38 | 11 | #include "cpu.h" |
9c17d615 | 12 | #include "sysemu/kvm.h" |
000a1a38 | 13 | |
79afc36d CH |
14 | /* |
15 | * All of the following interrupts are floating, i.e. not per-vcpu. | |
de13d216 CH |
16 | * We just need a dummy cpustate in order to be able to inject in the |
17 | * non-kvm case. | |
79afc36d | 18 | */ |
000a1a38 | 19 | #if !defined(CONFIG_USER_ONLY) |
000a1a38 CB |
20 | void s390_sclp_extint(uint32_t parm) |
21 | { | |
000a1a38 | 22 | if (kvm_enabled()) { |
de13d216 | 23 | kvm_s390_service_interrupt(parm); |
000a1a38 | 24 | } else { |
de13d216 | 25 | S390CPU *dummy_cpu = s390_cpu_addr2state(0); |
de13d216 | 26 | |
f9466733 | 27 | cpu_inject_ext(dummy_cpu, EXT_SERVICE, parm, 0); |
000a1a38 CB |
28 | } |
29 | } | |
79afc36d | 30 | |
de13d216 CH |
31 | void s390_io_interrupt(uint16_t subchannel_id, uint16_t subchannel_nr, |
32 | uint32_t io_int_parm, uint32_t io_int_word) | |
79afc36d CH |
33 | { |
34 | if (kvm_enabled()) { | |
de13d216 | 35 | kvm_s390_io_interrupt(subchannel_id, subchannel_nr, io_int_parm, |
79afc36d CH |
36 | io_int_word); |
37 | } else { | |
de13d216 CH |
38 | S390CPU *dummy_cpu = s390_cpu_addr2state(0); |
39 | ||
40 | cpu_inject_io(dummy_cpu, subchannel_id, subchannel_nr, io_int_parm, | |
79afc36d CH |
41 | io_int_word); |
42 | } | |
43 | } | |
44 | ||
de13d216 | 45 | void s390_crw_mchk(void) |
79afc36d CH |
46 | { |
47 | if (kvm_enabled()) { | |
de13d216 | 48 | kvm_s390_crw_mchk(); |
79afc36d | 49 | } else { |
de13d216 CH |
50 | S390CPU *dummy_cpu = s390_cpu_addr2state(0); |
51 | ||
52 | cpu_inject_crw_mchk(dummy_cpu); | |
79afc36d CH |
53 | } |
54 | } | |
55 | ||
000a1a38 | 56 | #endif |