From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIitb-0004pj-8Y for qemu-devel@nongnu.org; Sun, 30 May 2010 09:49:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIita-0004eL-38 for qemu-devel@nongnu.org; Sun, 30 May 2010 09:49:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54637) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIitZ-0004e8-Rz for qemu-devel@nongnu.org; Sun, 30 May 2010 09:49:42 -0400 Date: Sun, 30 May 2010 16:49:35 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [RFT][PATCH 07/15] qemu_irq: Add IRQ handlers with delivery feedback Message-ID: <20100530134935.GC24302@redhat.com> References: <4C00C921.2060809@web.de> <20100529144641.GF3604@redhat.com> <20100529163709.GJ3604@redhat.com> <20100530060255.GJ5474@redhat.com> <20100530123316.GB24302@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Jan Kiszka , qemu-devel@nongnu.org, Juan Quintela On Sun, May 30, 2010 at 12:56:26PM +0000, Blue Swirl wrote: > >> Well, I'd like to get the test program also trigger it. Now I'm getting: > >> apic: write: 00000350 = 00000000 > >> apic: apic_reset_irq_delivered: old coalescing 0 > >> apic: apic_local_deliver: vector 3 delivery mode 0 > >> apic: apic_set_irq: coalescing 1 > >> apic: apic_get_irq_delivered: returning coalescing 1 > >> apic: apic_reset_irq_delivered: old coalescing 1 > >> apic: apic_local_deliver: vector 3 delivery mode 0 > >> apic: apic_set_irq: coalescing 0 > >> apic: apic_get_irq_delivered: returning coalescing 0 > >> apic: apic_reset_irq_delivered: old coalescing 0 > >> apic: apic_local_deliver: vector 3 delivery mode 0 > >> apic: apic_set_irq: coalescing 0 > >> So interrupt is _alway_ coalesced. If apic_get_irq_delivered() returns 0 it means the interrupt was not delivered. > >> It looks like some other IRQs cause the coalescing, because also > >> looking at RTC code, it seems it's not possible for RTC to raise the > >> IRQ (except update IRQ, alarm etc.) without calling > >> apic_reset_irq_delivered(). > >> > >> I've attached my test program. Compile: > >> gcc -m32 -o coalescing coalescing.S -ffreestanding -nostdlib -Wl,-T > >> coalescing.ld -g && objcopy -Obinary coalescing coalescing.bin > >> > >> Run: > >> qemu -L . -bios coalescing.bin -no-hpet -rtc-td-hack > >> > > The application does not work for me. Looks like it fails to enter > > protected mode. $pc jumps from 0x00000000fffffff0 to 0x00000000000f003e > > and back. > > Strange. Here's a working binary. > Your binary works here too. What compiler are you using? -- Gleb.