All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Amos Kong <akong@redhat.com>
Cc: juli@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-pci: report an error when disable msix
Date: Thu, 22 May 2014 12:11:47 +0300	[thread overview]
Message-ID: <20140522091147.GB30631@redhat.com> (raw)
In-Reply-To: <1400749337-6646-1-git-send-email-akong@redhat.com>

On Thu, May 22, 2014 at 05:02:17PM +0800, Amos Kong wrote:
> QEMU remains 4k memory for PCI BAR, each msix entry takes 16 bytes.
> If user assigns more than 128 vectors, msix resource isn't enough,
> so msix will be disabled.
> 
> This patch addes a note when fail to init exclusive bars for msix.
> 
>  qemu -device virtio-net-pci,netdev=h1,vectors=129,mq=on \
>       -netdev tap,id=h1,queues=8
> 
> Signed-off-by: Amos Kong <akong@redhat.com>

OK I guess, but how about removing the limit instead?

> ---
>  hw/virtio/virtio-pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index ce97514..ea5dcdf 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -976,6 +976,8 @@ static void virtio_pci_device_plugged(DeviceState *d)
>  
>      if (proxy->nvectors &&
>          msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, 1)) {
> +        error_report("%s: unable to init exclusive bars for msix, disable msix",
> +                     __func__);
>          proxy->nvectors = 0;
>      }
>  
> -- 
> 1.9.0

  reply	other threads:[~2014-05-22  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  9:02 [Qemu-devel] [PATCH] virtio-pci: report an error when disable msix Amos Kong
2014-05-22  9:11 ` Michael S. Tsirkin [this message]
2014-05-22 11:40   ` Amos Kong
2014-05-22  9:20 ` Peter Maydell

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=20140522091147.GB30631@redhat.com \
    --to=mst@redhat.com \
    --cc=akong@redhat.com \
    --cc=juli@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.