[SH] use UFFDIO_COPY to resolve UFFD faults#5734
Open
kalyazin wants to merge 4 commits intofirecracker-microvm:feature/secret-hidingfrom
Open
[SH] use UFFDIO_COPY to resolve UFFD faults#5734kalyazin wants to merge 4 commits intofirecracker-microvm:feature/secret-hidingfrom
kalyazin wants to merge 4 commits intofirecracker-microvm:feature/secret-hidingfrom
Conversation
This is because guest_memfd now supports both modes. We still need minor handling in case prepopulation logic adds a page in the page cache and the VMM accesses it later via user mappings. Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
Now that guest_memfd has support for major faults, we can resolve all on-demand user mapping faults with UFFDIO_COPY. Remove the code that uses memcpy memory population. Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
With adding major fault support in guest_memfd, when a major fault is generated, no page is added in the page cache by the kernel. It means that proactive population with write() will succeed for the entire region but possibly one page (kvmclock on x86). We just need to call UFFDIO_CONTINUE in response to such a major fault because we already populated the faulting page via write() earlier. Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
This is because when upgrading the guest kernel from 6.1.155 to 6.1.163, /sys/devices/system/cpu/cpu?/cache/* files disappeared. Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/secret-hiding #5734 +/- ##
=========================================================
- Coverage 82.04% 82.00% -0.04%
=========================================================
Files 277 277
Lines 30092 30093 +1
=========================================================
- Hits 24688 24677 -11
- Misses 5404 5416 +12
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
RegisterMode::MISSINGin FirecrackerUFFDIO_COPYtest_cache_topologytemporarily on ARM due to changes in guest cache topology sysfs filesReason
UFFDIO_CONTINUEtoUFFDIO_COPYfor handling major faultsLicense 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 checkbuild --allto verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyleto 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.