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: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
		
							parent
							
								
									c89e91a76b
								
							
						
					
					
						commit
						b58b17f744
					
				@ -1207,7 +1207,7 @@ static int vfio_msix_early_setup(VFIOPCIDevice *vdev)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (pread(fd, &ctrl, sizeof(ctrl),
 | 
					    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;
 | 
					        return -errno;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user