All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: glommer@redhat.com
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] Build currently broken
Date: Wed, 22 Jul 2009 14:15:19 -0300	[thread overview]
Message-ID: <20090722141519.2c142274@doriath> (raw)


 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: ‘on_vcpu’ 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
    
    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.
    
    Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>

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)
     }
 }
 
-static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
-{
-    if (env == 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)
 }
 
 #ifdef KVM_CAP_SET_GUEST_DEBUG
+static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
+{
+    if (env == cpu_single_env) {
+        func(data);
+        return;
+    }
+    abort();
+}
+
 struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
                                                  target_ulong pc)
 {

             reply	other threads:[~2009-07-22 17:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 17:15 Luiz Capitulino [this message]
2009-07-22 17:58 ` [Qemu-devel] Re: Build currently broken Anthony Liguori
2009-07-22 18:10   ` Luiz Capitulino
2009-07-22 18:18     ` Anthony Liguori
2009-07-22 18:35       ` Glauber Costa
2009-07-22 18:30         ` Anthony Liguori
2009-07-22 19:05           ` Jan Kiszka

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=20090722141519.2c142274@doriath \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=glommer@redhat.com \
    --cc=qemu-devel@nongnu.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.