From: Gleb Natapov <gleb@redhat.com>
To: Mikolaj Kucharski <mikolaj@kucharski.name>, kvm@vger.kernel.org
Subject: Re: Qemu vs Qemu-KVM
Date: Tue, 22 Dec 2009 16:20:27 +0200 [thread overview]
Message-ID: <20091222142027.GB4490@redhat.com> (raw)
In-Reply-To: <20091222071557.GX4490@redhat.com>
On Tue, Dec 22, 2009 at 09:15:57AM +0200, Gleb Natapov wrote:
> On Mon, Dec 21, 2009 at 10:21:14PM +0000, Mikolaj Kucharski wrote:
> > On Mon, Dec 21, 2009 at 09:22:52AM +0200, Gleb Natapov wrote:
> > > > I have personal interest in resolving RedHat's bz #508801, unfortunately
> > > > I cannot do that myself, so I wanted to ask on the list for help, but now
> > > > I'm confused where should I go.
> > > >
> > > Can you try kvm modules from latest kvm.git please? It looks like emulation of
> > > "push %ds" fails and it was added after 2.6.32.
> >
> > Having following GIT repositories:
> >
> > git://git.kernel.org/pub/scm/virt/kvm/kvm.git
> > git://git.kernel.org/pub/scm/virt/kvm/kvm-kmod.git
> >
> > Which one I should use to build my modules from? I would like to keep my
> > system (Fedora 12) consistent and I don't want to have any parts built
> > outside of rpm. I would like to contribute/help for RedHat's bz #508801
> > resolution, but I need some directions.
> >
> > Is kvm.git whole Linux kernel?
> >
> Don't bother, I already tested upstream with OpenBSD and, as Avi said,
> the problem is somewhere else.
>
For some strange reason openbsd configures gsi 4 (com0) and gsi 12
(i8042) to be level triggered active high in ioapic. That causes KVM
to send endless stream of interrupts into the guest, so guest's stack
overflows into framebuffer area. At this point KVM start to emulate
instructions and fails. I don't know why openbsd configures those
interrupts incorrectly. It also ignores my attempts to override interrupt
polarity/type with ACPI tables. Somebody knowledgeable in openbsd should
look into why it configures interrupt controller incorrectly. If I
override wrong settings inside KVM like in the patch below openbsd boots,
but I doubt com port is usable.
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 38a2d20..fc37eac 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -121,6 +121,8 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
default:
index = (ioapic->ioregsel - 0x10) >> 1;
+ if (!(ioapic->ioregsel & 1))
+ val &= ~0xa000;
ioapic_debug("change redir index %x val %x\n", index, val);
if (index >= IOAPIC_NUM_PINS)
return;
--
Gleb.
next prev parent reply other threads:[~2009-12-22 14:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-20 23:10 Qemu vs Qemu-KVM Mikolaj Kucharski
2009-12-21 7:22 ` Gleb Natapov
2009-12-21 9:33 ` Avi Kivity
2009-12-21 22:21 ` Mikolaj Kucharski
2009-12-22 7:15 ` Gleb Natapov
2009-12-22 14:20 ` Gleb Natapov [this message]
2009-12-22 8:53 ` 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=20091222142027.GB4490@redhat.com \
--to=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mikolaj@kucharski.name \
/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