Received: from eggs.gnu.org ([2001:4830:134:3::10]:45811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpCKK-00051d-JD for qemu-devel@nongnu.org; Wed, 28 Sep 2016 06:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpCKF-0006eC-K8 for qemu-devel@nongnu.org; Wed, 28 Sep 2016 06:43:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpCKF-0006dy-ES for qemu-devel@nongnu.org; Wed, 28 Sep 2016 06:42:55 -0400 Date: Wed, 28 Sep 2016 18:42:50 +0800 From: Peter Xu Message-ID: <20160928104250.GF11134@pxdev.xzpeter.org> References: <1475056100-8803-1-git-send-email-peterx@redhat.com> <9b070678-e186-d199-aa0f-6f246c7844f0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9b070678-e186-d199-aa0f-6f246c7844f0@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH] hw/misc/edu: support MSI interrupt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, jslaby@suse.cz On Wed, Sep 28, 2016 at 11:59:19AM +0200, Paolo Bonzini wrote: [...] > > @@ -87,6 +87,10 @@ An IRQ is generated when written to the interrupt raise register. The value > > appears in interrupt status register when the interrupt is raised and has to > > be written to the interrupt acknowledge register to lower it. > > > > +The device supports both pin and MSI interrupt. By default, pin-based > > +interrupt is used. Even if we are with MSI interrupt, we still need to > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > Even if the driver is disabling INTx and only using MSI, it still needs > to... Will fix. [...] > > @@ -341,6 +351,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error **errp) > > edu, QEMU_THREAD_JOINABLE); > > > > pci_config_set_interrupt_pin(pci_conf, 1); > > + msi_init(pdev, 0, 1, false, false, errp); > > msi_init(pdev, 0, 1, false, false, &local_err); > if (local_err) { > error_propagate(errp, local_err); > return; > } Could I ask why we need the local_err? > > But you probably want to enable 64-bit MSI too (changing the first > "false" to "true"). Exactly. :) > > Otherwise looks great! Thanks for reviewing! -- peterx