From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTxMh-00029T-Fy for qemu-devel@nongnu.org; Fri, 06 Mar 2015 13:52:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTxMg-0008Am-M2 for qemu-devel@nongnu.org; Fri, 06 Mar 2015 13:52:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTxMg-0008AO-Dy for qemu-devel@nongnu.org; Fri, 06 Mar 2015 13:52:50 -0500 From: Andrew Jones Date: Fri, 6 Mar 2015 13:52:33 -0500 Message-Id: <1425667953-3566-7-git-send-email-drjones@redhat.com> In-Reply-To: <1425667953-3566-1-git-send-email-drjones@redhat.com> References: <1425667780-3449-1-git-send-email-drjones@redhat.com> <1425667953-3566-1-git-send-email-drjones@redhat.com> Subject: [Qemu-devel] [RFC PATCH 6/6] KVM: ARM: no need for kvm_arch_flush_incoherent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvmarm@lists.cs.columbia.edu, qemu-devel@nongnu.org, ard.biesheuvel@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, peter.maydell@linaro.org Cc: pbonzini@redhat.com, lersek@redhat.com, agraf@suse.de, catalin.marinas@arm.com kvm_arch_flush_incoherent makes things too slow, and we don't need it. Userspace can flush for us, as the necessary cache maintenance instruction is not (necessarily) privileged. Signed-off-by: Andrew Jones --- arch/arm/kvm/mmu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 2f45db9cd436a..b2d87587a9d79 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -1822,6 +1822,11 @@ int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot, void kvm_arch_flush_incoherent(struct kvm *kvm, struct kvm_memory_slot *slot) { + /* + * We no longer need this function, now that userspace does the + * flushing. + */ +#if 0 if (slot->flags & KVM_MEM_READONLY) { /* * Readonly memory shouldn't be changing, and we do a @@ -1840,6 +1845,7 @@ void kvm_arch_flush_incoherent(struct kvm *kvm, struct kvm_memory_slot *slot) */ coherent_cache_memslot(slot, true); +#endif } void kvm_arch_invalidate_incoherent(struct kvm *kvm, struct kvm_memory_slot *slot) -- 1.8.3.1