-
Notifications
You must be signed in to change notification settings - Fork 66
vhost-device-gpu: Expose more options as CLI flags #797
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
34e9f4b
to
33d97c0
Compare
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.
Minor comments, will take a longer look tomorrow
Thanks for the PR, just one small thing - this PR is below the existing code coverage, can you add enough tests to make it up to the previous code coverage? |
f4c67cc
to
4787a30
Compare
I added more tests:
Now the coverage should be 88.00% (up from 87.80% without this PR). |
956ce52
to
679dedd
Compare
@mtjhrc can you check musl CI, something is failing: https://buildkite.com/rust-vmm/vhost-device-ci/builds/2957#01948413-0e80-4786-b583-62f6266fc826 Can you also rebase on latest main? Thanks, |
The name of the project/backend is "virglrenderer", the dash was added by clap. Adding the dash seems confusing to the user, the old name is kept as a hidden alias. Signed-off-by: Matej Hrica <[email protected]>
Remove capset constants definitions in protocol.rs, these are unecessary, because we use the constants defined in the Rutabaga crate. Signed-off-by: Matej Hrica <[email protected]>
f268f5e
to
e99832e
Compare
Do not build the GPU device for musl targets. To compile it properly would require setting up a build enivorment with all the native dependencies compiled with musl as well. Signed-off-by: Matej Hrica <[email protected]>
Remove the workaround to disable compiling the code on non-gnu targets. (the CI now doesn't attempt compiling on musl) Signed-off-by: Matej Hrica <[email protected]>
This was an oversight - for the user to be able to use the crate as a library, the start_backend needs to be part of the public API. Signed-off-by: Matej Hrica <[email protected]>
Add command line arguments for configuring which capsets and features are enabled when configuring Rutabaga. Since we now specify the capsets explicitly we can drop the MAX_NUM_CAPSETS constant and fix the TODO. The curently exposed capsets for virglrenderer are: virgl and virgl2. For gfxstream they are: gfxstream-vulkan and gfxstream-gles. Signed-off-by: Matej Hrica <[email protected]>
Update the README to better reflect the limitations of not supporting blob resources and remove the note about hardcoded number of capsets that has been fixed. Signed-off-by: Matej Hrica <[email protected]>
As per @epilys suggestion, I excluded the gpu from building with musl in the CI - seems like much nicer solution then then conditional compilation disabling everything 😄 |
Summary of the PR
This PR adds command line arguments to explicitly configure which capsets to enable and flags to pass to the
Rutabaga
backend. By specifying the individual capsets explicitly this also fixes a TODO, which hard-coded the number of enabled capsets.Not all possible capsets from the underlying backends are currently exposed, this exposes only those that at least partially work without blob resources. Previously all capsets, were implicitly enabled (the default in
RutabagaBuilder
).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).
unsafe
code is properly documented.