[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/10] s390x/kvm: make flic play well with old kerne
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PATCH 02/10] s390x/kvm: make flic play well with old kernels |
Date: |
Tue, 3 Jun 2014 16:07:57 +0200 |
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 <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
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
- [Qemu-devel] [PATCH 00/10] pending s390 patches, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 01/10] s390x/css: handle emw correctly for tsch, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 02/10] s390x/kvm: make flic play well with old kernels,
Cornelia Huck <=
- [Qemu-devel] [PATCH 04/10] s390x/kvm: Log unmanageable external interruptions, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 03/10] s390x/kvm: enable/reset cmma via vm attributes, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 05/10] s390x/kvm: Log unmanageable program interruptions, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 06/10] s390/virtio-ccw: migration support, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 07/10] s390x: consolidate floating interrupts, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 08/10] s390x/kvm: add alternative injection interface, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 09/10] s390x: cleanup interrupt injection, Cornelia Huck, 2014/06/03
- [Qemu-devel] [PATCH 10/10] s390x/kvm: inject via flic, Cornelia Huck, 2014/06/03