Skip to content

Merge feature/uffd into main #2980

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

Merged
merged 22 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dbc8f7a
vmm: memory::restore doesn't require file
acatangiu Sep 30, 2021
dafbc99
enhance /snapshot/load API
acatangiu Sep 30, 2021
e8bbb3d
add Uffd support for memory snapshots
acatangiu Sep 30, 2021
703a945
update dockerfiles and image tag
dianpopa Mar 18, 2022
4278282
tests: update dependencies
luminitavoicu Mar 7, 2022
cdf59b7
cargo: update licence allow-list
luminitavoicu Mar 8, 2022
5ab5539
uffd: don't send fc's PID to PF handler over UDS
luminitavoicu Apr 4, 2022
5e3c096
uffd: enable EVENT_REMOVE for ballooning
dianpopa Apr 13, 2022
9cc1451
CI: add support for new mem_backend object
dianpopa Mar 21, 2022
7c4cdae
CI: test uffd bad socket path scenarios
dianpopa Mar 21, 2022
e887e23
CI: negative tests for /snapshot/load API
luminitavoicu Mar 29, 2022
de1696e
CI: add an example of uffd handler
dianpopa Mar 21, 2022
ec5159f
CI: compile uffd handler example as a fixture
dianpopa Mar 24, 2022
0e5eee5
add util fn for starting process in screen
dianpopa Mar 24, 2022
3d0c140
CI: integration test for valid uffd scenario
dianpopa Mar 24, 2022
2a0c0d0
temporary change artifact root bucket to dev
luminitavoicu Apr 13, 2022
a335447
CI: add malicious uffd page fault handler
luminitavoicu Apr 18, 2022
d93430b
CI: check old snap/load API for deprecation msg
luminitavoicu Apr 21, 2022
7c29612
docs: update with UFFD details
luminitavoicu Apr 20, 2022
f4f2414
CI: update coverage
luminitavoicu Apr 27, 2022
e699212
uffd: fix container ID
luminitavoicu Apr 28, 2022
bb4dd75
CI: change dev S3 bucket for fetching artifacts
luminitavoicu Apr 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
piggy-backing on `--http-api-max-payload-size`. If left unconfigured it
defaults to the value of `--http-api-max-payload-size`, to provide backwards
compatibility.
- Added optional `mem_backend` body field in `PUT` requests on `/snapshot/load`.
This new parameter is an object that defines the configuration of the backend
responsible for handling memory loading during snapshot restore. The
`mem_backend` parameter contains `backend_type` and `backend_path` required
fields. `backend_type` is an enum that can take either `File` or `Uffd` as
value. Interpretation of `backend_path` field depends on the value of
`backend_type`. If `File`, then the user must provide the path to file that
contains the guest memory to be loaded. Otherwise, if `backend_type` is `Uffd`,
then `backend_path` is the path to a unix domain socket where a custom page
fault handler process is listening and expecting a UFFD to be sent by
Firecracker. The UFFD is used to handle the guest memory page faults in the
separate process.

### Changed

Expand All @@ -25,6 +37,7 @@
- MmdsV2 is now Generally Available.
- MmdsV1 is now deprecated and will be removed in Firecracker v2.0.0.
Use MmdsV2 instead.
- Deprecated `mem_file_path` body field in `PUT` on `/snapshot/load` request.

### Fixed

Expand Down
185 changes: 176 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
allow = [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
"BSD-3-Clause",
"ISC"
]
2 changes: 2 additions & 0 deletions docs/device-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ specification: [firecracker.yaml](./../src/api_server/swagger/firecracker.yaml).
| `InstanceActionInfo` | action_type | O | O | O | O | O |
| `LoadSnapshotParams` | enable_diff_snapshots | O | O | O | O | O |
| | mem_file_path | O | O | O | O | O |
| | mem_backend | O | O | O | O | O |
| | snapshot_path | O | O | O | O | O |
| | resume_vm | O | O | O | O | O |
| `Logger` | level | O | O | O | O | O |
| | log_path | O | O | O | O | O |
| | show_level | O | O | O | O | O |
Expand Down
Binary file added docs/images/uffd_flow1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/uffd_flow2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/uffd_flow3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/uffd_flow4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading