summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index b8ffe546c..15ec38e63 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -61,6 +61,7 @@ struct KVMState
int coalesced_mmio;
int broken_set_mem_region;
int migration_log;
+ int vcpu_events;
#ifdef KVM_CAP_SET_GUEST_DEBUG
struct kvm_sw_breakpoint_head kvm_sw_breakpoints;
#endif
@@ -479,6 +480,11 @@ int kvm_init(int smp_cpus)
}
#endif
+ s->vcpu_events = 0;
+#ifdef KVM_CAP_VCPU_EVENTS
+ s->vcpu_events = kvm_check_extension(s, KVM_CAP_VCPU_EVENTS);
+#endif
+
ret = kvm_arch_init(s, smp_cpus);
if (ret < 0)
goto err;
@@ -868,6 +874,11 @@ int kvm_has_sync_mmu(void)
#endif
}
+int kvm_has_vcpu_events(void)
+{
+ return kvm_state->vcpu_events;
+}
+
void kvm_setup_guest_memory(void *start, size_t size)
{
if (!kvm_has_sync_mmu()) {