public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: Fix kvm-disabled build
@ 2009-07-04  9:03 Jan Kiszka
  2009-07-06  7:41 ` Avi Kivity
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2009-07-04  9:03 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel

[-- Attachment #1: Type: text/plain, Size: 2057 bytes --]

This addresses all issues that currently block building qemu-kvm with
kvm support switched off. It's a pragmatic approach as more cleanups
are actually required /wrt {kvm,libkvm,qemu-kvm}.h.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 hw/pcspk.c   |    4 ++--
 libkvm-all.h |    8 ++++++++
 qemu-kvm.h   |    3 ++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/hw/pcspk.c b/hw/pcspk.c
index 9e1b59a..3d3eba4 100644
--- a/hw/pcspk.c
+++ b/hw/pcspk.c
@@ -82,9 +82,9 @@ static void kvm_set_pit_ch2(PITState *pit,
 }
 #else
 static inline void kvm_get_pit_ch2(PITState *pit,
-                                   kvm_pit_state *inkernel_state) { }
+                                   struct kvm_pit_state *inkernel_state) { }
 static inline void kvm_set_pit_ch2(PITState *pit,
-                                   kvm_pit_state *inkernel_state) { }
+                                   struct kvm_pit_state *inkernel_state) { }
 #endif
 
 static inline void generate_samples(PCSpkState *s)
diff --git a/libkvm-all.h b/libkvm-all.h
index ecd3065..f348e69 100644
--- a/libkvm-all.h
+++ b/libkvm-all.h
@@ -5,6 +5,8 @@
 #ifndef LIBKVM_H
 #define LIBKVM_H
 
+#ifdef USE_KVM
+
 #if defined(__s390__)
 #include <asm/ptrace.h>
 #endif
@@ -938,4 +940,10 @@ int kvm_assign_set_msix_entry(kvm_context_t kvm,
 
 uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, int reg);
 
+#else /* !USE_KVM */
+
+struct kvm_pit_state { };
+
+#endif /* !USE_KVM */
+
 #endif
diff --git a/qemu-kvm.h b/qemu-kvm.h
index eb99bc4..18a5b7f 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -12,6 +12,8 @@
 
 #include <signal.h>
 
+#include "libkvm-all.h"
+
 int kvm_main_loop(void);
 int kvm_qemu_init(void);
 int kvm_qemu_create_context(void);
@@ -141,7 +143,6 @@ void kvm_arch_do_ioperm(void *_data);
 #define BITMAP_SIZE(m) (ALIGN(((m)>>TARGET_PAGE_BITS), HOST_LONG_BITS) / 8)
 
 #ifdef USE_KVM
-#include "libkvm-all.h"
 #include "sys-queue.h"
 
 extern int kvm_allowed;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] qemu-kvm: Fix kvm-disabled build
@ 2011-06-03 14:38 Jan Kiszka
  2011-06-20 14:56 ` Marcelo Tosatti
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2011-06-03 14:38 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm

Minor fallout from recent refactorings.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 kvm-stub.c |   11 +++--------
 qemu-kvm.h |    4 ++--
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/kvm-stub.c b/kvm-stub.c
index 90fed66..aa2238f 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -156,22 +156,17 @@ int kvm_get_irq_route_gsi(void)
     return -ENOSYS;
 }
 
-int kvm_add_msix(uint32_t gsi, uint32_t addr_lo,
-                 uint32_t addr_hi, uint32_t data)
+int kvm_msi_message_add(KVMMsiMessage *msg)
 {
     return -ENOSYS;
 }
 
-int kvm_del_msix(uint32_t gsi, uint32_t addr_lo,
-                 uint32_t addr_hi, uint32_t data)
+int kvm_msi_message_del(KVMMsiMessage *msg)
 {
     return -ENOSYS;
 }
 
-int kvm_update_msix(uint32_t old_gsi, uint32_t old_addr_lo,
-                    uint32_t old_addr_hi, uint32_t old_data,
-                    uint32_t new_gsi, uint32_t new_addr_lo,
-                    uint32_t new_addr_hi, uint32_t new_data)
+int kvm_msi_message_update(KVMMsiMessage *old, KVMMsiMessage *new)
 {
     return -ENOSYS;
 }
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 0f833f1..942baf2 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -271,8 +271,6 @@ void kvm_load_lapic(CPUState *env);
 void kvm_hpet_enable_kpit(void);
 void kvm_hpet_disable_kpit(void);
 
-int kvm_set_boot_cpu_id(KVMState *s, uint32_t id);
-
 void kvm_tpr_access_report(CPUState *env, uint64_t rip, int is_write);
 
 int kvm_arch_init_irq_routing(void);
@@ -293,6 +291,8 @@ extern unsigned int kvm_shadow_memory;
 
 int kvm_handle_tpr_access(CPUState *env);
 
+int kvm_set_boot_cpu_id(KVMState *s, uint32_t id);
+
 #else
 #define kvm_nested 0
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-20 16:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-04  9:03 [PATCH] qemu-kvm: Fix kvm-disabled build Jan Kiszka
2009-07-06  7:41 ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2011-06-03 14:38 Jan Kiszka
2011-06-20 14:56 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox