All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH kernel] powerpc/mm: Flush "process-scoped translations" when setting MMU type
@ 2018-01-09  1:35 Alexey Kardashevskiy
  0 siblings, 0 replies; only message in thread
From: Alexey Kardashevskiy @ 2018-01-09  1:35 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Alexey Kardashevskiy, David Gibson, Oliver O'Halloran,
	Balbir Singh, Benjamin Herrenschmidt, Michael Ellerman,
	Paul Mackerras

This fixes migration on POWER9 machines, especially when migration
starts within first 10 seconds after the guest start.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

This is a reminder that the problem exists, a proper patch and
commit log are still needed. The "(old & PATB_HR)" was tested but
not the other one, something is wrong with hpt guest on radix host.
---
 arch/powerpc/mm/pgtable_64.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 813ea22..f690f6d 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -483,10 +483,14 @@ void mmu_partition_table_set_entry(unsigned int lpid, unsigned long dw0,
 	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) : :
 			     "r" (TLBIEL_INVAL_SET_LPID), "r" (lpid));
+		asm volatile(PPC_TLBIE_5(%0,%1,2,1,0) : :
+				"r" (TLBIEL_INVAL_SET_LPID), "r" (lpid));
 		trace_tlbie(lpid, 0, TLBIEL_INVAL_SET_LPID, lpid, 2, 0, 0);
 	}
 	asm volatile("eieio; tlbsync; ptesync" : : : "memory");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-09  1:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09  1:35 [RFC PATCH kernel] powerpc/mm: Flush "process-scoped translations" when setting MMU type Alexey Kardashevskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.