From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnOtW-00065o-2U for qemu-devel@nongnu.org; Thu, 22 May 2014 05:02:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnOtO-0000m8-Je for qemu-devel@nongnu.org; Thu, 22 May 2014 05:02:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnOtO-0000lg-BJ for qemu-devel@nongnu.org; Thu, 22 May 2014 05:02:26 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4M92Ppu030371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 22 May 2014 05:02:25 -0400 From: Amos Kong Date: Thu, 22 May 2014 17:02:17 +0800 Message-Id: <1400749337-6646-1-git-send-email-akong@redhat.com> Subject: [Qemu-devel] [PATCH] virtio-pci: report an error when disable msix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: juli@redhat.com, mst@redhat.com 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 --- 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