diff options
author | Ralf Hoppe <rhoppe@de.ibm.com> | 2013-08-19 09:41:24 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2013-09-20 13:55:29 +0200 |
commit | a0c8699b23ea065f8435d3bd04bd23f1783aa454 (patch) | |
tree | af432d6e893d08d14e951c28e866ab7bc8f1b220 /hw/s390x | |
parent | 3af6de321f39eda37d60a26559c63029c0d5b4c9 (diff) | |
download | qemu-a0c8699b23ea065f8435d3bd04bd23f1783aa454.zip qemu-a0c8699b23ea065f8435d3bd04bd23f1783aa454.tar.gz qemu-a0c8699b23ea065f8435d3bd04bd23f1783aa454.tar.bz2 |
s390/eventfacility: fix multiple Read Event Data sources
Make the handler for SCLP Read Event Data deal with notifications
for multiple sources correctly.
Signed-off-by: Ralf Hoppe <rhoppe@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[split bigger patch into smaller independent chunks]
Reviewed-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/s390x')
-rw-r--r-- | hw/s390x/event-facility.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index d45968f..d2fd227 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -183,7 +183,7 @@ static uint16_t handle_sccb_read_events(SCLPEventFacility *ef, SCCB *sccb, { uint16_t rc; int slen; - unsigned elen = 0; + unsigned elen; BusChild *kid; SCLPEvent *event; SCLPEventClass *ec; @@ -203,11 +203,11 @@ static uint16_t handle_sccb_read_events(SCLPEventFacility *ef, SCCB *sccb, if (mask & ec->get_send_mask()) { if (ec->read_event_data(event, event_buf, &slen)) { + elen = be16_to_cpu(event_buf->length); + event_buf = (EventBufferHeader *) ((char *)event_buf + elen); rc = SCLP_RC_NORMAL_COMPLETION; } } - elen = be16_to_cpu(event_buf->length); - event_buf = (void *) event_buf + elen; } if (sccb->h.control_mask[2] & SCLP_VARIABLE_LENGTH_RESPONSE) { |