From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZ5Wy-0008Tm-LE for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:37:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZ5Ww-0008TV-Nl for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:37:11 -0500 Received: from [199.232.76.173] (port=45169 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZ5Ww-0008TR-GQ for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:37:10 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:56063) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZ5Ww-0005L6-2l for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:37:10 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e7.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n1GFTCIx025794 for ; Mon, 16 Feb 2009 10:29:12 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n1GFb9Ep188488 for ; Mon, 16 Feb 2009 10:37:09 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n1GFb9Cm004582 for ; Mon, 16 Feb 2009 10:37:09 -0500 Received: from squirrel.codemonkey.ws (sig-9-65-85-240.mts.ibm.com [9.65.85.240]) by d01av03.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n1GFb8Pt004539 for ; Mon, 16 Feb 2009 10:37:08 -0500 Message-ID: <4999880A.7060800@us.ibm.com> Date: Mon, 16 Feb 2009 09:36:42 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Generate PCI hotplug interrupt only if corespondent EN bit is set. References: <20090212081036.29410.74172.stgit@dhcp-1-237.tlv.redhat.com> In-Reply-To: <20090212081036.29410.74172.stgit@dhcp-1-237.tlv.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Gleb Natapov wrote: > Signed-off-by: Gleb Natapov > Applied. Thanks. Regards, Anthony Liguori > --- > > hw/acpi.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/acpi.c b/hw/acpi.c > index 5eac1ad..2375f20 100644 > --- a/hw/acpi.c > +++ b/hw/acpi.c > @@ -724,27 +724,27 @@ void qemu_system_hot_add_init(void) > 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); > + } > } > > struct acpi_table_header > > > > >