From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAwFB-0001cn-OE for qemu-devel@nongnu.org; Fri, 03 Jul 2015 04:22:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAwF6-000208-K6 for qemu-devel@nongnu.org; Fri, 03 Jul 2015 04:22:45 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:33559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAwF6-000200-Dh for qemu-devel@nongnu.org; Fri, 03 Jul 2015 04:22:40 -0400 Message-ID: <55964648.8060606@ilande.co.uk> Date: Fri, 03 Jul 2015 09:22:32 +0100 From: Mark Cave-Ayland MIME-Version: 1.0 References: <1432067391-19834-1-git-send-email-rth@twiddle.net> In-Reply-To: <1432067391-19834-1-git-send-email-rth@twiddle.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mst@redhat.com On 19/05/15 21:29, Richard Henderson wrote: > And do not issue an error_report in that case. > > Signed-off-by: Richard Henderson > --- > hw/virtio/virtio-pci.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > -- > > This seems to be about the only sane way to test the value of > msi_supported from here. Thoughts? > > > r~ > > > > diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c > index 867c9d1..6763872 100644 > --- a/hw/virtio/virtio-pci.c > +++ b/hw/virtio/virtio-pci.c > @@ -934,11 +934,16 @@ static void virtio_pci_device_plugged(DeviceState *d) > pci_set_word(config + PCI_SUBSYSTEM_ID, virtio_bus_get_vdev_id(bus)); > config[PCI_INTERRUPT_PIN] = 1; > > - if (proxy->nvectors && > - msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) { > - error_report("unable to init msix vectors to %" PRIu32, > - proxy->nvectors); > - proxy->nvectors = 0; > + if (proxy->nvectors) { > + int err = msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1); > + if (err) { > + /* Notice when a system that supports MSIx can't initialize it. */ > + if (err != -ENOTSUP) { > + error_report("unable to init msix vectors to %" PRIu32, > + proxy->nvectors); > + } > + proxy->nvectors = 0; > + } > } > > proxy->pci_dev.config_write = virtio_write_config; > Ping? Any chance of getting this applied for 2.4 since it's something that I do get emails about for SPARC64? ATB, Mark.