From: "Michael S. Tsirkin" <mst@redhat.com>
To: Richard Henderson <rth@twiddle.net>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all
Date: Wed, 20 May 2015 11:59:14 +0200 [thread overview]
Message-ID: <20150520115838-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1432067391-19834-1-git-send-email-rth@twiddle.net>
On Tue, May 19, 2015 at 01:29:51PM -0700, Richard Henderson wrote:
> And do not issue an error_report in that case.
>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> 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~
Can you please include the qemu command-line that triggers the error
in the commit log?
>
>
> 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;
> --
> 2.1.0
next prev parent reply other threads:[~2015-05-20 9:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 15:54 [Qemu-devel] virtio-pci msix error Richard Henderson
2015-05-19 19:16 ` Michael S. Tsirkin
2015-05-19 20:11 ` Peter Maydell
2015-05-19 20:29 ` [Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all Richard Henderson
2015-05-20 9:59 ` Michael S. Tsirkin [this message]
2015-05-20 15:10 ` Richard Henderson
2015-05-21 18:51 ` Mark Cave-Ayland
2015-07-03 8:22 ` Mark Cave-Ayland
2015-07-06 10:38 ` Peter Maydell
2015-09-27 14:40 ` Peter Maydell
2015-10-26 9:44 ` Mark Cave-Ayland
2015-10-26 10:03 ` Michael S. Tsirkin
2015-10-26 10:09 ` Mark Cave-Ayland
2015-10-26 10:14 ` Peter Maydell
2015-10-26 10:29 ` Michael S. Tsirkin
2015-10-26 10:47 ` Mark Cave-Ayland
2015-10-26 11:08 ` Michael S. Tsirkin
2015-05-20 9:58 ` [Qemu-devel] virtio-pci msix error Michael S. Tsirkin
2015-05-20 10:41 ` Peter Maydell
2015-05-20 11:55 ` Fam Zheng
2015-05-20 12:10 ` Peter Maydell
2015-06-13 15:06 ` Mark Cave-Ayland
2015-07-03 8:13 ` Mark Cave-Ayland
2015-07-03 8:16 ` Peter Maydell
2015-07-03 8:19 ` Mark Cave-Ayland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150520115838-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).