-
Notifications
You must be signed in to change notification settings - Fork 33
vfio-ioctls: Add support for vfio cdev and iommufd #127
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
Conversation
425f6a2 to
72b4842
Compare
|
@up2wing You might be interested. Please take a look. Thank you. |
Cool, thx for the notify. I'll see this ASAP. |
72b4842 to
f3f6f7b
Compare
f3f6f7b to
a4d6608
Compare
|
@up2wing Thank you for the thorough review. All comments are addressed. Please take another look. Also, inspired by one of your comments, I fixed a similar ioctl mutability issue from cloud-hypervisor/iommufd#2. |
a4d6608 to
7f4a7ab
Compare
The new ioctls are also put behind a feature flag `vfio_cdev`. Signed-off-by: Bo Chen <bchen@crusoe.ai>
7f4a7ab to
63a1f92
Compare
up2wing
left a comment
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.
There is only one spelling issue left, the code LGTM.
This patch introduces `pub struct VfioIommufd`, a safe wrapper for VFIO devices backed by the cdev interface and iommufd. This struct implements the `VfioOps` trait to provide APIs for userspace drivers (e.g., a VMM). Additionally, this patch extends the `VfioDevice` constructor to support creating instances using the new VfioIommufd backend. Fixes: rust-vmm#92 Signed-off-by: Bo Chen <bchen@crusoe.ai>
63a1f92 to
d058300
Compare
|
@liuw @rbradford Can you please take a look? Thank you. |
|
The only failure on |
Summary of the PR
This patch introduces
pub struct VfioIommufd, a safe wrapper for VFIOdevices backed by the cdev interface and iommufd. This struct implements
the
VfioOpstrait to provide APIs for userspace drivers (e.g., a VMM).Additionally, this patch extends the
VfioDeviceconstructor to supportcreating instances using the new
VfioIommufdbackend.Of course, new vfio ioctls are introduced to support for the cdev interface.
All changes are put behind the feature flag
vfio_cdev.Fixes: #92
Signed-off-by: Bo Chen bchen@crusoe.ai
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafecode is properly documented.