[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison()
From: |
Dan Williams |
Subject: |
RE: [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison() |
Date: |
Fri, 9 Feb 2024 22:46:52 -0800 |
Shiyang Ruan wrote:
> If poison is detected(reported from cxl memdev), OS should be notified to
> handle it. Introduce this function:
> 1. translate DPA to HPA;
> 2. construct a MCE instance; (TODO: more details need to be filled)
> 3. log it into MCE event queue;
>
> After that, MCE mechanism can walk over its notifier chain to execute
> specific handlers.
>
> Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
> ---
> arch/x86/kernel/cpu/mce/core.c | 1 +
> drivers/cxl/core/mbox.c | 33 +++++++++++++++++++++++++++++++++
> 2 files changed, 34 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> index bc39252bc54f..a64c0aceb7e0 100644
> --- a/arch/x86/kernel/cpu/mce/core.c
> +++ b/arch/x86/kernel/cpu/mce/core.c
> @@ -131,6 +131,7 @@ void mce_setup(struct mce *m)
> m->ppin = cpu_data(m->extcpu).ppin;
> m->microcode = boot_cpu_data.microcode;
> }
> +EXPORT_SYMBOL_GPL(mce_setup);
No, mce_setup() is x86 specific and the CXL subsystem is CPU
architecture independent. My expectation is that CXL should translate
errors for edac similar to how the ACPI GHES code does it. See usage of
edac_raw_mc_handle_error() and memory_failure_queue().
Otherwise an MCE is a CPU consumption of poison event, and CXL is
reporting device-side discovery of poison.
- [RFC PATCH SET] cxl: add poison event handler, Shiyang Ruan, 2024/02/09
- [RFC PATCH 5/5] cxl/core: add poison injection event handler, Shiyang Ruan, 2024/02/09
- [RFC PATCH 1/2] hw/cxl/type3: add missing flag bit for GMER, Shiyang Ruan, 2024/02/09
- [RFC PATCH 2/5] cxl/core: introduce cxl_memdev_dpa_to_hpa(), Shiyang Ruan, 2024/02/09
- [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison(), Shiyang Ruan, 2024/02/09
- [RFC PATCH 1/5] cxl/core: correct length of DPA field masks, Shiyang Ruan, 2024/02/09
- [RFC PATCH 2/2] hw/cxl/type3: send a GMER while injecting poison, Shiyang Ruan, 2024/02/09
- [RFC PATCH 4/5] cxl/core: add report option for cxl_mem_get_poison(), Shiyang Ruan, 2024/02/09
- Re: [RFC PATCH SET] cxl: add poison event handler, Dave Jiang, 2024/02/12