crosvm/hypervisor
Pierre-Clément Tosi 8c4df298c8 hypervisor: kvm: aarch64: KvmVcpuRegister: Support any kvm_regs
Turn KvmVcpuRegister into an enum that supports any kvm_regs entry (not
just kvm_regs::regs i.e. user_pt_regs).

Improve the abstraction provided by KvmVcpuRegister through the 2-step
conversion "VcpuRegAArch64 -> KvmVcpuRegister -> u8", which allows more
flexibility when KVM doesn't provide 1-to-1 mappings (CCISDR, SVE, ...)
and when other types (e.g. gdbstub) need to be mapped to KVM_SET_ONE_REG
values.

Introduce the firmware pseudo-register type as a KvmVcpuRegister variant
and use it for KVM_ARM_PSCI_VERSION.

BUG=b:222222882
BUG=chromium:1141812
TEST=tools/dev_container ./tools/run_tests

Change-Id: Id11c427fc48f4b6bef9df607eeb73928aa7f5da7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3785463
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Auto-Submit: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Pierre-Clément Tosi <ptosi@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2022-09-01 14:16:59 +00:00
..
src hypervisor: kvm: aarch64: KvmVcpuRegister: Support any kvm_regs 2022-09-01 14:16:59 +00:00
tests crosvm: resync with downstream after running clippy 2022-08-25 20:45:12 +00:00
Cargo.toml crosvm: replace lazy_static with once_cell 2022-06-21 23:40:55 +00:00