Skip to contentSkip to conversation

powerpc/mm: Flush "process-scoped translations" when setting MMU type

RFC PATCH Superseded Alexey Kardashevskiy 1 participant 1 message Jan 9, 2018 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 powerpc/mm: Flush "process-scoped translations" when setting MMU type

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

---

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(+)
arch/powerpc/mm/pgtable_64.c +4 -0
index 813ea22..f690f6d 100644
@@ -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");
Signature · 1 line
2.11.0