From patchwork Fri Nov 7 00:40:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Smarduch X-Patchwork-Id: 5248951 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 014999F2F1 for ; Fri, 7 Nov 2014 00:45:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2051A20145 for ; Fri, 7 Nov 2014 00:45:27 +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 EE5802010C for ; Fri, 7 Nov 2014 00:45:25 +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 1XmXcX-0003EV-61; Fri, 07 Nov 2014 00:41:45 +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 1XmXcU-0003Aq-B4 for linux-arm-kernel@lists.infradead.org; Fri, 07 Nov 2014 00:41:42 +0000 Received: from uscpsbgex3.samsung.com (u124.gpu85.samsung.co.kr [203.254.195.124]) by usmailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEN00H4V8KWCGB0@usmailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 06 Nov 2014 19:41:20 -0500 (EST) X-AuditID: cbfec37c-b7f9f6d000006015-23-545c1530f1cb Received: from usmmp2.samsung.com ( [203.254.195.78]) by uscpsbgex3.samsung.com (USCPEXMTA) with SMTP id A1.B4.24597.0351C545; Thu, 06 Nov 2014 19:41:20 -0500 (EST) Received: from sisasmtp.sisa.samsung.com ([105.144.21.116]) by usmmp2.samsung.com (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTP id <0NEN007SZ8KVBV80@usmmp2.samsung.com>; Thu, 06 Nov 2014 19:41:20 -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, 06 Nov 2014 16:41:19 -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 v13 1/7] KVM: Add architecture-defined TLB flush support Date: Thu, 06 Nov 2014 16:40:42 -0800 Message-id: <1415320848-13813-2-git-send-email-m.smarduch@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1415320848-13813-1-git-send-email-m.smarduch@samsung.com> References: <1415320848-13813-1-git-send-email-m.smarduch@samsung.com> MIME-version: 1.0 X-Originating-IP: [105.144.129.79] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkkeLIzCtJLcpLzFFi42I5/e+wn66BaEyIwZezEhYnrvxjtJi+YjuL xftlPYwWL14DufObGxkt3s17wWzR/ayZ0eLNJ22LOVMLLT6eOs5usenxNVaLv3f+sVns3/aP 1WLOmQcsFpPebGNy4PdYM28No8fBR4fYPHp2nmH0uHNtD5vH+U1rmD02L6n3eL/vKpvH5tPV Hp83yQVwRnHZpKTmZJalFunbJXBlzNjTxVzQxVWx6ux1tgbGtRxdjBwcEgImElcfyHcxcgKZ YhIX7q1n62Lk4hASWMYo8frWUhYIp5dJ4tXpr1DORUaJh39es4K0sAnoSuy/t5EdJCEicIBR 4sTGX0wgDrPAW0aJHSf/MIFUCQt4SHzv+wXWwSKgKvH//VZWkN28Am4Scy6zQpyhIDFnkg1I BaeAu8TmHTuYQWwhoIq7D3+AdfIKCEr8mHyPBaScWUBC4vlnJYgSVYltN58zQnygJDHt8FX2 CYxCs5B0zELoWMDItIpRrLQ4uaA4KT21wlivODG3uDQvXS85P3cTIyTaanYw3vtqc4hRgINR iYf3Bm9MiBBrYllxZe4hRgkOZiURXht2oBBvSmJlVWpRfnxRaU5q8SFGJg5OqQbGeZ5Or/z3 aX3Yn75a1uxB8ecCKb8692yTmJbt7XMnPNe9erRmi9YidolEz7SofRPLHZ+1pemf53j4IWV9 3jRhrTb3462CW1LP1nkd3eBmuWXbe/Ntc7g5H29aJaBnEmL1fNbWc6EF+6RnWijZvX1sIaaV e2zX7NftSgeuGL4J49sndCb/M2OrEktxRqKhFnNRcSIA5RqjMZQCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141106_164142_467301_E8684576 X-CRM114-Status: UNSURE ( 6.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.6 (-----) 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=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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: Paolo Bonzini Signed-off-by: Mario Smarduch Reviewed-by: Marc Zyngier --- 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 33712fb..887df87 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -184,6 +184,7 @@ static bool 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; @@ -194,6 +195,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) {