aboutsummaryrefslogtreecommitdiff
path: root/lib/pci.h
AgeCommit message (Collapse)AuthorFilesLines
2021-01-20support extended capabilities (#226)John Levon1-2/+8
Provide initial support for extended capabilities, and implement handlers for the Device Serial Number and Vendor-Specific capabilities. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-01-20re-work API for adding capabilities (#200)John Levon1-0/+12
Allow to add capabilities individually, including extended capabilities, and those to be handled via the region callback. As a side effect, rework config space accesses to handle reads that straddle capabilities and non-standard areas and use callbacks as needed. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2021-01-07re-work access handling (#220)John Levon1-11/+0
Various cleanups and fixes to handling of region accesses, including: - there should be no reason for us to split accesses into 1/2/4/8 byte accesses: in general, the client will have already be doing that, and if not, there's no particular reason we should be the ones to split up such larger accesses. - use a callback for PCI config space reads and writes if one is provided (needs more work for capabilities) Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2021-01-04move PCI-specific code to pci.c (#219)John Levon1-0/+56
It's still pretty entangled, but move the bulk of the non-cap PCI code over to pci.c. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2020-11-24clean up headersJohn Levon1-204/+0
Introduce include/ dir for public headers, and clean up include guards etc.
2019-11-02Fix various guard issuesFelipe Franciosi1-1/+1
Some guards were missing, others were misaligned. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-11-02Fix various format issuesFelipe Franciosi1-1/+0
Remove various spurious whitespaces and empty lines. Some other alignment issues, too. Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
2019-09-05typedef lm_pci_config_space_t when defining structThanos Makatos1-3/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05move stuff unrelated to pure PCIThanos Makatos1-93/+0
Having half of the LM_XXX stuff in pci.h makes it harder to understand the data structures and functions in the muser header file. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05muser, libmuser: support vfio sparse mmap capabilitySwapnil Ingle1-0/+11
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2019-09-05move device mmap to per-region callbacksThanos Makatos1-0/+3
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05move region callbacks in region_infoThanos Makatos1-3/+7
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05rename PCI config space sizes to match the ones from pci_regs.hThanos Makatos1-5/+8
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
2019-09-05remove generic read/write callbacks, libmuser must use per-region callbacksThanos Makatos1-0/+1
2019-09-05Initial commitFelipe Franciosi1-0/+276