aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 11034df27f..9fb295ce63 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -654,9 +654,9 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
int kvm_has_sync_mmu(void)
{
+#ifdef KVM_CAP_SYNC_MMU
KVMState *s = kvm_state;
-#ifdef KVM_CAP_SYNC_MMU
if (kvm_ioctl(s, KVM_CHECK_EXTENSION, KVM_CAP_SYNC_MMU) > 0)
return 1;
#endif