From patchwork Thu Jan 15 23:58:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Smarduch X-Patchwork-Id: 5643511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1CC98C058D for ; Fri, 16 Jan 2015 00:03:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28D9C201CD for ; Fri, 16 Jan 2015 00:02:59 +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 3E8F620165 for ; Fri, 16 Jan 2015 00:02:58 +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 1YBuKv-0001AD-Ag; Fri, 16 Jan 2015 00:00:25 +0000 Received: from mailout1.w2.samsung.com ([211.189.100.11] helo=usmailout1.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBuKr-0008OJ-6y for linux-arm-kernel@lists.infradead.org; Fri, 16 Jan 2015 00:00:22 +0000 Received: from uscpsbgex3.samsung.com (u124.gpu85.samsung.co.kr [203.254.195.124]) by mailout1.w2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NI800MXKTBZ9C30@mailout1.w2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 15 Jan 2015 18:59:59 -0500 (EST) X-AuditID: cbfec37c-b7f496d000000b40-78-54b8547e3a53 Received: from usmmp1.samsung.com ( [203.254.195.77]) by uscpsbgex3.samsung.com (USCPEXMTA) with SMTP id 70.24.02880.E7458B45; Thu, 15 Jan 2015 18:59:59 -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 <0NI800014TBYTLB0@usmmp1.samsung.com>; Thu, 15 Jan 2015 18:59:58 -0500 (EST) Received: from mjsmard-530U3C-530U4C-532U3C.sisa.samsung.com (105.144.129.79) by SISAEX02SJ.sisa.samsung.com (105.144.21.116) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 15 Jan 2015 15:59:57 -0800 From: Mario Smarduch To: christoffer.dall@linaro.org, marc.zyngier@arm.com, pbonzini@redhat.com, james.hogan@imgtec.com, agraf@suse.de, cornelia.huck@de.ibm.com, borntraeger@de.ibm.com Subject: [PATCH v16 01/10] KVM: Add architecture-defined TLB flush support Date: Thu, 15 Jan 2015 15:58:52 -0800 Message-id: <1421366341-26012-2-git-send-email-m.smarduch@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1421366341-26012-1-git-send-email-m.smarduch@samsung.com> References: <1421366341-26012-1-git-send-email-m.smarduch@samsung.com> MIME-version: 1.0 X-Originating-IP: [105.144.129.79] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42I5/e+wr259yI4Qg6mfGC1OXPnHaDF9xXYW i/fLehgtXrwGcuc3NzJavJv3gtmi+1kzo8WbT9oWc6YWWnw8dZzdYtPja6wWf+/8Y7PYv+0f q8WcMw9YLCa92cbkwO+xZt4aRo+Djw6xefTsPMPocefaHjaP85vWMHtsXlLv8X7fVTaPzaer PT5vkgvgjOKySUnNySxLLdK3S+DK+Nx5m7ngG1fFjacxDYwTOLsYOTkkBEwkzs/7xwRhi0lc uLeerYuRi0NIYBmjxKaOm6wQTi+TxPzHXSwQzkVGif3dk1lAWtgEdCX239vIDpIQEVjOKHF6 y2+wKmaBNiaJz0eWgw0WFvCS+DinkRHEZhFQlbj1YTsbiM0r4CbRtHEtkM0BtFxBYs4kG5Aw p4C7xMQZzawgthBQyZIZL6HKBSV+TL7HAlLOLCAh8fyzEkSJqsS2m88ZIV5Qkph2+Cr7BEah WUg6ZiF0LGBkWsUoVlqcXFCclJ5aYaxXnJhbXJqXrpecn7uJERJvNTsY7321OcQowMGoxMPL 4Lc9RIg1say4MvcQowQHs5IILy/zjhAh3pTEyqrUovz4otKc1OJDjEwcnFINjOv+91/6Xfvg ud7UHWcdpN9zhSRFKga8696cK33Y4dH6pkRlxs2KojJzn1wL7+adf/ID6/u1BU8UL//9ZKe5 oyCdLY1po8m5dgZbZ8VVNsLTN9xz37JOsXcB7/4UToF40blmzWH3zePeCX256vl++puGm9e6 fR9M0r8y9/eT4Ml3mPMnhu2QZFNiKc5INNRiLipOBACxb9MylQIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150115_160021_381298_96BC541C X-CRM114-Status: UNSURE ( 6.48 ) 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, catalin.marinas@arm.com, 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) {