[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Seabios irq override v3

From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH] Seabios irq override v3
Date: Mon, 03 Aug 2009 16:17:29 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 07/30/2009 07:05 PM, Beth Kon wrote:
Jes Sorensen wrote:
On 07/30/2009 01:27 AM, Kevin O'Connor wrote:
I made some cleanups and committed a modified patch.

I'd like to see what the dynamic irq0override code looks like.  The
kvm on my machine is a little older and it fails when irq0override is

Also, there is a set of irq overrides in the acpi madt code for kvm
that set irq 5,9,10,11 to level triggered interrupts.  I don't see
this in the latest kvm - can this now be removed?

Hi Kevin,

I justed tested your version and it works fine here. If I got some of
the formatting wrong, please let me know and I'll try to get it right
in the next set.

The tricky part with the irqoverride is that it is used by recent KVM,
but not older versions. qemu-kvm has a fw_cfg flag it uses to set (and
not set it when it detects an older version of KVM), however upstream
QEMU relies on the irqoverride unconditionally.

As the BIOS cannot detect which version of KVM it is running on, there
are two options, either we port the irqoverride fw_cfg to upstream QEMU,
or accept that Seabios will not work on older versions of KVM. I don't
think Anthony is super excited about adding this to upstream QEMU since
it is for legacy support, and I don't anticipate any distros starting
to ship Seabios with older version of KVM. I think it would be simpler
to just accept it won't work with the older KVM.

I thought about how to best do the dynamic override thing, and I think
the best thing is to just set it when we detect we are running on QEMU,
be it QEMU, KVM, or KQEMU. I have a patch that allows me to remove all
instances of CONFIG_KVM in Seabios, by using a new fw_cfg that tells the
bios what emulator it is running on. It would be interesting to see if
we could come up with a way for Coreboot to flag as well, so we can
share a single BIOS binary.

For the MADT stuff, I really don't know. Maybe Avi or Anthony can
if (PCI_ISA_IRQ_MASK & (1U << i)) {
               memset(int_override, 0, sizeof(*int_override));
               int_override->type   = APIC_XRUPT_OVERRIDE;
               int_override->length = sizeof(*int_override);
               int_override->source = i;
               int_override->gsi    = i;
int_override->flags = 0xd; /* active high, level triggered */
           } else {

The above code is still in qemu-kvm/kvm/bios/rombios32.c, but has never been in qemu/bochs bios. I don't understand why.

IIRC this is needed when using PCI without ACPI. qemu.git doesn't need it since the qemu ioapic does not implement polarity. The guest assumes active low but qemu implements active high.

error compiling committee.c: too many arguments to function

reply via email to

[Prev in Thread] Current Thread [Next in Thread]