Commit b58b17f7 authored by Wei Yang's avatar Wei Yang Committed by Alex Williamson
Browse files

vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries



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: default avatarWei Yang <richard.weiyang@gmail.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent c89e91a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }