From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZ5d7-0002BY-FR for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:43:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZ5d5-0002B6-B5 for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:43:32 -0500 Received: from [199.232.76.173] (port=45213 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZ5d5-0002B3-6e for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:43:31 -0500 Received: from mx2.redhat.com ([66.187.237.31]:40776) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZ5d4-0005nC-5a for qemu-devel@nongnu.org; Mon, 16 Feb 2009 10:43:31 -0500 Date: Mon, 16 Feb 2009 12:42:57 -0300 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [PATCH] Generate PCI hotplug interrupt only if corespondent EN bit is set. Message-ID: <20090216154257.GB5837@amt.cnet> References: <20090212081036.29410.74172.stgit@dhcp-1-237.tlv.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090212081036.29410.74172.stgit@dhcp-1-237.tlv.redhat.com> 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, Anthony Liguori ACK On Thu, Feb 12, 2009 at 10:10:36AM +0200, Gleb Natapov wrote: > Signed-off-by: Gleb Natapov > --- > > 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 > >