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>
This commit is contained in:
Fei Li 2016-11-25 07:59:07 +01:00 committed by Cornelia Huck
parent 113725a6a3
commit 4cbd6c41fa
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}