diff mbox

[qemu-kvm,1/3] move kvm_set_irqfd to kvm-stub.c

Message ID 1281626968-5607-2-git-send-email-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini Aug. 12, 2010, 3:29 p.m. UTC
None
diff mbox

Patch

diff --git a/kvm-all.c b/kvm-all.c
index 47f58a6..78983ee 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1298,6 +1298,11 @@  int kvm_set_irqfd(int gsi, int fd, bool assigned)
         return r;
     return 0;
 }
+#else
+int kvm_set_irqfd(int gsi, int fd, bool assigned)
+{
+    return -ENOSYS;
+}
 #endif
 
 #undef PAGE_SIZE
diff --git a/kvm-stub.c b/kvm-stub.c
index 7be5f5d..dd5ca66 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -135,3 +135,9 @@  int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
 {
     return -ENOSYS;
 }
+
+int
+kvm_set_irqfd(int gsi, int fd, bool assigned)
+{
+    return -ENOSYS;
+}
diff --git a/kvm.h b/kvm.h
index aab5118..e937995 100644
--- a/kvm.h
+++ b/kvm.h
@@ -182,15 +182,6 @@  static inline void cpu_synchronize_post_init(CPUState *env)
 
 #endif
 
-#if defined(KVM_IRQFD) && defined(CONFIG_KVM)
 int kvm_set_irqfd(int gsi, int fd, bool assigned);
-#else
-static inline
-int kvm_set_irqfd(int gsi, int fd, bool assigned)
-{
-    return -ENOSYS;
-}
-#endif
-
 int kvm_set_ioeventfd_pio_word(int fd, uint16_t adr, uint16_t val, bool assign);
 #endif