From: Jan Kiszka <jan.kiszka@web.de>
To: Beth Kon <eak@us.ibm.com>, Glauber Costa <glommer@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: qemu-kvm broken after ./configure --disable-kvm
Date: Thu, 11 Jun 2009 15:53:28 +0200 [thread overview]
Message-ID: <4A310C58.6050301@web.de> (raw)
In-Reply-To: <4A30FBA3.1070404@us.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2706 bytes --]
Beth Kon wrote:
> Building latest git with ./configure --disable-kvm breaks with errors in
> pcspk.c
With latest git, things break much earlier in case your host does not
provide linux/kvm.h because libkvm-all.h includes it unconditionally.
I would like to push this task to Glauber as he is already shuffling
around most of the involved code: Could you have a look on --disable-kvm
too while you are at it? My basic idea would be to get rid of direct
qemu-kvm.h includes so that you always obtain the required [proto]types
by including kvm.h, independent of CONFIG_KVM and already prepared for
upstream where there is no qemu-kvm.h.
Regarding the bugs I left behind in pcspk.c, I would suggest something
like
diff --git a/hw/pcspk.c b/hw/pcspk.c
index 9e1b59a..5b624d1 100644
--- a/hw/pcspk.c
+++ b/hw/pcspk.c
@@ -51,10 +51,9 @@ static const char *s_spk = "pcspk";
static PCSpkState pcspk_state;
#ifdef USE_KVM_PIT
-static void kvm_get_pit_ch2(PITState *pit,
- struct kvm_pit_state *inkernel_state)
+static void kvm_get_pit_ch2(PITState *pit, KVMPITState *inkernel_state)
{
- struct kvm_pit_state pit_state;
+ KVMPITState pit_state;
if (kvm_enabled() && qemu_kvm_pit_in_kernel()) {
kvm_get_pit(kvm_context, &pit_state);
@@ -68,8 +67,7 @@ static void kvm_get_pit_ch2(PITState *pit,
}
}
-static void kvm_set_pit_ch2(PITState *pit,
- struct kvm_pit_state *inkernel_state)
+static void kvm_set_pit_ch2(PITState *pit, KVMPITState *inkernel_state)
{
if (kvm_enabled() && qemu_kvm_pit_in_kernel()) {
inkernel_state->channels[2].mode = pit->channels[2].mode;
@@ -82,9 +80,9 @@ static void kvm_set_pit_ch2(PITState *pit,
}
#else
static inline void kvm_get_pit_ch2(PITState *pit,
- kvm_pit_state *inkernel_state) { }
+ KVMPITState *inkernel_state) { }
static inline void kvm_set_pit_ch2(PITState *pit,
- kvm_pit_state *inkernel_state) { }
+ KVMPITState *inkernel_state) { }
#endif
static inline void generate_samples(PCSpkState *s)
@@ -168,7 +166,7 @@ static uint32_t pcspk_ioport_read(void *opaque, uint32_t addr)
static void pcspk_ioport_write(void *opaque, uint32_t addr, uint32_t val)
{
- struct kvm_pit_state inkernel_state;
+ KVMPITState inkernel_state;
PCSpkState *s = opaque;
const int gate = val & 1;
where KVMPITState is defined as
#ifdef KVM_CAP_PIT
typedef struct kvm_pit_state KVMPITState;
#else
typedef struct { } KVMPITState;
#endif
Thanks,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2009-06-11 13:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 12:42 qemu-kvm broken after ./configure --disable-kvm Beth Kon
2009-06-11 13:53 ` Jan Kiszka [this message]
2009-06-14 11:13 ` Avi Kivity
2009-06-14 11:25 ` Jan Kiszka
2009-06-14 11:31 ` Avi Kivity
2009-06-14 12:47 ` Jan Kiszka
2009-06-14 12:58 ` Avi Kivity
2009-06-14 13:06 ` Jan Kiszka
2009-06-14 13:14 ` Avi Kivity
2009-06-23 0:41 ` Dustin Kirkland
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=4A310C58.6050301@web.de \
--to=jan.kiszka@web.de \
--cc=eak@us.ibm.com \
--cc=glommer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox