diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/s390x/css.c | 26 | ||||
-rw-r--r-- | hw/s390x/trace-events | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 1fcbc84581..7b82176bc2 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -521,6 +521,32 @@ void css_conditional_io_interrupt(SubchDev *sch) } } +int css_do_sic(CPUS390XState *env, uint8_t isc, uint16_t mode) +{ + S390FLICState *fs = s390_get_flic(); + S390FLICStateClass *fsc = S390_FLIC_COMMON_GET_CLASS(fs); + int r; + + if (env->psw.mask & PSW_MASK_PSTATE) { + r = -PGM_PRIVILEGED; + goto out; + } + + trace_css_do_sic(mode, isc); + switch (mode) { + case SIC_IRQ_MODE_ALL: + case SIC_IRQ_MODE_SINGLE: + break; + default: + r = -PGM_OPERAND; + goto out; + } + + r = fsc->modify_ais_mode(fs, isc, mode) ? -PGM_OPERATION : 0; +out: + return r; +} + void css_adapter_interrupt(uint8_t isc) { uint32_t io_int_word = (isc << 27) | IO_INT_WORD_AI; diff --git a/hw/s390x/trace-events b/hw/s390x/trace-events index 84ea964875..f07e974678 100644 --- a/hw/s390x/trace-events +++ b/hw/s390x/trace-events @@ -8,6 +8,7 @@ css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %02x css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %x.%x.%04x (devno %04x)" css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm %08x, isc %x) %s" css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %x)" +css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %x on isc %x" # hw/s390x/virtio-ccw.c virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command %x" |