From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtHN6-0002vf-J1 for qemu-devel@nongnu.org; Thu, 01 Oct 2009 04:50:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtHN2-0002rK-07 for qemu-devel@nongnu.org; Thu, 01 Oct 2009 04:50:44 -0400 Received: from [199.232.76.173] (port=58662 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtHN1-0002rG-Qc for qemu-devel@nongnu.org; Thu, 01 Oct 2009 04:50:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5350) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtHN0-0005jE-RV for qemu-devel@nongnu.org; Thu, 01 Oct 2009 04:50:39 -0400 Message-ID: <4AC46D57.9060608@redhat.com> Date: Thu, 01 Oct 2009 10:50:31 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 61/61] pc_q35: apic mode for pci interrupt routing. References: <1254305917-14784-1-git-send-email-yamahata@valinux.co.jp> <1254305917-14784-62-git-send-email-yamahata@valinux.co.jp> In-Reply-To: <1254305917-14784-62-git-send-email-yamahata@valinux.co.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org On 09/30/2009 12:18 PM, Isaku Yamahata wrote: > apic mode for pci interrupt routing. > > +static void ich9_lpc_ioapic_update_fn(void *opaque, int reset) > +{ > + struct ICH9_LPCIrqState *irq_state = opaque; > + struct ICH9_LPCState *ich9_lpc = irq_state->lpc; > + > + /* this can be called via gmch_init() where ich9_lpc isn't > + allocated yet */ > + if (ich9_lpc == NULL) > + return; > + > + if (reset) > + ich9_lpc->apic_mode = 0; > + else > + ich9_lpc->apic_mode = 1; > +} > + > My understanding was that the OS calls ACPI to set APIC mode. The ACPI routine (_PIC) can then access a register to re-program the interrupt router. Does this reflect how Q35 works, or is this a shortcut? On my desktop, I have: Name (\GPIC, Zero) Method (\_PIC, 1, NotSerialized) { Store (Arg0, \GPIC) } With GPIC later referenced by the various interrupt management routines like _PRT; if GPIC is set they return interrupts in the range 16-19, otherwise LNKA-LNKD. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.