mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
Userspace is interested in number of supported MSRs even if supplied buffer is too small, as then it can intelligently [re]allocate the buffer and repeat the call instead of doing this blindly. So let's always populate 'out_count'in crosvm_get_msr_index_list() call. Obviously if there is hard error we will not be able to supply a meaningful number, so 0 will be returned, but in case of E2BIG error we can return the real number. Also let's do the same for get_supported_cpuids() and get_emulated_cpuids() calls. BUG=b:111083877 TEST=cargo test -p kvm; cargo test --features=plugin Change-Id: I37a8d719103fac44597b88ddecb6b8af2dd54ac8 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1185293 Reviewed-by: Zach Reizner <zachr@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
crosvm.h |