summaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2014-05-28 14:15:57 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2014-06-10 09:50:26 +0200
commit08da527fd07cf01dc29ca60a144fbdd60b0fb7c0 (patch)
tree342b82fbb14f85580a6d7a835d33738ba12ddbfd /hw/intc
parentf068d320def7fd83bf0fcdca37b305f1c2ac5413 (diff)
downloadqemu-08da527fd07cf01dc29ca60a144fbdd60b0fb7c0.tar.gz
s390x/kvm: make flic play well with old kernels
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>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/s390_flic_kvm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 46c9e612d1..a734094292 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);