summary refs log tree commit diff
path: root/crosvm_plugin/crosvm.h
diff options
context:
space:
mode:
authorSlava Malyugin <slavamn@google.com>2018-07-06 09:52:05 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-07-11 18:48:50 -0700
commitd1e391b8d490621974eee8b1d6464eac1f9c1bb3 (patch)
tree6888f52768606e3f5bfc6510203e959f0b0bc89c /crosvm_plugin/crosvm.h
parentcc08cdbd836cb280cebcb5f1d737da58aa3eff07 (diff)
downloadcrosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.tar
crosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.tar.gz
crosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.tar.bz2
crosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.tar.lz
crosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.tar.xz
crosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.tar.zst
crosvm-d1e391b8d490621974eee8b1d6464eac1f9c1bb3.zip
plugin: allow retrieving and setting VCPU events
Add crosvm plugin API to allow fetching and setting VCPU events.

BUG=b:110056268
TEST=cargo test --features plugin -p kvm

Change-Id: Id66230f180f4bdb95bd1850ed050e439083701cc
Reviewed-on: https://chromium-review.googlesource.com/1128045
Commit-Ready: Slava Malyugin <slavamn@chromium.org>
Tested-by: Slava Malyugin <slavamn@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'crosvm_plugin/crosvm.h')
-rw-r--r--crosvm_plugin/crosvm.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/crosvm_plugin/crosvm.h b/crosvm_plugin/crosvm.h
index 42c979a..947a198 100644
--- a/crosvm_plugin/crosvm.h
+++ b/crosvm_plugin/crosvm.h
@@ -47,7 +47,7 @@ extern "C" {
  * do not indicate anything about what version of crosvm is running.
  */
 #define CROSVM_API_MAJOR 0
-#define CROSVM_API_MINOR 13
+#define CROSVM_API_MINOR 15
 #define CROSVM_API_PATCH 0
 
 enum crosvm_address_space {
@@ -525,6 +525,14 @@ int crosvm_vcpu_get_mp_state(struct crosvm_vcpu *,
 int crosvm_vcpu_set_mp_state(struct crosvm_vcpu *,
                              const struct kvm_mp_state *__mp_state);
 
+/* Gets currently pending exceptions, interrupts, NMIs, etc for VCPU. */
+int crosvm_vcpu_get_vcpu_events(struct crosvm_vcpu *,
+                                struct kvm_vcpu_events *);
+
+/* Sets currently pending exceptions, interrupts, NMIs, etc for VCPU. */
+int crosvm_vcpu_set_vcpu_events(struct crosvm_vcpu *,
+                                const struct kvm_vcpu_events *);
+
 #ifdef  __cplusplus
 }
 #endif