From 91b0a8f33419573c1d741e49559bfb666fd8b1f0 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Thu, 7 Feb 2013 02:20:51 +0000 Subject: s390: Fix handling of iscs. There are two ways to express an interruption subclass: - As a bitmask, as used in cr6. - As a number, as used in the I/O interruption word. Unfortunately, we have treated to I/O interruption word as if it contained the bitmask as well, which went unnoticed so far as - (queued-for-next) kvm made the same mistake, and - Linux guest kernels don't check the isc value in the I/O interruption word for subchannel interrupts. Make sure that we treat the I/O interruption word correctly. Signed-off-by: Cornelia Huck Signed-off-by: Alexander Graf --- target-s390x/ioinst.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'target-s390x/ioinst.h') diff --git a/target-s390x/ioinst.h b/target-s390x/ioinst.h index d5a43f4a71..7bed2910dc 100644 --- a/target-s390x/ioinst.h +++ b/target-s390x/ioinst.h @@ -209,6 +209,9 @@ typedef struct IOIntCode { #define IOINST_SCHID_SSID(_schid) ((_schid & 0x00060000) >> 17) #define IOINST_SCHID_NR(_schid) (_schid & 0x0000ffff) +#define IO_INT_WORD_ISC(_int_word) ((_int_word & 0x38000000) >> 24) +#define ISC_TO_ISC_BITS(_isc) ((0x80 >> _isc) << 24) + int ioinst_disassemble_sch_ident(uint32_t value, int *m, int *cssid, int *ssid, int *schid); int ioinst_handle_xsch(CPUS390XState *env, uint64_t reg1); -- cgit v1.2.1