From: Anthony Liguori <aliguori@us.ibm.com>
To: kvm@vger.kernel.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] kvm-unit-tests: do not set level sensitive irq when initializing the PIC
Date: Thu, 24 Feb 2011 15:48:04 -0600 [thread overview]
Message-ID: <1298584085-13129-3-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1298584085-13129-1-git-send-email-aliguori@us.ibm.com>
I'm not sure if this was intentional but the QEMU i8259 does not support this
flag. I haven't observed any issues with this but I'll happily admit that
I'm not very aware of what I'm doing here.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/lib/x86/apic.c b/lib/x86/apic.c
index 7bb98ed..2c2afb7 100644
--- a/lib/x86/apic.c
+++ b/lib/x86/apic.c
@@ -1,5 +1,6 @@
#include "libcflat.h"
#include "apic.h"
+#include "io.h"
static void *g_apic = (void *)0xfee00000;
static void *g_ioapic = (void *)0xfec00000;
@@ -11,11 +12,6 @@ struct apic_ops {
u32 (*id)(void);
};
-static void outb(unsigned char data, unsigned short port)
-{
- asm volatile ("out %0, %1" : : "a"(data), "d"(port));
-}
-
static u32 xapic_read(unsigned reg)
{
return *(volatile u32 *)(g_apic + reg);
@@ -133,7 +129,7 @@ void ioapic_write_redir(unsigned line, ioapic_redir_entry_t e)
void enable_apic(void)
{
printf("enabling apic\n");
- xapic_write(0xf0, 0x1ff); /* spurious vector register */
+ xapic_write(0xf0, 0x1f7); /* spurious vector register */
}
void mask_pic_interrupts(void)
--
1.7.0.4
next prev parent reply other threads:[~2011-02-24 21:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 21:48 [Qemu-devel] [RFC PATCH 0/3] Make kvm-unit-tests more friendly to upstream QEMU Anthony Liguori
2011-02-24 21:48 ` [Qemu-devel] [PATCH 1/3] kvm-unit-tests: add x86 port io accessors Anthony Liguori
2011-02-27 12:44 ` [Qemu-devel] " Avi Kivity
2011-02-27 14:01 ` Anthony Liguori
2011-02-27 15:32 ` Avi Kivity
2011-02-24 21:48 ` Anthony Liguori [this message]
2011-02-27 12:46 ` [Qemu-devel] Re: [PATCH 2/3] kvm-unit-tests: do not set level sensitive irq when initializing the PIC Avi Kivity
2011-02-24 21:48 ` [Qemu-devel] [PATCH 3/3] kvm-unit-tests: make I/O more friendly to existing QEMU hardware Anthony Liguori
2011-02-27 12:49 ` [Qemu-devel] " Avi Kivity
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=1298584085-13129-3-git-send-email-aliguori@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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).