From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: qemu-kvm broken after ./configure --disable-kvm Date: Thu, 11 Jun 2009 15:53:28 +0200 Message-ID: <4A310C58.6050301@web.de> References: <4A30FBA3.1070404@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9D091995955C4189C0224B92" Cc: kvm To: Beth Kon , Glauber Costa Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:34203 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752375AbZFKNxf (ORCPT ); Thu, 11 Jun 2009 09:53:35 -0400 In-Reply-To: <4A30FBA3.1070404@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9D091995955C4189C0224B92 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Beth Kon wrote: > Building latest git with ./configure --disable-kvm breaks with errors i= n > 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 =3D "pcspk"; static PCSpkState pcspk_state; =20 #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; =20 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, } } =20 -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 =3D 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 =20 static inline void generate_samples(PCSpkState *s) @@ -168,7 +166,7 @@ static uint32_t pcspk_ioport_read(void *opaque, uint3= 2_t addr) =20 static void pcspk_ioport_write(void *opaque, uint32_t addr, uint32_t val= ) { - struct kvm_pit_state inkernel_state; + KVMPITState inkernel_state; PCSpkState *s =3D opaque; const int gate =3D val & 1; =20 where KVMPITState is defined as #ifdef KVM_CAP_PIT typedef struct kvm_pit_state KVMPITState; #else typedef struct { } KVMPITState; #endif Thanks, Jan --------------enig9D091995955C4189C0224B92 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkoxDF0ACgkQniDOoMHTA+klHQCfSbEzcykwYVMxz1v9rzeqNuvl hv0AnRhpFzffvdzZ0NKJaufC6WCjhiZi =2JPx -----END PGP SIGNATURE----- --------------enig9D091995955C4189C0224B92--