vfio-pci: Enable PCIe extended capabilities on v1
Even PCIe 1.x had extended config space. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
323a72d83c
commit
5641ade41f
@ -985,12 +985,12 @@ static int vfio_cap_len(struct vfio_pci_device *vdev, u8 cap, u8 pos)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return pcibios_err_to_errno(ret);
|
return pcibios_err_to_errno(ret);
|
||||||
|
|
||||||
|
vdev->extended_caps = true;
|
||||||
|
|
||||||
if ((word & PCI_EXP_FLAGS_VERS) == 1)
|
if ((word & PCI_EXP_FLAGS_VERS) == 1)
|
||||||
return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1;
|
return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1;
|
||||||
else {
|
else
|
||||||
vdev->extended_caps = true;
|
|
||||||
return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2;
|
return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2;
|
||||||
}
|
|
||||||
case PCI_CAP_ID_HT:
|
case PCI_CAP_ID_HT:
|
||||||
ret = pci_read_config_byte(pdev, pos + 3, &byte);
|
ret = pci_read_config_byte(pdev, pos + 3, &byte);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user