From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39008 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295AbcKJLc6 (ORCPT ); Thu, 10 Nov 2016 06:32:58 -0500 Date: Thu, 10 Nov 2016 07:08:43 +0100 From: Greg KH To: James Hogan Cc: Jiri Slaby , stable@vger.kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Ralf Baechle , linux-mips@linux-mips.org, kvm@vger.kernel.org Subject: Re: [BACKPORT PATCH 3.10..3.16] KVM: MIPS: Drop other CPU ASIDs on guest MMU changes Message-ID: <20161110060843.GA28639@kroah.com> References: <20161109144624.16683-1-james.hogan@imgtec.com> <6066667d-e62d-bfec-ca3e-f16f8bef912d@suse.cz> <20161109220043.GA7075@jhogan-linux.le.imgtec.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161109220043.GA7075@jhogan-linux.le.imgtec.org> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Nov 09, 2016 at 10:00:43PM +0000, James Hogan wrote: > On Wed, Nov 09, 2016 at 10:22:01PM +0100, Jiri Slaby wrote: > > On 11/09/2016, 03:46 PM, James Hogan wrote: > > > commit 91e4f1b6073dd680d86cdb7e42d7cccca9db39d8 upstream. > > > > > > When a guest TLB entry is replaced by TLBWI or TLBWR, we only invalidate > > > TLB entries on the local CPU. This doesn't work correctly on an SMP host > > > when the guest is migrated to a different physical CPU, as it could pick > > > up stale TLB mappings from the last time the vCPU ran on that physical > > > CPU. > > > > > > Therefore invalidate both user and kernel host ASIDs on other CPUs, > > > which will cause new ASIDs to be generated when it next runs on those > > > CPUs. > > > > > > We're careful only to do this if the TLB entry was already valid, and > > > only for the kernel ASID where the virtual address it mapped is outside > > > of the guest user address range. > > > > > > 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 > > > Cc: # 3.10.x- > > > Cc: Jiri Slaby > > > [james.hogan@imgtec.com: Backport to 3.10..3.16] > > > Signed-off-by: James Hogan > > > --- > > > Unfortunately the original commit went in to v3.12.65 as commit > > > 168e5ebbd63e, without fixing up the references to tlb_lo[0/1] to > > > tlb_lo0/1 which broke the MIPS KVM build, and I didn't twig that I > > > already had a correct backport outstanding (sorry!). That commit should > > > be reverted before applying this backport to 3.12. > > > > Thanks, reverted and applied. I wonder the builders didn't break given 4 > > mips configurations are tested. I indeed could reproduce locally. > > I'm guessing malta_kvm_defconfig isn't one of those defconfigs (and the > imgtec buildbots don't yet test stable branches). Which builders do you > use? I use 0-day for these types of things, and it is not showing up any errors for the 4.4-stable kernel. Can you get these configurations added to it so that we can ensure it doesn't regress? thanks, greg k-h