-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support SR-IOV #21
Support SR-IOV #21
Conversation
c7f6817
to
486644c
Compare
1696947
to
1acfeb5
Compare
checkpatch reports a false positive here. Ignore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick, otherwise looks good to me.
@@ -436,6 +438,16 @@ static int vfio_get_device_fd(struct iommu_ctx *ctx, const char *bdf) | |||
if (gfd < 0) | |||
return -1; | |||
|
|||
vf_token = getenv("VFTOKEN"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed in the last review, but can we have this VFTOKEN environment variable guide documentation to somewhere like vfio_pci_open
API? This API does not totally represent the vfio itself due to it might be about iommufd, it should be documented somewhere for users to give their own VFTOKEN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed!
Add a set of utility functions operating on sysfs to deal with various aspects of SR-IOV Virtual Functions and their Physical Functions. Signed-off-by: Klaus Jensen <[email protected]>
If the physical function is bound to vfio-pci, it (and its VFs) must be opened using a VF "token". Allow this to be passed in a VFTOKEN environment variable. Signed-off-by: Klaus Jensen <[email protected]>
Add support for Virtualization Management through a set of helpers. Signed-off-by: Klaus Jensen <[email protected]>
Update CHANGELOG.md with new functionality. Signed-off-by: Klaus Jensen <[email protected]>
Add support for SR-IOV within vfio (
vf_token
and so on). Also add a set of helpers invfn/nvme/ctrl.h
to assist with configuring secondary controllers (that may or may not be SR-IOV VFs).This builds on the patches from PR #20.