From patchwork Mon Dec 15 07:27:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Smarduch X-Patchwork-Id: 5491121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DB4169F326 for ; Mon, 15 Dec 2014 07:31:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20073209ED for ; Mon, 15 Dec 2014 07:31:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DDF2209EB for ; Mon, 15 Dec 2014 07:31:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y0Q5Z-0004mt-5k; Mon, 15 Dec 2014 07:29:05 +0000 Received: from mailout3.w2.samsung.com ([211.189.100.13] helo=usmailout3.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y0Q5U-0004hx-2Q for linux-arm-kernel@lists.infradead.org; Mon, 15 Dec 2014 07:29:00 +0000 Received: from uscpsbgex1.samsung.com (u122.gpu85.samsung.co.kr [203.254.195.122]) by usmailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NGM003N94RPW000@usmailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 15 Dec 2014 02:28:37 -0500 (EST) X-AuditID: cbfec37a-b7fba6d000007572-45-548e8da50116 Received: from usmmp1.samsung.com ( [203.254.195.77]) by uscpsbgex1.samsung.com (USCPEXMTA) with SMTP id 7E.D8.30066.5AD8E845; Mon, 15 Dec 2014 02:28:37 -0500 (EST) Received: from sisasmtp.sisa.samsung.com ([105.144.21.116]) by usmmp1.samsung.com (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTP id <0NGM001RE4RPOC50@usmmp1.samsung.com>; Mon, 15 Dec 2014 02:28:37 -0500 (EST) Received: from mjsmard-530U3C-530U4C-532U3C.sisa.samsung.com (105.160.8.49) by SISAEX02SJ.sisa.samsung.com (105.144.21.116) with Microsoft SMTP Server (TLS) id 14.3.123.3; Sun, 14 Dec 2014 23:28:36 -0800 From: Mario Smarduch To: pbonzini@redhat.com, james.hogan@imgtec.com, christoffer.dall@linaro.org, agraf@suse.de, marc.zyngier@arm.com, cornelia.huck@de.ibm.com, borntraeger@de.ibm.com, catalin.marinas@arm.com Subject: [PATCH v15 01/11] KVM: Add architecture-defined TLB flush support Date: Sun, 14 Dec 2014 23:27:58 -0800 Message-id: <1418628488-3696-2-git-send-email-m.smarduch@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1418628488-3696-1-git-send-email-m.smarduch@samsung.com> References: <1418628488-3696-1-git-send-email-m.smarduch@samsung.com> MIME-version: 1.0 X-Originating-IP: [105.160.8.49] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeLIzCtJLcpLzFFi42I5/e+wr+7S3r4Qg5UvlSxOXPnHaDF9xXYW i/fLehgtXrwGcuc3NzJavJv3gtmi+1kzo8WbT9oWc6YWWnw8dZzdYtPja6wWf+/8Y7PYv+0f q8WcMw9YLCa92cbkwO+xZt4aRo+Djw6xefTsPMPocefaHjaP85vWMHtsXlLv8X7fVTaPzaer PT5vkgvgjOKySUnNySxLLdK3S+DKeLZoAlPBO66KAz8b2BsY+zi7GDk5JARMJOb2XmCDsMUk LtxbD2RzcQgJLGOUOP7+DjuE08skcezoHajMeUaJ3S3t7CAtbAK6EvvvbQSrEhE4wChxYuMv JhCHWeAto8SOk3+YQKqEBbwkLkz8xghiswioSjw/+Zili5GDg1fAVeLQ/zoQU0JAQWLOJBsQ k1PATWLvbmWQYiGggr8b7oMN4RUQlPgx+R5YI7OAhMTzz0oQJaoS224+Z4QZsnGBzwRGoVlI GmYhNCxgZFrFKFZanFxQnJSeWmGoV5yYW1yal66XnJ+7iRESa1U7GO98tTnEKMDBqMTDG8HY FyLEmlhWXJl7iFGCg1lJhLc7HijEm5JYWZValB9fVJqTWnyIkYmDU6qBkZshsvDa66RLBZU/ O/7GX1WfrvR/k8H8u0Jvd+7y2rLt0gTvaeuVxZ+q+17zLhVxKTycxuqhc9evqS4w6+JRG+XZ pxXe+c9dJ+/QKbBXQ6rzxMY1qTuk9EQLV1cEJioucXA+J/Y24tuDCnMXh+aainc7vz5iSLnR fOGDdbBOXcvN1xcPCk8rUWIpzkg01GIuKk4EAHflOMaTAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141214_232900_202547_91FC8755 X-CRM114-Status: UNSURE ( 5.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.0 (-----) Cc: peter.maydell@linaro.org, kvm@vger.kernel.org, steve.capper@arm.com, kvm-ia64@vger.kernel.org, kvm-ppc@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Mario Smarduch X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow architectures to override the generic kvm_flush_remote_tlbs() function via HAVE_KVM_ARCH_TLB_FLUSH_ALL. ARMv7 will need this to provide its own TLB flush interface. Reviewed-by: Christoffer Dall Reviewed-by: Marc Zyngier Reviewed-by: Paolo Bonzini Signed-off-by: Mario Smarduch --- virt/kvm/Kconfig | 3 +++ virt/kvm/kvm_main.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index fc0c5e6..3796a21 100644 --- a/virt/kvm/Kconfig +++ b/virt/kvm/Kconfig @@ -37,3 +37,6 @@ config HAVE_KVM_CPU_RELAX_INTERCEPT config KVM_VFIO bool + +config HAVE_KVM_ARCH_TLB_FLUSH_ALL + bool diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 3cee7b1..51e9dfa 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -185,6 +185,7 @@ bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req) return called; } +#ifndef CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL void kvm_flush_remote_tlbs(struct kvm *kvm) { long dirty_count = kvm->tlbs_dirty; @@ -195,6 +196,7 @@ void kvm_flush_remote_tlbs(struct kvm *kvm) cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); } EXPORT_SYMBOL_GPL(kvm_flush_remote_tlbs); +#endif void kvm_reload_remote_mmus(struct kvm *kvm) {