Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936647AbdCJMR7 (ORCPT ); Fri, 10 Mar 2017 07:17:59 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:45174 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936853AbdCJMR4 (ORCPT ); Fri, 10 Mar 2017 07:17:56 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Ralf Baechle" , "Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?=" , "James Hogan" , kvm@vger.kernel.org, "Paolo Bonzini" , linux-mips@linux-mips.org Date: Fri, 10 Mar 2017 11:46:22 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 182/370] KVM: MIPS: Flush KVM entry code from icache globally In-Reply-To: X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1378 Lines: 37 3.16.42-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: James Hogan commit 32eb12a6c11034867401d56b012e3c15d5f8141e upstream. Flush the KVM entry code from the icache on all CPUs, not just the one that built the entry code. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Radim Krčmář [bwh: Backported to 3.16: adjust filename] Signed-off-by: Ben Hutchings --- arch/mips/kvm/kvm_mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/mips/kvm/kvm_mips.c +++ b/arch/mips/kvm/kvm_mips.c @@ -343,8 +343,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(st mips32_GuestExceptionEnd - mips32_GuestException); /* Invalidate the icache for these ranges */ - local_flush_icache_range((unsigned long)gebase, - (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); + flush_icache_range((unsigned long)gebase, + (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); /* Allocate comm page for guest kernel, a TLB will be reserved for mapping GVA @ 0xFFFF8000 to this page */ vcpu->arch.kseg0_commpage = kzalloc(PAGE_SIZE << 1, GFP_KERNEL);