aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/s390_flic_kvm.c
diff options
context:
space:
mode:
authorFei Li <sherrylf@linux.vnet.ibm.com>2016-11-25 07:59:07 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-01-20 09:48:09 +0100
commit4cbd6c41fa3aa901e12e8158e8d22dd8f70f7a90 (patch)
treea195491f4b34a7ba8e9728f2a9811fbdfc454843 /hw/intc/s390_flic_kvm.c
parent113725a6a37f01bd4b659cbb5831c8d71d9c673e (diff)
s390x/kvm: use kvm_gsi_routing_enabled in flic
Let's use kvm_gsi_routing_enabled() to check if kvm supports KVM_CAP_IRQ_ROUTING in order to avoid a needless ioctl invocation. Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/intc/s390_flic_kvm.c')
-rw-r--r--hw/intc/s390_flic_kvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 21ac2e2dcd..c313166fbe 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -201,7 +201,7 @@ static int kvm_s390_register_io_adapter(S390FLICState *fs, uint32_t id,
.addr = (uint64_t)&adapter,
};
- if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
+ if (!kvm_gsi_routing_enabled()) {
/* nothing to do */
return 0;
}
@@ -226,7 +226,7 @@ static int kvm_s390_io_adapter_map(S390FLICState *fs, uint32_t id,
KVMS390FLICState *flic = KVM_S390_FLIC(fs);
int r;
- if (!kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
+ if (!kvm_gsi_routing_enabled()) {
/* nothing to do */
return 0;
}