From d1e391b8d490621974eee8b1d6464eac1f9c1bb3 Mon Sep 17 00:00:00 2001 From: Slava Malyugin Date: Fri, 6 Jul 2018 09:52:05 -0700 Subject: 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 Tested-by: Slava Malyugin Reviewed-by: Zach Reizner --- crosvm_plugin/crosvm.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crosvm_plugin/crosvm.h') 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 -- cgit 1.4.1