diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2018-08-27 11:34:20 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-31 05:22:52 -0700 |
commit | caa2e5a4ac45c5e107b6802db99c158083321bc4 (patch) | |
tree | 2338efb6819d29bba1b3553656c40d40fa8d18d2 /crosvm_plugin/crosvm.h | |
parent | 9dec40e2420d5faf170fea328b331f9e695cf7d9 (diff) | |
download | crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.tar crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.tar.gz crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.tar.bz2 crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.tar.lz crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.tar.xz crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.tar.zst crosvm-caa2e5a4ac45c5e107b6802db99c158083321bc4.zip |
plugin: do not fail crosvm_vcpu_get_msrs() if we failed to fetch some
KVM_GET_MSRS may return less MSRs that were requested; do not fail but instead let callers to know how many were fetched. BUG=None TEST=cargo test --features plugin Change-Id: Ie14a3d38b66bfe34f5279543bea9c6c78423527e Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1192232 Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'crosvm_plugin/crosvm.h')
-rw-r--r-- | crosvm_plugin/crosvm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crosvm_plugin/crosvm.h b/crosvm_plugin/crosvm.h index c2139b3..39c2453 100644 --- a/crosvm_plugin/crosvm.h +++ b/crosvm_plugin/crosvm.h @@ -509,7 +509,8 @@ int crosvm_vcpu_set_xcrs(struct crosvm_vcpu*, const struct kvm_xcrs*); /* Gets the MSRs of the vcpu indicated by the index field of each entry. */ int crosvm_vcpu_get_msrs(struct crosvm_vcpu*, uint32_t __msr_count, - struct kvm_msr_entry *__msr_entries); + struct kvm_msr_entry *__msr_entries, + uint32_t *__out_count); /* Sets the MSRs of the vcpu indicated by the index field of each entry. */ int crosvm_vcpu_set_msrs(struct crosvm_vcpu*, uint32_t __msr_count, const struct kvm_msr_entry *__msr_entries); |