-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore: update to vm-memory 0.13.1 #4175
chore: update to vm-memory 0.13.1 #4175
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4175 +/- ##
==========================================
- Coverage 83.00% 82.97% -0.04%
==========================================
Files 222 221 -1
Lines 28642 28505 -137
==========================================
- Hits 23775 23652 -123
+ Misses 4867 4853 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
9a521d3
to
3a35f20
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.
The code looks good to me. Just commented on a couple minor typos.
6f37e97
to
f58cd48
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.
Just a minor comment about a comment and we're good to go :)
6eeab86
to
d01913c
Compare
As always, the linux-loader update has to piggy-back off of the vm-memory update. This allows us to remove the {Read,Write}Volatile traits, instead using the ones from upstream. Also eliminates some more usages of now-deprecated vm-memory functions that I missed when I first wrote the volatile-io patch for firecracker. Signed-off-by: Patrick Roy <[email protected]>
Make all Queue functions generic over their GuestMemory parameter. This allows kani to mock out rust-vmm's "multi-region support" guest memory implementation with a simpler one that only supports a single region, allowing significant harness speedups. Signed-off-by: Patrick Roy <[email protected]>
GuestMemoryMmap supports arbitrary guest memory regions, and thus needs logic that deals with memory accesses spanning multiple regions. Our kani harnesses only use a single region, and the logic for supporting multiple regions causes kani to severely degrade in performance. Signed-off-by: Patrick Roy <[email protected]>
Calls to set_avail_event tend to cause memory to grow unboundedly during verification. The function writes to the `avail_event` of the virtio queue, which is not read from by the device. It is only intended to be used by guest. Therefore, it does not affect any device functionality (e.g. its only call site, try_enable_notification, will behave independently of what value was written here). Thus we can stub it out with a no-op. Note that we have a separate harness for set_avail_event, to ensure the function itself is sound. Signed-off-by: Patrick Roy <[email protected]>
m6a.metal has significantly more memory, and is also slightly faster. Signed-off-by: Patrick Roy <[email protected]>
To get the runtime of the harnesses back below 15 minutes. This reduction does not loose any generality, as the only real distinction of cases here is "0, 1 or 2 buffers". Anything above that is just nice-to-have. Signed-off-by: Patrick Roy <[email protected]>
The --enable-stubbing option is deprecated in favor of -Z stubbing. Signed-off-by: Patrick Roy <[email protected]>
Using dirty bitmap tracking will cause verification performance to drastically decrease, as it involves non-trivial arithmetic on arbitrary values. Signed-off-by: Patrick Roy <[email protected]>
Kani, running using nightly rustc, was warning about this comment. Fix it to resolve the warning during verification, to get slightly cleaner logs. Signed-off-by: Patrick Roy <[email protected]>
0aad9f6
to
864039b
Compare
As always, the linux-loader update has to biggy-back off of the vm-memory update. This allows us to remove the {Read,Write}Volatile traits, instead using the ones from upstream.
Also eliminates some more usages of now-deprecated vm-memory functions that I missed when I first wrote the volatile-io patch for firecracker.
Lastly, this PR also includes a lot of kani performance tweaking that became necessary with the new vm-memory update for some 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
CHANGELOG.md
.TODO
s link to an issue.rust-vmm
.