From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWY8K-0004Hu-LH for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:05:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWY8F-00047a-02 for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:05:30 -0400 Received: from [199.232.76.173] (port=37822 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWY8E-00047F-Mw for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:05:26 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:39236) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWY8E-0008Qt-0Y for qemu-devel@nongnu.org; Thu, 30 Jul 2009 12:05:26 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n6UG8vku012697 for ; Thu, 30 Jul 2009 12:08:57 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n6UG5H9u255114 for ; Thu, 30 Jul 2009 12:05:17 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6UG2Yr6001315 for ; Thu, 30 Jul 2009 12:02:35 -0400 Message-ID: <4A71C4E4.6030309@us.ibm.com> Date: Thu, 30 Jul 2009 12:05:56 -0400 From: Beth Kon MIME-Version: 1.0 References: <4A705561.80701@sgi.com> <20090729232748.GA16198@morn.localdomain> <4A719C3D.4080702@sgi.com> In-Reply-To: <4A719C3D.4080702@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Seabios irq override v3 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jes Sorensen Cc: Anthony Liguori , Kevin O'Connor , qemu-devel , Avi Kivity 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 >> set. >> >> 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 > comment? 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. In any case it has nothing to do with the irq0override code. is still in the latest kvm bios but has never been in the qemu/bochs bios. I don't understand why that is. > > I will post this patch shortly, I just need to make a few more minor > tweaks to it. > > Cheers, > Jes