Skip to content

Revisit MCE handling for UE Errors

Balbir Singh linuxppc-dev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 10 repliesIn review
  2. v35 patches 0 repliesSuperseded
  3. v2 posting 2/25 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/20 of 4 patches0 repliesSuperseded
v14 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Add a #define for MAX_MCE_DEPTH instead of hard coding the value
- Refactor addr_to_pfn to deduce the right parameters

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5powerpc/mce.c: Remove unused function get_mce_fault_addr()arch/powerpc/include/asm/mce.h arch/powerpc/kernel/mce.c+0 -413 replies
2/5powerpc/mce: align the print of physical address betterarch/powerpc/kernel/mce.c+1 -12 replies
3/5powerpc/mce: Hookup derror (load/store) UE errorsarch/powerpc/include/asm/exception-64s.h arch/powerpc/include/asm/mce.h arch/powerpc/kernel/exceptions-64s.S +2 more+94 -82 replies
4/5powerpc/mce: Hookup ierror (instruction) UE errorsarch/powerpc/kernel/mce_power.c+19 -30 replies
5/5powerpc/mce: hookup memory_failure for UE errorsarch/powerpc/kernel/mce.c+67 -33 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchNicholas Piggin
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/5] Revisit MCE handling for UE Errors

This patch series is designed to hook up memory_failure on UE errors, this is specially helpful for user_mode UE errors.

The first two patches cleanup bits, remove dead code. I could not find any users of get_mce_fault_addr(). The second one improves printing of physical address

The third patch walks kernel/user mode page tables in real mode to extract the effective address of the instruction that caused the UE error and the effective address it was trying to access (for load/store). The fourth patch hooks up the pfn for instruction UE errors (ierror).

The fifth patch hooks up memory_failure to the MCE patch.

TODO:
Log the address in NVRAM, so that we can recover from bad pages at boot and keep the blacklist persistent.

Changelog v4:
- Add a #define for MAX_MCE_DEPTH instead of hard coding the value
- Refactor addr_to_pfn to deduce the right parameters
Changelog v3:
- Check for recursive MCE invocations (suggested by Nick)
Changelog v2:
- Remove pr_warn from real mode to a more delayed context, where its OK to warn.
- Add a trivial patch to align prints of physical and effective address
Changelog v1:
- Address review comments from Nick and Mahesh (initialization of pfn and more comments on failure when addr_to_pfn() or anaylse_instr() fail)
- Hookup ierrors to the framework as well (comments from Mahesh)

Balbir Singh (5):
powerpc/mce.c: Remove unused function get_mce_fault_addr() powerpc/mce: align the print of physical address better powerpc/mce: Hookup derror (load/store) UE errors powerpc/mce: Hookup ierror (instruction) UE errors powerpc/mce: hookup memory_failure for UE errors

 arch/powerpc/include/asm/exception-64s.h |   5 ++
 arch/powerpc/include/asm/mce.h           |   4 +-
 arch/powerpc/kernel/exceptions-64s.S     |   2 +-
 arch/powerpc/kernel/mce.c                | 117 +++++++++++++++++++------------
 arch/powerpc/kernel/mce_power.c          | 109 +++++++++++++++++++++++++---
 5 files changed, 181 insertions(+), 56 deletions(-)
Signature · 1 line
2.9.5