From: Glauber Costa <[email protected]>

they have it, and it does the same as we do.

Signed-off-by: Glauber Costa <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/kvm-all.c b/kvm-all.c
index c62b0e7..794ac2c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -864,6 +864,8 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...)
     return ret;
 }
 
+#endif
+
 int kvm_has_sync_mmu(void)
 {
 #ifdef KVM_CAP_SYNC_MMU
@@ -875,6 +877,7 @@ int kvm_has_sync_mmu(void)
 #endif
 }
 
+#ifdef KVM_UPSTREAM
 void kvm_setup_guest_memory(void *start, size_t size)
 {
     if (!kvm_has_sync_mmu()) {
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 231bb63..967ece5 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1091,15 +1091,6 @@ int kvm_pit_in_kernel(kvm_context_t kvm)
     return kvm->pit_in_kernel;
 }
 
-int kvm_has_sync_mmu(void)
-{
-    int r = 0;
-#ifdef KVM_CAP_SYNC_MMU
-    r = kvm_ioctl(kvm_state, KVM_CHECK_EXTENSION, KVM_CAP_SYNC_MMU);
-#endif
-    return r;
-}
-
 int kvm_inject_nmi(kvm_vcpu_context_t vcpu)
 {
 #ifdef KVM_CAP_USER_NMI
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to