crosvm/hypervisor
Daniel Verkamp a48485090f aarch64: do not accept 0 as a valid address size
The newly-added KVM_CHECK_EXTENSION call to retrieve
KVM_CAP_ARM_VM_IPA_SIZE was checking for errors by looking for return
values less than 0, but KVM_CHECK_EXTENSION returns 0 for unknown
extensions (e.g. on older kernels before this extension was introduced).

Treat 0 as unsupported as well so the default 40-bit size is returned in
this case.

BUG=b:215174283
BUG=b:210727578
TEST=Boot crosvm on kevin (arm device with 4.4 host kernel)

Fixes: 891ea3e88a ("aarch64: limit high MMIO addresses to VM phys addr range")
Change-Id: I19a3ae00862882c030c1e776cb3ca10edeffd339
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3399344
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-01-18 21:30:32 +00:00
..
src aarch64: do not accept 0 as a valid address size 2022-01-18 21:30:32 +00:00
Cargo.toml enumn: switch to upstream crates.io version 2021-11-15 21:03:25 +00:00