qemu-e2k/hw/s390x
Halil Pasic 198c0d1f9d s390x/css: check ccw address validity
According to the PoP channel command words (CCW) must be doubleword
aligned and 31 bit addressable for format 1 and 24 bit addressable for
format 0 CCWs.

If the channel subsystem encounters a ccw address which does not satisfy
this alignment requirement a program-check condition is recognised.

The situation with 31 bit addressable is a bit more complicated: both the
ORB and a format 1 CCW TIC hold the address of (the rest of) the channel
program, that is the address of the next CCW in a word, and the PoP
mandates that bit 0 of that word shall be zero -- or a program-check
condition is to be recognized -- and does not belong to the field holding
the ccw address.

Since in code the corresponding fields span across the whole word (unlike
in PoP where these are defined as 31 bit wide) we can check this by
applying a mask. The 24 addressable case isn't affecting TIC because the
address is composed of a halfword and a byte portion (no additional zero
bit requirements) and just slightly complicates the ORB case where also
bits 1-7 need to be zero.

The same requirements (especially n-bit addressability) apply to the
ccw addresses generated while chaining.

Let's make our CSS implementation follow the AR more closely.

Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Message-Id: <20170727154842.23427-1-pasic@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-07-28 10:06:25 +02:00
..
3270-ccw.c s390x/3270: fix instruction interception handler 2017-07-05 12:16:55 +02:00
Makefile.objs s390x/migration: Storage attributes device 2017-07-14 12:29:47 +02: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: add flags field for registering I/O adapter 2017-07-14 12:29:47 +02:00
css.c s390x/css: check ccw address validity 2017-07-28 10:06:25 +02:00
event-facility.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
ipl.c hw/s390x/ipl: Fix endianness problem with netboot_start_addr 2017-07-05 19:46:30 +02:00
ipl.h hw/s390x/ipl: enable LOADPARM in IPIB for a boot device 2017-05-02 15:08:54 +02:00
s390-ccw.c s390x/css: ccw translation infrastructure 2017-05-19 12:29:01 +02:00
s390-pci-bus.c s390x/kvm/migration/cpumodel: fixes, enhancements and cleanups 2017-07-14 14:19:35 +01:00
s390-pci-bus.h memory/iommu: introduce IOMMUMemoryRegionClass 2017-07-14 12:04:41 +02:00
s390-pci-inst.c memory/iommu: introduce IOMMUMemoryRegionClass 2017-07-14 12:04:41 +02:00
s390-pci-inst.h s390x/pci: make S390PCIIOMMU inherit Object 2017-01-20 09:48:09 +01:00
s390-skeys-kvm.c s390: Clean up includes 2016-01-29 15:07:22 +00:00
s390-skeys.c migration: Split registration functions from vmstate.h 2017-06-13 11:00:44 +02:00
s390-stattrib-kvm.c s390x/migration: Storage attributes device 2017-07-14 12:29:47 +02:00
s390-stattrib.c s390x/migration: Monitor commands for storage attributes 2017-07-14 12:29:47 +02:00
s390-virtio-ccw.c Use qemu_tolower() and qemu_toupper(), not tolower() and toupper() 2017-07-21 10:32:41 +01:00
s390-virtio-hcall.c s390: Clean up includes 2016-01-29 15:07:22 +00:00
s390-virtio.c s390x/ipl: Extend S390IPLState to support network boot 2017-02-28 12:04:48 +01:00
s390-virtio.h s390x/ipl: Extend S390IPLState to support network boot 2017-02-28 12:04:48 +01:00
sclp.c hw: Use new memory_region_init_{ram, rom, rom_device}() functions 2017-07-14 17:59:42 +01:00
sclpcpu.c s390: Clean up includes 2016-01-29 15:07:22 +00:00
sclpquiesce.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
trace-events s390x/sic: realize SIC handling 2017-07-14 12:29:47 +02:00
virtio-ccw.c s390x/kvm/migration/cpumodel: fixes, enhancements and cleanups 2017-07-14 14:19:35 +01:00
virtio-ccw.h virtio-ccw: add virtio-crypto-ccw device 2017-02-24 10:15:18 +01:00