summary refs log tree commit diff stats
path: root/hw/s390x/css.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2017-05-24 14:06:12 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-06-06 10:17:11 +0200
commit4e19b57b0e335fdaf2cf3f056b327ee6717dec7e (patch)
treee74493511da2ebdedbaa7dd62c948968b265f5a2 /hw/s390x/css.c
parent8ed179c937830143dc0e03daac30a55272ed89e3 (diff)
downloadfocaccia-qemu-4e19b57b0e335fdaf2cf3f056b327ee6717dec7e.tar.gz
focaccia-qemu-4e19b57b0e335fdaf2cf3f056b327ee6717dec7e.zip
s390x/css: fence off MIDA
MIDA (modified indirect data addressing) is an optional facility, and
we (currently) don't support it. Let's post an operand exception if
the guest tries to set it in the orb and a channel program check
if it is set in a ccw, as specified in the Principles of Operation.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/s390x/css.c')
-rw-r--r--hw/s390x/css.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index cc76c537da..599805d275 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -433,6 +433,11 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr,
         return -EINVAL;
     }
 
+    /* We don't support MIDA. */
+    if (ccw.flags & CCW_FLAG_MIDA) {
+        return -EINVAL;
+    }
+
     if (ccw.flags & CCW_FLAG_SUSPEND) {
         return suspend_allowed ? -EINPROGRESS : -EINVAL;
     }