From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: qemu-devel@nongnu.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, agraf@suse.de
Subject: [Qemu-devel] [PATCH 02/10] s390x/kvm: make flic play well with old kernels
Date: Tue, 3 Jun 2014 16:07:57 +0200 [thread overview]
Message-ID: <1401804485-14801-3-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1401804485-14801-1-git-send-email-cornelia.huck@de.ibm.com>
If we run with an old kernel that does not support KVM_CAP_IRQ_ROUTING,
we don't have to do anything in the ->register_io_adapter and
->io_adapter_map callbacks and therefore should return 0 instead of
-ENOSYS (just as the non-kvm flic does).
This fixes using adapter interrupts when running under an older kernel,
which broke with "s390x: add I/O adapter registration".
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
hw/intc/s390_flic_kvm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 46c9e61..a734094 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -170,7 +170,8 @@ static int kvm_s390_register_io_adapter(S390FLICState *fs, uint32_t id,
};
if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
- return -ENOSYS;
+ /* nothing to do */
+ return 0;
}
r = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr);
@@ -195,7 +196,8 @@ static int kvm_s390_io_adapter_map(S390FLICState *fs, uint32_t id,
int r;
if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
- return -ENOSYS;
+ /* nothing to do */
+ return 0;
}
r = ioctl(flic->fd, KVM_SET_DEVICE_ATTR, &attr);
--
1.7.9.5
next prev parent reply other threads:[~2014-06-03 14:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 14:07 [Qemu-devel] [PATCH 00/10] pending s390 patches Cornelia Huck
2014-06-03 14:07 ` [Qemu-devel] [PATCH 01/10] s390x/css: handle emw correctly for tsch Cornelia Huck
2014-06-03 14:07 ` Cornelia Huck [this message]
2014-06-03 14:07 ` [Qemu-devel] [PATCH 03/10] s390x/kvm: enable/reset cmma via vm attributes Cornelia Huck
2014-06-03 14:07 ` [Qemu-devel] [PATCH 04/10] s390x/kvm: Log unmanageable external interruptions Cornelia Huck
2014-06-03 14:08 ` [Qemu-devel] [PATCH 05/10] s390x/kvm: Log unmanageable program interruptions Cornelia Huck
2014-06-03 14:08 ` [Qemu-devel] [PATCH 06/10] s390/virtio-ccw: migration support Cornelia Huck
2014-06-03 14:08 ` [Qemu-devel] [PATCH 07/10] s390x: consolidate floating interrupts Cornelia Huck
2014-06-03 14:08 ` [Qemu-devel] [PATCH 08/10] s390x/kvm: add alternative injection interface Cornelia Huck
2014-06-03 14:08 ` [Qemu-devel] [PATCH 09/10] s390x: cleanup interrupt injection Cornelia Huck
2014-06-03 14:08 ` [Qemu-devel] [PATCH 10/10] s390x/kvm: inject via flic Cornelia Huck
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=1401804485-14801-3-git-send-email-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=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).