Skip to content
  • Peter Xu's avatar
    pci: introduce struct pci_dev · 4d6cefa9
    Peter Xu authored
    To extend current PCI framework, we need a per-device struct to store
    device specific information. Time to have a pci_dev struct. Most of the
    current PCI APIs are converted to use this pci_dev object as the first
    argument. Currently it only contains one field "bdf", which is the bdf
    of current device.
    For a few APIs like pci_config_*() ops or pci_find_dev(), I kept the old
    interface (use PCI BDF value rather than "struct pci_dev") since they
    can be used in a open context that without any specific PCI device.
    Reviewed-by: default avatarAndrew Jones <>
    Signed-off-by: default avatarPeter Xu <>
    Signed-off-by: default avatarPaolo Bonzini <>