crosvm/swap
David Stevens 34d7f69f27 swap: fix for VMs with highmem
Handle the case where VM memory is split up into multiple regions by
taking into account the region end when swapping out memory. Also rename
SwapFile.len to SwapFile.num_pages to make the units clear.

BUG=b:215093219
TEST=cargo test --package base
TEST=enable/disable swap on VM with >4GB of memory

Change-Id: I8dcdadd39c3f7cbd22c1c042498153966a1a0431
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4040653
Commit-Queue: David Stevens <stevensd@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Shin Kawamura <kawasin@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2022-11-22 02:08:53 +00:00
..
src swap: fix for VMs with highmem 2022-11-22 02:08:53 +00:00
tests swap: add disable command to vmm-swap 2022-11-18 01:23:45 +00:00
Cargo.toml swap: log page fault event 2022-11-17 02:48:04 +00:00