qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Subject: [Qemu-devel] [PATCH] target-i386: Avoid kvm related compiler error
Date: Wed, 12 May 2010 21:24:45 +0200	[thread overview]
Message-ID: <1273692285-9802-1-git-send-email-weil@mail.berlios.de> (raw)

Some versions of kvm.h (debian lenny) define KVM_CAP_VCPU_EVENTS
without defining KVM_VCPUEVENT_VALID_NMI_PENDING or
KVM_VCPUEVENT_VALID_SIPI_VECTOR.

Without the patch, compilation fails:

  CC    x86_64-softmmu/kvm.o
/qemu/target-i386/kvm.c: In function 'kvm_put_vcpu_events':
/qemu/target-i386/kvm.c:824: error: 'KVM_VCPUEVENT_VALID_NMI_PENDING' undeclared (first use in this function)
/qemu/target-i386/kvm.c:824: error: (Each undeclared identifier is reported only once
/qemu/target-i386/kvm.c:824: error: for each function it appears in.)
/qemu/target-i386/kvm.c:824: error: 'KVM_VCPUEVENT_VALID_SIPI_VECTOR' undeclared (first use in this function)
make[1]: *** [kvm.o] Error 1

Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 target-i386/kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index f73b47b..9a37753 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -796,7 +796,7 @@ static int kvm_get_mp_state(CPUState *env)
 
 static int kvm_put_vcpu_events(CPUState *env, int level)
 {
-#ifdef KVM_CAP_VCPU_EVENTS
+#if defined(KVM_CAP_VCPU_EVENTS) && defined(KVM_VCPUEVENT_VALID_NMI_PENDING)
     struct kvm_vcpu_events events;
 
     if (!kvm_has_vcpu_events()) {
-- 
1.7.1

             reply	other threads:[~2010-05-12 19:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 19:24 Stefan Weil [this message]
2010-05-12 19:50 ` [Qemu-devel] Re: [PATCH] target-i386: Avoid kvm related compiler error 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=1273692285-9802-1-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=jan.kiszka@siemens.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).