/* On real machines, this would run asynchronously to the main vcpus. We might want to make some parts of the ssch handling (interpreting read/writes) asynchronous later on if we start supporting more than our current very simple devices.  */
static void do_subchannel_work(SubchDev *sch)
/* On real machines, this would run asynchronously to the main vcpus. We might want to make some parts of the ssch handling (interpreting read/writes) asynchronous later on if we start supporting more than our current very simple devices.  */
static void do_subchannel_work(SubchDev *sch)
{
    SCSW *s = &sch->curr_status.scsw;
    if (s->ctrl & SCSW_FCTL_CLEAR_FUNC) {
        sch_handle_clear_func(sch);
    } else if (s->ctrl & SCSW_FCTL_HALT_FUNC) {
        sch_handle_halt_func(sch);
    } else if (s->ctrl & SCSW_FCTL_START_FUNC) {
        sch_handle_start_func(sch);
    } else {
        return;
    }
    css_inject_io_interrupt(sch);
}