[RFC PATCH kernel] powerpc/mm: Flush "process-scoped translations" when setting MMU type
Alexey Kardashevskiy
aik at ozlabs.ru
Tue Jan 9 12:35:41 AEDT 2018
This fixes migration on POWER9 machines, especially when migration
starts within first 10 seconds after the guest start.
Signed-off-by: Alexey Kardashevskiy <aik at 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
More information about the Linuxppc-dev
mailing list