crosvm/hypervisor
Kaiyi Li 2fa09ea4de hypervisor: change VcpuX86_64::interrupt to only accept u8 vector
Under the hood, both AMD [1] and Intel [2] only accept 8 bit vector for event injection, so it's highly likely that all hypervisor implementation to encounter an error when we pass in values greater than 0xff as the vector.

From the source we can tell that KVM rejects any value greater than 0xff, HAXM has some strange unwanted behaviors with invalid vector values. From testing, we can tell WHPX also rejects invalid vector values right away.

[1]: Figure 15-5. EVENTINJ Field in the VMCB of AMD64 Architecture Programmer’s Manual, Volumes 2.
[2]: Table 25-17. Format of the VM-Entry Interruption-Information Field of Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3.

TEST=./tools/dev_container cargo nextest run --workspace --profile=default -E 'package(hypervisor) & binary(hypervisor_virtualization)' --retries 0 --no-capture
BUG=b:334055761

Change-Id: Ied118f0df10e4a1c973b5b26327c24f45064d56c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5602270
Commit-Queue: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Judson Powers <judsonp@google.com>
2024-06-10 18:43:56 +00:00
..
hypervisor_test_macro hypervisor: convenient macro to generate an array from inline assemblies 2024-05-21 19:31:17 +00:00
src hypervisor: change VcpuX86_64::interrupt to only accept u8 vector 2024-06-10 18:43:56 +00:00
tests Long mode test ASM version 2024-06-10 18:38:12 +00:00
Cargo.toml Cargo.toml: avoid "*" versions for external crates 2024-05-22 01:01:42 +00:00
README.md hypervisor/README.md: add qualcomm contacts for gunyah 2023-11-29 19:20:17 +00:00

Hypervisor Support

Multiple hypervisor backends are supported. See Advanced Usage for overriding the default backend.

Hypervisors added to crosvm must meet the following requirements:

  • Hypervisor code must be buildable in crosvm upstream.
    • Within reason, crosvm maintainers will ensure the hypervisor's code continues to build.
  • Hypervisors are not required to be tested upstream.
    • We can't require testing upstream because some hypervisors require specialized hardware.
    • When not tested upstream, the hypervisor's maintainers are expected to test it downstream. If a change to crosvm breaks something downstream, then the hypervisor's maintainers are expected to supply the fix and can't expect a revert of the culprit change to be accepted upstream.

KVM

  • Platforms: Linux
  • Tested upstream: yes

KVM is crosvm's preferred hypervisor for Linux.

WHPX

HAXM

Android Specific

The hypervisors in this section are used as backends of the Android Virtualization Framework.

Geniezone

Gunyah