[PATCH 4/5] [qemu-kvm] Use CAP_IRQ_ROUTING in kvm_get_irq_route_gsi()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes a build break when KVM_IOAPIC_NUM_PINS is not defined.

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 kvm/libkvm/libkvm.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux