From: Hollis Blanchard <[email protected]>

This fixes a build break when KVM_IOAPIC_NUM_PINS is not defined.

Signed-off-by: Hollis Blanchard <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/kvm/libkvm/libkvm.c b/kvm/libkvm/libkvm.c
index 0610e3f..ba0a5d1 100644
--- a/kvm/libkvm/libkvm.c
+++ b/kvm/libkvm/libkvm.c
@@ -1406,6 +1406,7 @@ int kvm_commit_irq_routes(kvm_context_t kvm)
 
 int kvm_get_irq_route_gsi(kvm_context_t kvm)
 {
+#ifdef KVM_CAP_IRQ_ROUTING
        if (kvm->max_used_gsi >= KVM_IOAPIC_NUM_PINS)  {
            if (kvm->max_used_gsi <= kvm_get_gsi_count(kvm))
                 return kvm->max_used_gsi + 1;
@@ -1413,6 +1414,9 @@ int kvm_get_irq_route_gsi(kvm_context_t kvm)
                 return -ENOSPC;
         } else
             return KVM_IOAPIC_NUM_PINS;
+#else
+       return -ENOSYS;
+#endif
 }
 
 #ifdef KVM_CAP_DEVICE_MSIX
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to