On 03/08/2018 11:02 AM, Claudio Imbrenda wrote: > On Thu, 8 Mar 2018 08:41:47 +0100 > Christian Borntraeger <borntrae...@de.ibm.com> wrote: > >> On 03/07/2018 04:10 PM, Claudio Imbrenda wrote: >>> Extend the SCLP event masks to 64 bits. >>> >>> Notice that using any of the new bits results in a state that >>> cannot be migrated to an older version. >>> >>> Signed-off-by: Claudio Imbrenda <imbre...@linux.vnet.ibm.com> >>> --- >>> hw/s390x/event-facility.c | 49 >>> ++++++++++++++++++++++++++++++++------- >>> include/hw/s390x/event-facility.h | 2 +- 2 files changed, 41 >>> insertions(+), 10 deletions(-) >>> >>> diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c >>> index e04ed9f..c166e0a 100644 >>> --- a/hw/s390x/event-facility.c >>> +++ b/hw/s390x/event-facility.c >>> @@ -30,7 +30,10 @@ struct SCLPEventFacility { >>> SysBusDevice parent_obj; >>> SCLPEventsBus sbus; >>> /* guest's receive mask */ >>> - sccb_mask_t receive_mask; >>> + union { >>> + uint32_t receive_mask_pieces[2]; >>> + sccb_mask_t receive_mask; >>> + }; >> >> Would it work to make sccb_mask_t a union instead? > > yes, but then a lot of other code should be changed: we use sccb_mask_t > as scalar everywhere. > > also, we only need the pieces when migrating the state, never during > normal operation
ok, makes sense.