qemu-patch-raspberry4/hw/s390x
Claudio Imbrenda bc61c8c626 s390x/sclp: proper support of larger send and receive masks
Until 67915de9f0 ("s390x/event-facility: variable-length event masks")
we only supported sclp event masks with a size of exactly 4 bytes, even
though the architecture allows the guests to set up sclp event masks
from 1 to 1021 bytes in length.
After that patch, the behaviour was almost compliant, but some issues
were still remaining, in particular regarding the handling of selective
reads and migration.

When setting the sclp event mask, a mask size is also specified. Until
now we only considered the size in order to decide which bits to save
in the internal state. On the other hand, when a guest performs a
selective read, it sends a mask, but it does not specify a size; the
implied size is the size of the last mask that has been set.

Specifying bits in the mask of selective read that are not available in
the internal mask should return an error, and bits past the end of the
mask should obviously be ignored. This can only be achieved by keeping
track of the lenght of the mask.

The mask length is thus now part of the internal state that needs to be
migrated.

This patch fixes the handling of selective reads, whose size will now
match the length of the event mask, as per architecture.

While the default behaviour is to be compliant with the architecture,
when using older machine models the old broken behaviour is selected
(allowing only masks of size exactly 4), in order to be able to migrate
toward older versions.

Fixes: 67915de9f0 ("s390x/event-facility: variable-length event masks")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Message-Id: <1519407778-23095-2-git-send-email-imbrenda@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-03-08 15:49:23 +01:00
..
3270-ccw.c s390x/css: unrestrict cssids 2017-12-14 17:56:54 +01:00
ccw-device.c s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
ccw-device.h s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
css-bridge.c s390x/css: attach css bridge 2017-12-14 17:56:54 +01:00
css.c s390x/flic: cache the common flic class in a central function 2018-02-09 09:37:13 +01:00
event-facility.c s390x/sclp: proper support of larger send and receive masks 2018-03-08 15:49:23 +01:00
ipl.c s390/ipl: only print boot menu error if -boot menu=on was specified 2018-03-08 15:49:23 +01:00
ipl.h s390-ccw: use zipl values when no boot menu options are present 2018-02-26 07:56:55 +01:00
Makefile.objs s390x: get rid of s390-virtio.c 2017-09-19 18:31:31 +02:00
s390-ccw.c use g_path_get_basename instead of basename 2018-03-06 14:01:29 +01:00
s390-pci-bus.c s390x/pci: fixup global refresh 2018-02-09 09:37:13 +01:00
s390-pci-bus.h s390x/pci: fixup global refresh 2018-02-09 09:37:13 +01:00
s390-pci-inst.c s390x/pci: use the right pal and pba in reg_ioat() 2018-02-09 09:37:13 +01:00
s390-pci-inst.h s390x/pci: rework PCI STORE BLOCK 2017-12-14 17:56:54 +01:00
s390-pci-stub.c s390x/pci: remove idx from msix msg data 2017-09-19 18:21:32 +02:00
s390-skeys-kvm.c s390x/s390-skeys: Mark the storage key devices with user_creatable = false 2017-08-30 18:23:25 +02:00
s390-skeys.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
s390-stattrib-kvm.c s390x: fix storage attributes migration for non-small guests 2018-01-22 11:04:52 +01:00
s390-stattrib.c s390/stattrib: Make SaveVMHandlers data static 2018-02-26 12:55:26 +01:00
s390-virtio-ccw.c s390x/sclp: proper support of larger send and receive masks 2018-03-08 15:49:23 +01:00
s390-virtio-hcall.c s390x: rename s390-virtio.h to s390-virtio-hcall.h 2017-09-19 18:31:31 +02:00
s390-virtio-hcall.h s390/kvm_virtio/linux-headers: remove traces of old virtio transport 2017-11-24 10:52:05 +01:00
sclp.c s390x/sclp: remove memory hotplug support 2018-02-26 12:55:26 +01:00
sclpcpu.c s390x/sclp: mark sclp-cpu-hotplug as non-usercreatable 2017-10-06 10:53:02 +02:00
sclpquiesce.c hw/s390x: Mark the "sclpquiesce" device with user_creatable = false 2017-10-06 10:53:02 +02:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
virtio-ccw.c s390x/flic: cache the common flic class in a central function 2018-02-09 09:37:13 +01:00
virtio-ccw.h virtio-ccw: Add the virtio-input devices for CCW bus 2017-10-20 13:32:10 +02:00