Closed liuw closed 2 years ago
@jinankjain @russell-islam I realize I made a mistake in the first patch. The code should skip the call instead of returning an error. I've reworked the code. Please take a look.
Build kite CI is still failing
That's because the changes dropped the coverage but then there is no new functionality added.
@liuw There is a clippy issue with nohv configuration.
@liuw There is a clippy issue with nohv configuration.
It turns out trying to unify test and non-test configurations requires more work than I have time for right now. I just dropped the last two patches.
@jiangliu @sameo I've merged this PR. It unblocks a large batch of patches on Cloud Hypervisor's side. If you have follow-up comments, I will address them in subsequent PRs.
Summary of the PR
While trying to make Cloud Hypervisor work for KVM and MSHV at the same time, I realize that leaking dependent types is a bad idea. That requires library users to provide different code paths depending on the features.
This PR provides a vfio-ioctls wrapper type which can hold either a KVM DeviceFd or MSHV DeviceFd. Unfortunately these are breaking changes.
Since I'm making breaking changes anyway, I slip in an extra patch to make a DeviceFd optional. This makes this crate useful for people who wants VFIO but have no need for a VM.
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 the summary and max 75 characters for each description line.unsafe
code is properly documented.