-
Notifications
You must be signed in to change notification settings - Fork 1.9k
allow specifying custom cpu template inline in config json #5175
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
allow specifying custom cpu template inline in config json #5175
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5175 +/- ##
==========================================
+ Coverage 82.87% 82.93% +0.05%
==========================================
Files 250 250
Lines 26932 26936 +4
==========================================
+ Hits 22321 22339 +18
+ Misses 4611 4597 -14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
If I remember correctly, the reason why we made such a decision is that we anticipated users don't want to have the very long CPU template definition for each machine configuration (i.e. if users have 10 different machine configs with the same CPU template, when they want to change a single bit of the CPU template, they will have to change all the machine config JSON files). So the design is not so silly. I believe accepting both must be better though :D
When starting firecracker without the API server and configuring it through a config files, specifying a custom cpu template requires writing this cpu template into a separate json file, and then passing the path to this separate json file in the config json file. This is a bit silly, since everything is just json. So additionally allow just directly specifying the custom cpu template inside the config file. Signed-off-by: Patrick Roy <[email protected]>
a8b367c
to
b7647ba
Compare
Ah, that's fair - my usecase was more than I had a single CPU template that only needed to modify a single cpuid leaf, and so it was easier to just have it straight in there. What you're saying makes sense though, I shouldn't have judged so soon 😔 |
When starting firecracker without the API server and configuring it through a config files, specifying a custom cpu template requires writing this cpu template into a separate json file, and then passing the path to this separate json file in the config json file. This is a bit silly, since everything is just json. So additionally allow just directly specifying the custom cpu template inside the config file.
Changes
...
Reason
...
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.