Skip to contentSkip to conversation

powerpc/pseries: hwpoison the pages upon hitting UE

PATCH Applied Ganesh Goudar 2 participants 2 messages Apr 15, 2019 – Apr 21, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/pseries: hwpoison the pages upon hitting UE

Add support to hwpoison the pages upon hitting machine check exception.

This patch queues the address where UE is hit to percpu array and schedules work to plumb it into memory poison infrastructure.

---
 arch/powerpc/include/asm/mce.h       |  1 +
 arch/powerpc/kernel/mce_power.c      |  2 +-
 arch/powerpc/platforms/pseries/ras.c | 85 +++++++++++++++++++++++++++-
 3 files changed, 86 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/mce.h +1 -0
index 17996bc9382b..ad47fa865324 100644
@@ -210,6 +210,7 @@ extern void release_mce_event(void);
 extern void machine_check_queue_event(void);
 extern void machine_check_print_event_info(struct machine_check_event *evt,
 					   bool user_mode, bool in_guest);
+unsigned long addr_to_pfn(struct pt_regs *regs, unsigned long addr);
 #ifdef CONFIG_PPC_BOOK3S_64
 void flush_and_reload_slb(void);
 #endif /* CONFIG_PPC_BOOK3S_64 */
arch/powerpc/kernel/mce_power.c +1 -1
index 6b800eec31f2..367fbfa2e835 100644
@@ -36,7 +36,7 @@
  * Convert an address related to an mm to a PFN. NOTE: we are in real
  * mode, we could potentially race with page table updates.
  */
-static unsigned long addr_to_pfn(struct pt_regs *regs, unsigned long addr)
+unsigned long addr_to_pfn(struct pt_regs *regs, unsigned long addr)
 {
 	pte_t *ptep;
 	unsigned long flags;
arch/powerpc/platforms/pseries/ras.c +84 -1

103 lines not on this page · raw message

Signature · 1 line
2.17.2