From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnP3d-0001IB-5p for qemu-devel@nongnu.org; Thu, 22 May 2014 05:13:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnP3V-0004QC-MJ for qemu-devel@nongnu.org; Thu, 22 May 2014 05:13:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnP3V-0004Q7-Dp for qemu-devel@nongnu.org; Thu, 22 May 2014 05:12:53 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4M9Cq1c028735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 22 May 2014 05:12:52 -0400 Date: Thu, 22 May 2014 12:11:47 +0300 From: "Michael S. Tsirkin" Message-ID: <20140522091147.GB30631@redhat.com> References: <1400749337-6646-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1400749337-6646-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH] virtio-pci: report an error when disable msix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: juli@redhat.com, qemu-devel@nongnu.org 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 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