Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework PCI capabilities #14

Closed
tmakatos opened this issue Nov 13, 2019 · 5 comments
Closed

rework PCI capabilities #14

tmakatos opened this issue Nov 13, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@tmakatos
Copy link
Member

Currently handling of standard PCI capabilities is left to the device implementation, however that shouldn't be the case as it's the same for all kinds of devices.

@tmakatos tmakatos added the enhancement New feature or request label Nov 13, 2019
@tmakatos tmakatos self-assigned this Nov 13, 2019
@tmakatos
Copy link
Member Author

tmakatos commented Nov 13, 2019

Ideally we'd like to have a flexible array member at the end of lm_dev_info_t for each capability, where each element of the array would be a union of all possible capability types. However I don't think this is possible as there can be vendor-specific capabillities of unknown size. Therefore the more realistic option would be to introduce a function e.g. lm_pci_cap_add that adds a capability to an existing context. @franciozzy thoughts?

@tmakatos
Copy link
Member Author

Actually I think the current implementation can work, either way the user will be maintaining a pointer to their capability, so all we need to do is to replace the fn field with a buf field in lm_cap_t.

@tmakatos
Copy link
Member Author

I'm looking at the PCI specification and I'm not sure how much of it we can handle in the library we need to go through the spec very thoroughly.

@tmakatos
Copy link
Member Author

I've moved handling of PCI capabilities into MUSER in my vfio-over-socket branch. Capabilities are still maintained in a list which I think need to be replaced by keeping them in a buffer.

@tmakatos
Copy link
Member Author

fixed in vfio-user branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant