qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 01/23] s390x/css: handle ccw-0 TIC correctly


From: Cornelia Huck
Subject: [Qemu-devel] [PATCH 01/23] s390x/css: handle ccw-0 TIC correctly
Date: Mon, 31 Aug 2015 13:13:41 +0200

From: Pierre Morel <address@hidden>

In CCW-0 format TIC command 4 highest bits are ignored in the subchannel.
In CCW-1 format the TIC command 4 highest bits must be 0.
To convert TIC from CCW-0 to CCW-1 we clear the 4 highest bits
to guarantee compatibility.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
 hw/s390x/css.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 5df450e..2c0782c 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -261,6 +261,9 @@ static CCW1 copy_ccw_from_guest(hwaddr addr, bool fmt1)
         ret.flags = tmp0.flags;
         ret.count = be16_to_cpu(tmp0.count);
         ret.cda = be16_to_cpu(tmp0.cda1) | (tmp0.cda0 << 16);
+        if ((ret.cmd_code & 0x0f) == CCW_CMD_TIC) {
+            ret.cmd_code &= 0x0f;
+        }
     }
     return ret;
 }
-- 
2.5.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]