diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-06-06 16:57:50 +0200 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2016-06-14 14:00:05 +0200 |
commit | 393ad2a4a15db3836698de0e11249b4ec9dafb11 (patch) | |
tree | e3c198dc788355b3b97fd0ca7539bfe8c06950ff /target-s390x | |
parent | dcddc75e4756eac166bb002f71dfb09aca9b59fc (diff) |
s390x/kvm: Fixup interrupt type for non-adapter I/O interrupts
The current algorithm for I/O interrupts would result in a wrong
interrupt type for subchannel numbers fffe and ffff. In addition
a non adapter interrupt might look like an adapter interrupt for
any subchannel number that has the 0x0400 bit set.
No kernel has ever used the type outside logging - and the logging
was wrong all the time. For everything else the kernel used the
interrupt parameters.
Let's use the KVM_S390_INT_IO macro as for adapter interrupts.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'target-s390x')
-rw-r--r-- | target-s390x/kvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 8f46fd0f10..f108cd3875 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -2071,8 +2071,9 @@ void kvm_s390_io_interrupt(uint16_t subchannel_id, if (io_int_word & IO_INT_WORD_AI) { irq.type = KVM_S390_INT_IO(1, 0, 0, 0); } else { - irq.type = ((subchannel_id & 0xff00) << 24) | - ((subchannel_id & 0x00060) << 22) | (subchannel_nr << 16); + irq.type = KVM_S390_INT_IO(0, (subchannel_id & 0xff00) >> 8, + (subchannel_id & 0x0006), + subchannel_nr); } kvm_s390_floating_interrupt(&irq); } |