summaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 39f826bbeb..69ca46b1af 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -549,3 +549,15 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
return ret;
}
+
+int kvm_has_sync_mmu(void)
+{
+ KVMState *s = kvm_state;
+
+#ifdef KVM_CAP_SYNC_MMU
+ if (kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SYNC_MMU) > 0)
+ return 1;
+#endif
+
+ return 0;
+}