[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/23] s390x/css: ccw-0 enforces count > 0
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PATCH 02/23] s390x/css: ccw-0 enforces count > 0 |
Date: |
Mon, 31 Aug 2015 13:13:42 +0200 |
Type-0 ccws need to have a count > 0 for any command other than TIC.
Generate a channel-program check if this is not the case.
Reviewed-by: Matthew Rosato <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/css.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 2c0782c..9596280 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -290,6 +290,10 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr
ccw_addr)
((ccw.cmd_code & 0xf0) != 0)) {
return -EINVAL;
}
+ if (!sch->ccw_fmt_1 && (ccw.count == 0) &&
+ (ccw.cmd_code != CCW_CMD_TIC)) {
+ return -EINVAL;
+ }
if (ccw.flags & CCW_FLAG_SUSPEND) {
return -EINPROGRESS;
--
2.5.1
- [Qemu-devel] [PATCH 00/23] s390x: further patches, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 01/23] s390x/css: handle ccw-0 TIC correctly, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 05/23] s390x/event-facility: fix location of receive mask, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 02/23] s390x/css: ccw-0 enforces count > 0,
Cornelia Huck <=
- [Qemu-devel] [PATCH 17/23] s390: no need to manually parse for slots and maxmem, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 03/23] s390x/event-facility: fix receive mask check, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 16/23] s390/sclp: move sclp_service_interrupt into the sclp device, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 13/23] s390/sclp: temporarily fix unassignment/reassignment of memory subregions, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 11/23] s390/sclp: rework sclp event facility initialization + device realization, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 08/23] s390x/kvm: make setting of in-kernel irq routes more efficient, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 19/23] s390/sclp: ignore memory hotplug operations if it is disabled, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 07/23] pc-bios/s390-ccw: rebuild image, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 18/23] s390: disallow memory hotplug for the s390-virtio machine, Cornelia Huck, 2015/08/31
- [Qemu-devel] [PATCH 14/23] s390/sclp: introduce a root sclp device, Cornelia Huck, 2015/08/31