mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
146bd283ff
commit
67915de9f0
2 changed files with 45 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue