From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: peter.maydell@linaro.org
Cc: borntraeger@de.ibm.com, agraf@suse.de, jfrei@linux.vnet.ibm.com,
qemu-devel@nongnu.org, Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: [Qemu-devel] [PULL 7/7] s390x/kvm: Fixup interrupt type for non-adapter I/O interrupts
Date: Tue, 14 Jun 2016 14:13:55 +0200 [thread overview]
Message-ID: <20160614121355.9320-8-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20160614121355.9320-1-cornelia.huck@de.ibm.com>
From: Christian Borntraeger <borntraeger@de.ibm.com>
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>
---
target-s390x/kvm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 8f46fd0..f108cd3 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);
}
--
2.9.0
next prev parent reply other threads:[~2016-06-14 12:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 12:13 [Qemu-devel] [PULL 0/7] s390x: next batch of patches Cornelia Huck
2016-06-14 12:13 ` [Qemu-devel] [PULL 1/7] linux-headers: update Cornelia Huck
2016-06-14 12:13 ` [Qemu-devel] [PULL 2/7] s390x/kvm: add interface for clearing IO irqs Cornelia Huck
2016-06-14 12:13 ` [Qemu-devel] [PULL 3/7] s390x/css: clear IO irqs when generating IPI CRW Cornelia Huck
2016-06-14 12:13 ` [Qemu-devel] [PULL 4/7] s390x/css: introduce property type for device ids Cornelia Huck
2016-06-14 12:13 ` [Qemu-devel] [PULL 5/7] virtio-ccw: Provide traces for indicator changes Cornelia Huck
2016-06-14 12:13 ` [Qemu-devel] [PULL 6/7] s390x: Limit s390-ccw machines to 248 CPUs Cornelia Huck
2016-06-14 12:13 ` Cornelia Huck [this message]
2016-06-14 12:51 ` [Qemu-devel] [PULL 0/7] s390x: next batch of patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160614121355.9320-8-cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).