Received: by 10.223.185.116 with SMTP id b49csp1013393wrg; Wed, 21 Feb 2018 10:33:54 -0800 (PST) X-Google-Smtp-Source: AH8x225mL3gdIXSwrRXxexUAMYsi7jbn+sXnMqVvb0FQa7r9cOflWV3M1DyEv6gm91i9Nhnw8W8l X-Received: by 10.98.174.26 with SMTP id q26mr4150172pff.92.1519238034877; Wed, 21 Feb 2018 10:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238034; cv=none; d=google.com; s=arc-20160816; b=XpUCvhBnPG9IwVjDsdBsTA6N44nmf+A4oyRjMVQ4fWDW0JzR9RqxgL22vA54rFHSJ4 BAbVyVcYWR1sL2CG9CylDB+nMKoDw3J3rIybCH8hV+dw5473r8GkezGgsDykbHnN5AJm nQhRrIaALb69HV8wax1lMvMJCwPUZNdArwncveAGMontOq1fXLfXeeo1NckzjQmOe4dG zmavtxbL+/kY0pXSE77nIa+1sLExjpRFow4PnMeJ06BurEqmWmNIYIeUwMb4PZjNavC3 VTn8ilCkJjLt8n4jBVStVojNVR9VTvzdy+yM037UIWdjbSqxLZDZ/PNvbdHCdqzKLmNW bxuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QFDmPDECbxrkJHHzUbyDj2hxCXztv7/40PRo9lRKyZM=; b=qxkbN/ed5/cLKRFwoNdNEBzqsX93Pw4QXbk5RgiuGXGUJybmkd6uHOlCOeSTpIlhnV YLd4xx0DdnMUFK9lK50NbeQ6Wh3U5iPdbSaFRGxttZ5h8KAgCKuaA5/v0gEU58GnHVqj fDZeEwpgJefYhbYa9SAsAjaRynDopV2D46+18CEWtSOL9BrXfsRqDfFdhMH/zMT8vt+/ 5kc1ww/UskPBKmuDagPmC/wRrpcBlqxU8fo4HMM77LMdZDe+KDaTB7ULp59h7Fa3ABWJ LSN8+w7SVsgUpaT3wO7qRNQ6tihYBQ5WGSJ0+GktRDc8f33FlNqEsdk2Y1cXyKkWC7fm IR8A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b65si7021293pgc.70.2018.02.21.10.33.39; Wed, 21 Feb 2018 10:33:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965313AbeBUNIM (ORCPT + 99 others); Wed, 21 Feb 2018 08:08:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42150 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965286AbeBUNII (ORCPT ); Wed, 21 Feb 2018 08:08:08 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7AD19FFC; Wed, 21 Feb 2018 13:08:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexey Kardashevskiy , Laurent Vivier , Daniel Henrique Barboza , Michael Ellerman Subject: [PATCH 4.15 023/163] powerpc/mm: Flush radix process translations when setting MMU type Date: Wed, 21 Feb 2018 13:47:32 +0100 Message-Id: <20180221124531.475915279@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexey Kardashevskiy commit 62e984ddfd6b056d399e24113f5e6a7145e579d8 upstream. Radix guests do normally invalidate process-scoped translations when a new pid is allocated but migrated guests do not invalidate these so migrated guests crash sometime, especially easy to reproduce with migration happening within first 10 seconds after the guest boot start on the same machine. This adds the "Invalidate process-scoped translations" flush to fix radix guests migration. Fixes: 2ee13be34b13 ("KVM: PPC: Book3S HV: Update kvmppc_set_arch_compat() for ISA v3.00") Cc: stable@vger.kernel.org # v4.10+ Signed-off-by: Alexey Kardashevskiy Tested-by: Laurent Vivier Tested-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/mm/pgtable_64.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/powerpc/mm/pgtable_64.c +++ b/arch/powerpc/mm/pgtable_64.c @@ -483,6 +483,8 @@ void mmu_partition_table_set_entry(unsig if (old & PATB_HR) { asm volatile(PPC_TLBIE_5(%0,%1,2,0,1) : : "r" (TLBIEL_INVAL_SET_LPID), "r" (lpid)); + asm volatile(PPC_TLBIE_5(%0,%1,2,1,1) : : + "r" (TLBIEL_INVAL_SET_LPID), "r" (lpid)); trace_tlbie(lpid, 0, TLBIEL_INVAL_SET_LPID, lpid, 2, 0, 1); } else { asm volatile(PPC_TLBIE_5(%0,%1,2,0,0) : :