kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@inbox.ru>
To: kvm@vger.kernel.org
Cc: Avi Kivity <avi@redhat.com>, Sergei Trofimovich <slyfox@gentoo.org>
Subject: [PATCH] Fix i8259 for target-arches not supporting KVM
Date: Sun, 29 Jan 2012 16:18:01 +0300	[thread overview]
Message-ID: <1327843081-26239-1-git-send-email-slyfox@inbox.ru> (raw)

From: Sergei Trofimovich <slyfox@gentoo.org>

  $ ./configure --target-list=alpha-softmmu && make

      CC    alpha-softmmu/i8259.o
    cc1: warnings being treated as errors
    /home/slyfox/dev/git/qemu-kvm/hw/i8259.c: In function 'kvm_i8259_set_irq':
    /home/slyfox/dev/git/qemu-kvm/hw/i8259.c:688:13: error: implicit declaration of function 'apic_set_irq_delivered'

    /home/slyfox/dev/git/qemu-kvm/hw/i8259.c:688:13: error: nested extern declaration of 'apic_set_irq_delivered'
    make[1]: *** [i8259.o] Error 1
    make: *** [subdir-alpha-softmmu] Error 2

      LINK  alpha-softmmu/qemu-system-alpha
    i8259.o: In function `kvm_i8259_set_irq':
    /tmp/portage/app-emulation/qemu-kvm-9999/work/qemu-kvm-9999/hw/i8259.c:689: undefined reference to `apic_set_irq_delivered'

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 hw/i8259.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/i8259.c b/hw/i8259.c
index 0632ea2..2f6789d 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -21,6 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+#include "apic.h"
 #include "hw.h"
 #include "pc.h"
 #include "isa.h"
@@ -682,12 +683,14 @@ static int kvm_kernel_pic_load_from_user(PicState *s)
 
 static void kvm_i8259_set_irq(void *opaque, int irq, int level)
 {
+#ifdef CONFIG_KVM
     int pic_ret;
     if (kvm_set_irq(irq, level, &pic_ret)) {
         if (pic_ret != 0)
             apic_set_irq_delivered();
         return;
     }
+#endif
 }
 
 device_init(pic_register)
-- 
1.7.8.3


             reply	other threads:[~2012-01-29 13:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-29 13:18 Sergei Trofimovich [this message]
2012-01-30 10:08 ` [PATCH] Fix i8259 for target-arches not supporting KVM Jan Kiszka
2012-01-30 17:15   ` Sergei Trofimovich
2012-01-30 21:13     ` 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=1327843081-26239-1-git-send-email-slyfox@inbox.ru \
    --to=slyfox@inbox.ru \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=slyfox@gentoo.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).