diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2017-10-11 09:39:53 -0400 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-10-20 13:32:10 +0200 |
commit | 67915de9f0383ccf4ab8c42dd02aa18dcd79b411 (patch) | |
tree | e5e6a19cf672aac9f9f61439ab33e64a373c6658 /include/hw/s390x | |
parent | 146bd283ff419299eb957695659ff3ece8259afd (diff) |
s390x/event-facility: variable-length event masks
The architecture supports masks of variable length for sclp write
event mask. We currently only support 4 byte event masks, as that
is what Linux uses.
Let's extend this to the maximum mask length supported by the
architecture and return 0 to the guest for the mask bits we don't
support in core.
Initial patch by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Message-Id: <1507729193-9747-1-git-send-email-jjherne@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'include/hw/s390x')
-rw-r--r-- | include/hw/s390x/event-facility.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h index def1bb0c03..5119b9b7f0 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -49,16 +49,28 @@ #define TYPE_SCLP_CPU_HOTPLUG "sclp-cpu-hotplug" #define TYPE_SCLP_QUIESCE "sclpquiesce" +#define SCLP_EVENT_MASK_LEN_MAX 1021 + typedef struct WriteEventMask { SCCBHeader h; uint16_t _reserved; uint16_t mask_length; - uint32_t cp_receive_mask; - uint32_t cp_send_mask; - uint32_t receive_mask; - uint32_t send_mask; + uint8_t masks[]; +/* + * Layout of the masks is + * uint8_t cp_receive_mask[mask_length]; + * uint8_t cp_send_mask[mask_length]; + * uint8_t receive_mask[mask_length]; + * uint8_t send_mask[mask_length]; + * where 1 <= mask_length <= SCLP_EVENT_MASK_LEN_MAX + */ } QEMU_PACKED WriteEventMask; +#define WEM_CP_RECEIVE_MASK(wem, mask_len) ((wem)->masks) +#define WEM_CP_SEND_MASK(wem, mask_len) ((wem)->masks + (mask_len)) +#define WEM_RECEIVE_MASK(wem, mask_len) ((wem)->masks + 2 * (mask_len)) +#define WEM_SEND_MASK(wem, mask_len) ((wem)->masks + 3 * (mask_len)) + typedef struct EventBufferHeader { uint16_t length; uint8_t type; |