From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZ5Vz-0008Du-BB for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:36:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZ5Vy-0008D6-9Y for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:36:10 -0500 Received: from [199.232.76.173] (port=45153 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZ5Vx-0008Cw-6u for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:36:09 -0500 Received: from savannah.gnu.org ([199.232.41.3]:42699 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZ5Vx-0005GF-0m for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:36:09 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LZ5Vw-0006iG-J3 for qemu-devel@nongnu.org; Mon, 16 Feb 2009 15:36:08 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LZ5Vw-0006iC-EG for qemu-devel@nongnu.org; Mon, 16 Feb 2009 15:36:08 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Mon, 16 Feb 2009 15:36:08 +0000 Subject: [Qemu-devel] [6625] Generate PCI hotplug interrupt only if corespondent EN bit is set. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6625 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6625 Author: aliguori Date: 2009-02-16 15:36:08 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Generate PCI hotplug interrupt only if corespondent EN bit is set. (Gleb Natapov) Signed-off-by: Gleb Natapov Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/acpi.c Modified: trunk/hw/acpi.c =================================================================== --- trunk/hw/acpi.c 2009-02-16 15:36:03 UTC (rev 6624) +++ trunk/hw/acpi.c 2009-02-16 15:36:08 UTC (rev 6625) @@ -724,25 +724,25 @@ static void enable_device(struct pci_status *p, struct gpe_regs *g, int slot) { g->sts |= 2; - g->en |= 2; p->up |= (1 << slot); } static void disable_device(struct pci_status *p, struct gpe_regs *g, int slot) { g->sts |= 2; - g->en |= 2; p->down |= (1 << slot); } void qemu_system_device_hot_add(int bus, int slot, int state) { - qemu_set_irq(pm_state->irq, 1); pci0_status.up = 0; pci0_status.down = 0; if (state) enable_device(&pci0_status, &gpe, slot); else disable_device(&pci0_status, &gpe, slot); - qemu_set_irq(pm_state->irq, 0); + if (gpe.en & 2) { + qemu_set_irq(pm_state->irq, 1); + qemu_set_irq(pm_state->irq, 0); + } }