From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37341 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtI4F-0001Fu-2P for qemu-devel@nongnu.org; Wed, 08 Sep 2010 06:40:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtI43-0001Dx-GP for qemu-devel@nongnu.org; Wed, 08 Sep 2010 06:39:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63484) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtI43-0001Dp-8t for qemu-devel@nongnu.org; Wed, 08 Sep 2010 06:39:39 -0400 Date: Wed, 8 Sep 2010 13:33:37 +0300 From: "Michael S. Tsirkin" Message-ID: <20100908103337.GH23051@redhat.com> References: <26ae0d1004af68fb5ec5f7b00823ec6a623a0111.1283931134.git.yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26ae0d1004af68fb5ec5f7b00823ec6a623a0111.1283931134.git.yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH v2 9/9] msix: clear not only INTA, but all INTx when MSI-X is enabled. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: skandasa@cisco.com, adhyas@gmail.com, etmartin@cisco.com, qemu-devel@nongnu.org, wexu2@cisco.com On Wed, Sep 08, 2010 at 04:39:42PM +0900, Isaku Yamahata wrote: > clear not only INTA, but all INTx when MSI-X is enabled. > > Signed-off-by: Isaku Yamahata Nod. This makes sense. > --- > hw/msix.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/hw/msix.c b/hw/msix.c > index 7ce63eb..b202ff7 100644 > --- a/hw/msix.c > +++ b/hw/msix.c > @@ -158,6 +158,7 @@ void msix_write_config(PCIDevice *dev, uint32_t addr, > { > unsigned enable_pos = dev->msix_cap + MSIX_CONTROL_OFFSET; > int vector; > + int i; > > if (!range_covers_byte(addr, len, enable_pos)) { > return; > @@ -167,7 +168,9 @@ void msix_write_config(PCIDevice *dev, uint32_t addr, > return; > } > > - qemu_set_irq(dev->irq[0], 0); > + for (i = 0; i < PCI_NUM_PINS; ++i) { > + qemu_set_irq(dev->irq[i], 0); > + } > > if (msix_function_masked(dev)) { > return; > -- > 1.7.1.1