Skip to content

Commit

Permalink
s390x/kvm: use kvm_gsi_routing_enabled in flic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fei Li authored and cohuck committed Jan 20, 2017
1 parent 113725a commit 4cbd6c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/intc/s390_flic_kvm.c
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 4cbd6c4

Please sign in to comment.