From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33046 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVljM-0006QE-SX for qemu-devel@nongnu.org; Mon, 05 Jul 2010 09:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVljL-0001L0-7l for qemu-devel@nongnu.org; Mon, 05 Jul 2010 09:29:04 -0400 Received: from goliath.siemens.de ([192.35.17.28]:21486) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVljK-0001Kh-S5 for qemu-devel@nongnu.org; Mon, 05 Jul 2010 09:29:03 -0400 Message-ID: <4C31DE17.9090802@siemens.com> Date: Mon, 05 Jul 2010 15:28:55 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups References: <20100629211802.16137.10587.malonedeb@soybean.canonical.com> <4C2EECE8.8030305@web.de> <201007042306.57852.paul@codesourcery.com> <4C317E2A.7090101@web.de> <20100705064239.GI4689@redhat.com> <4C31807B.2030401@web.de> <20100705070017.GJ4689@redhat.com> <4C318B74.3040403@web.de> <4C319C30.30308@redhat.com> <4C31A0EC.7020803@web.de> <4C31A477.7010205@redhat.com> <4C31BE6A.70307@siemens.com> <4C31C4A3.4070208@redhat.com> <4C31CD38.5050904@siemens.com> <4C31CED1.70704@redhat.com> In-Reply-To: <4C31CED1.70704@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Blue Swirl , Paul Brook , Gleb Natapov , "qemu-devel@nongnu.org" Avi Kivity wrote: > On 07/05/2010 03:16 PM, Jan Kiszka wrote: >>> It's also architecturally cleaner. Masks and acks are architectural >>> events. Injections are not - there's the edge on the LINT0 or INTI2 >>> pins, generation of an APIC message, receipt of the APIC message, and >>> assertion of the APIC-to-core interrupt interface. I'm not sure how the >>> proposed interface maps to that. >>> >> Our emulation does not reflect every architectural detail of the >> delivery path anyway. > > Usually, when that happens, we get an obscure bug. > > So if we add a facility, especially across the user/kernel boundary, > it's better to have it conform to the architecture. That reduces the > chance it has a serious hidden bug. Neither ack/mask notifiers (past the IRQ controller) nor injection return values are part of any architecture we emulate. What is driving us are the requirements of the de-coalescing workarounds we want to build on top and the impact on existing design. > >> The abstraction is always an IRQ line which can be >> high or low (sometimes it is only high, but this is a bug). >> > > That's a bug in the use of qemu_irq, not qemu_irq itself. > > But qemu_irq needs to remember its state, otherwise when an irq > controller unmasks a level-triggered line, it won't see the interrupt. I think it's currently the IRQ controller's job to keep track of the line state during masked periods. Moving this to qemu_irq is definitely better but requires some care (e.g. when vmstates are involved). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux