diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2013-02-07 02:20:51 +0000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-13 11:56:02 -0600 |
commit | 91b0a8f33419573c1d741e49559bfb666fd8b1f0 (patch) | |
tree | 7b567f0af4b64b3f2274719b008f21f5f4b7ec7d /target-s390x/helper.c | |
parent | bd9a8d852c857fd19c4626acaac1d4979f816f3a (diff) |
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 <cornelia.huck@de.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-s390x/helper.c')
-rw-r--r-- | target-s390x/helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target-s390x/helper.c b/target-s390x/helper.c index 9f9088b040..76268317a3 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -628,6 +628,8 @@ static void do_io_interrupt(CPUS390XState *env) } for (isc = 0; isc < ARRAY_SIZE(env->io_index); isc++) { + uint64_t isc_bits; + if (env->io_index[isc] < 0) { continue; } @@ -637,7 +639,8 @@ static void do_io_interrupt(CPUS390XState *env) } q = &env->io_queue[env->io_index[isc]][isc]; - if (!(env->cregs[6] & q->word)) { + isc_bits = ISC_TO_ISC_BITS(IO_INT_WORD_ISC(q->word)); + if (!(env->cregs[6] & isc_bits)) { disable = 0; continue; } |