Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUOG6-0001kW-Cj for qemu-devel@nongnu.org; Fri, 24 Jul 2009 13:08:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUOG1-0001jl-0O for qemu-devel@nongnu.org; Fri, 24 Jul 2009 13:08:37 -0400 Received: from [199.232.76.173] (port=33091 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUOG0-0001je-Pi for qemu-devel@nongnu.org; Fri, 24 Jul 2009 13:08:32 -0400 Received: from citadel.icyb.net.ua ([212.40.38.140]:2566) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUOFz-0000Ux-UV for qemu-devel@nongnu.org; Fri, 24 Jul 2009 13:08:32 -0400 Message-ID: <4A69EA85.8090502@icyb.net.ua> Date: Fri, 24 Jul 2009 20:08:21 +0300 From: Andriy Gapon MIME-Version: 1.0 References: <1248452819-5503-1-git-send-email-eak@us.ibm.com> In-Reply-To: <1248452819-5503-1-git-send-email-eak@us.ibm.com> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] HPET fixes for reg writes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Beth Kon Cc: qemu-devel@nongnu.org on 24/07/2009 19:26 Beth Kon said the following: > This patch addresses the problems found by Andriy Gapon: > > - The code was incorrectly overwriting the high order 32 > bits of the timer and hpet config registers. This didn't show up > in testing because linux and windows use hpet in legacy mode, > where the high order 32 bits (advertising available interrupts) > of the timer config register are ignored, and the high order 32 > bits of the hpet config register are reserved and unused. > > > - The mask for level-triggered interrupts was off by a bit. (hpet > doesn't currently support level-triggered interrupts). > > In addition, I removed some unused #defines, and corrected the ioapic > interrupt values advertised. I'd set this up early in hpet development > and never went back to correct it, and no bugs resulted since linux and > windows use hpet in legacy mode where available interrupts are ignored. > Beth, thanks a lot! And a comment: it seems that the code doesn't verify interrupt configured by software, it happily uses any interrupt even if it's not advertised in interrupt capabilities. I know, the software should not do that, but it happens :) Also, maybe it would be a good idea to keep support for some additional interrupts? E.g. irq 10, 11 or some such, or maybe something >= 16 for APIC mode (if possible at all). But I know that this needs some careful thinking to not interfere with other emulated devices. -- Andriy Gapon