summary refs log tree commit diff
path: root/crosvm_plugin/crosvm.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2018-05-16 11:03:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-18 20:08:21 -0700
commitbb6580167937475e2d54e39bbf4babd402202a08 (patch)
treec35bd28c8e9194f5d00fd46763f6b21ecefa21c3 /crosvm_plugin/crosvm.h
parentf0656b661c97281f56d91e24224334b7e4d6ebc4 (diff)
downloadcrosvm-bb6580167937475e2d54e39bbf4babd402202a08.tar
crosvm-bb6580167937475e2d54e39bbf4babd402202a08.tar.gz
crosvm-bb6580167937475e2d54e39bbf4babd402202a08.tar.bz2
crosvm-bb6580167937475e2d54e39bbf4babd402202a08.tar.lz
crosvm-bb6580167937475e2d54e39bbf4babd402202a08.tar.xz
crosvm-bb6580167937475e2d54e39bbf4babd402202a08.tar.zst
crosvm-bb6580167937475e2d54e39bbf4babd402202a08.zip
plugin: allow retrieving and setting XCR VCPU states
Add crossvm plugin API to allow fetching and setting XCRs for VCPU.

BUG=b:79692549
TEST=cargo test -p kvm

Change-Id: I2a988279c08051a8d8865efc1e60f9692fa26272
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1062646
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'crosvm_plugin/crosvm.h')
-rw-r--r--crosvm_plugin/crosvm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/crosvm_plugin/crosvm.h b/crosvm_plugin/crosvm.h
index c7589e2..42c979a 100644
--- a/crosvm_plugin/crosvm.h
+++ b/crosvm_plugin/crosvm.h
@@ -495,6 +495,11 @@ int crosvm_vcpu_get_debugregs(struct crosvm_vcpu*, struct kvm_debugregs*);
 /* Sets the state of the vcpu's debug registers */
 int crosvm_vcpu_set_debugregs(struct crosvm_vcpu*, const struct kvm_debugregs*);
 
+/* Gets the state of the vcpu's xcr registers. */
+int crosvm_vcpu_get_xcrs(struct crosvm_vcpu*, struct kvm_xcrs*);
+/* Sets the state of the vcpu's xcr registers. */
+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);