From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastian Herbszt" Subject: Re: [PATCH 1/5] BIOS changes for configuring irq0->inti2 override (v4) Date: Thu, 11 Jun 2009 22:50:14 +0200 Message-ID: <96E2F18C325F48788FEB591C6547B4B5@FSCPC> References: <1244731365-32069-1-git-send-email-eak@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Cc: To: "Beth Kon" , Return-path: Received: from mail.gmx.net ([213.165.64.20]:58514 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753018AbZFKUvq (ORCPT ); Thu, 11 Jun 2009 16:51:46 -0400 In-Reply-To: <1244731365-32069-1-git-send-email-eak@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: Beth Kon wrote: > These patches resolve the irq0->inti2 override issue, and get the hpet working > on kvm. > > Override and HPET changes are sent as a series because HPET depends on the > override. Win2k8 expects the HPET interrupt on inti2, regardless of whether > an override exists in the BIOS. And the HPET spec states that in legacy mode, > timer interrupt is on inti2. > > The irq0->inti2 override will always be used unless the kernel cannot do irq > routing (i.e., compatibility with old kernels). So if the kernel is capable, > userspace sets up irq0->inti2 via the irq routing interface, and adds the > irq0->inti2 override to the MADT interrupt source override table, > and the mp table (for the no-acpi case). > > Changes from v3: > > - changes based on comments from Avi and Gleb. > - corrected legacy enable/disable for in-kernel PIT. The code now best > approximates a multiplexer that disables PIT interrupts when HPET is > in legacy mode (as described by HPET spec). Any changes to the PIT that > may occur while HPET is operating in legacy mode are saved, so if > HPET leaves legacy mode, the PIT is just reenabled, with mode set > to whatever the last setting from guest was. Legacy mode is disabled > at least during crash and shutdown (in Linux), so this needs to be > handled properly. > > > --- > kvm/bios/rombios32.c | 60 ++++++++++++++++++++++++++++++++++++------------- > 1 files changed, 44 insertions(+), 16 deletions(-) What about the mptable entry count? Think it would need something like #ifdef BX_QEMU if (irq0_override) putle16(&q, smp_cpus + 17); /* entry count */ else putle16(&q, smp_cpus + 18); /* entry count */ #else putle16(&q, smp_cpus + 18); /* entry count */ #endif Your patch "Fix non-ACPI Timer Interrupt Routing - v3" [1] included such a change. [1] http://lists.gnu.org/archive/html/qemu-devel/2009-04/msg01396.html - Sebastian