From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWp36-0005Kq-Ef for qemu-devel@nongnu.org; Fri, 19 Feb 2016 12:41:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWp32-0006rm-BX for qemu-devel@nongnu.org; Fri, 19 Feb 2016 12:41:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWp31-0006qp-Rc for qemu-devel@nongnu.org; Fri, 19 Feb 2016 12:40:56 -0500 From: Alex Williamson Date: Fri, 19 Feb 2016 10:40:52 -0700 Message-ID: <20160219174052.16497.10377.stgit@gimli.home> In-Reply-To: <20160219173708.16497.23357.stgit@gimli.home> References: <20160219173708.16497.23357.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PULL 14/14] vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Wei Yang From: Wei Yang Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries. This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries. Signed-off-by: Wei Yang Signed-off-by: Alex Williamson --- hw/vfio/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index dc5fa9f..20b505f 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -1207,7 +1207,7 @@ static int vfio_msix_early_setup(VFIOPCIDevice *vdev) } if (pread(fd, &ctrl, sizeof(ctrl), - vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) { + vdev->config_offset + pos + PCI_MSIX_FLAGS) != sizeof(ctrl)) { return -errno; }