mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
When the RAM size is specified to be exactly 3328 MiB (4096 - 768), there is no memory after the gap; however, the arch_memory_regions code was adding a zero-sized region to the list of guest memory areas to be mapped. This would result in a mmap syscall failure at startup: [ERROR:src/main.rs:1590] The architecture failed to build the vm: failed to set up guest memory: failed to map guest memory: mmap system call failed: Invalid argument (os error 22) Fix the off-by-one error when checking whether the address of the end of guest memory is within 4 GB so that the > 4GB branch is not taken with mem=3328. BUG=chromium:1129547 TEST=crosvm run --mem=3328 vm_kernel TEST=cargo test -p x86_64 Change-Id: I66cd66c98d690b42b2e1d97312528bb0d4830e76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2417004 Reviewed-by: Ram Muthiah <rammuthiah@google.com> Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |