vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries
authorWei Yang <richard.weiyang@gmail.com>
Fri, 19 Feb 2016 16:42:32 +0000 (09:42 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 19 Feb 2016 16:42:32 +0000 (09:42 -0700)
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 <richard.weiyang@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c

index dc5fa9fcadc99f689864363b7464d6de84c4b9ab..20b505f4ec79a3c9bb3ec08f04abd9c22ce301fe 100644 (file)
@@ -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;
     }