From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTfPk-00036S-6h for qemu-devel@nongnu.org; Wed, 22 Jul 2009 13:15:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTfPf-00034X-L7 for qemu-devel@nongnu.org; Wed, 22 Jul 2009 13:15:35 -0400 Received: from [199.232.76.173] (port=44787 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTfPf-00034L-8T for qemu-devel@nongnu.org; Wed, 22 Jul 2009 13:15:31 -0400 Received: from mx20.gnu.org ([199.232.41.8]:45686) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTfPe-000493-Oo for qemu-devel@nongnu.org; Wed, 22 Jul 2009 13:15:30 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTfPd-0005ou-9E for qemu-devel@nongnu.org; Wed, 22 Jul 2009 13:15:29 -0400 Date: Wed, 22 Jul 2009 14:15:19 -0300 From: Luiz Capitulino Message-ID: <20090722141519.2c142274@doriath> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Build currently broken List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: glommer@redhat.com Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Hi Glauber, Very latest Anthony's tree doesn't build for me: """ cc1: warnings being treated as errors /home/lcapitulino/src/rh-internal/qemu-qmp/kvm-all.c:158: error: =E2=80=98o= n_vcpu=E2=80=99 defined but not used make[1]: *** [kvm-all.o] Error 1 make: *** [subdir-x86_64-softmmu] Error 2 """ The culprit seems to be 452e475196a3f8b6b96d16bbaca727ebc1278a97 . The only user of on_vcpu() is protected by #ifdef KVM_CAP_SET_GUEST_DEBUG. The patch below fixes it for me. --- Fix broken build =20 The only caller of on_vcpu() is protected by ifdef KVM_CAP_SET_GUEST_DEBUG, so protect on_vcpu() too otherwise QEMU may to build. =20 Signed-off-by: Luiz Capitulino diff --git a/kvm-all.c b/kvm-all.c index 824bb4c..70507b1 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -155,15 +155,6 @@ static void kvm_reset_vcpu(void *opaque) } } =20 -static void on_vcpu(CPUState *env, void (*func)(void *data), void *data) -{ - if (env =3D=3D cpu_single_env) { - func(data); - return; - } - abort(); -} - int kvm_irqchip_in_kernel(void) { return kvm_state->irqchip_in_kernel; @@ -906,6 +897,15 @@ void kvm_setup_guest_memory(void *start, size_t size) } =20 #ifdef KVM_CAP_SET_GUEST_DEBUG +static void on_vcpu(CPUState *env, void (*func)(void *data), void *data) +{ + if (env =3D=3D cpu_single_env) { + func(data); + return; + } + abort(); +} + struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env, target_ulong pc) {