All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: [PATCH] qemu-kvm: Fix kvm-disabled build
Date: Sat, 04 Jul 2009 11:03:12 +0200	[thread overview]
Message-ID: <4A4F1AD0.4090905@web.de> (raw)

[-- 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 --]

             reply	other threads:[~2009-07-04  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-04  9:03 Jan Kiszka [this message]
2009-07-06  7:41 ` [PATCH] qemu-kvm: Fix kvm-disabled build Avi Kivity
2011-06-03 14:38 Jan Kiszka
2011-06-20 14:56 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A4F1AD0.4090905@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.