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
=20
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
=20
+#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,
=20
uint32_t kvm_get_supported_cpuid(kvm_context_t kvm, uint32_t function, i=
nt reg);
=20
+#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 @@
=20
#include <signal.h>
=20
+#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)
=20
#ifdef USE_KVM
-#include "libkvm-all.h"
#include "sys-queue.h"
=20
extern int kvm_allowed;| Greg Kroah-Hartman | [PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment |
| Al Boldi | Re: [ck] Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu sched... |
| Andrew Morton | 2.6.25-rc8-mm2 |
| Ingo Molnar | Re: [patch] sched_clock(): cleanups |
| David Miller | [GIT]: Networking |
| John P Poet | Realtek 8111C transmit timed out |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Kenny Chang | Multicast packet loss |
git: | |
