From: Glauber Costa Subject: [PATCH] use kvm_has_sync_mmu from upstream. Date: Fri, 24 Jul 2009 13:46:26 -0400 Message-ID: <1248457586-405-1-git-send-email-glommer@redhat.com> Cc: avi@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx2.redhat.com ([66.187.237.31]:51576 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752813AbZGXRq2 (ORCPT ); Fri, 24 Jul 2009 13:46:28 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6OHkSEG009495 for ; Fri, 24 Jul 2009 13:46:28 -0400 Sender: kvm-owner@vger.kernel.org List-ID: they have it, and it does the same as we do. Signed-off-by: Glauber Costa --- kvm-all.c | 3 +++ qemu-kvm.c | 9 --------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index b4b5a35..157b968 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -848,6 +848,8 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...) return ret; } +#endif + int kvm_has_sync_mmu(void) { #ifdef KVM_CAP_SYNC_MMU @@ -859,6 +861,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 bca256c..fdf71a8 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1152,15 +1152,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 -- 1.6.2.2