powerpc/pseries: hwpoison the pages upon hitting UE
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.
Reviewed-by Mahesh Salgaonkar <[email protected]>
Signed-off-by Ganesh Goudar <[email protected]>
--- 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
@@ -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
@@ -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
Michael Ellerman
AppliedQuoted 8 lines · Ganesh Goudar
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.
Reviewed-by Mahesh Salgaonkar <[email protected]>Signed-off-by Ganesh Goudar <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/7f177f9810ada8ec2e8b378eddbe2d91
cheers