[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [RFC PATCH 5/5] cxl/core: add poison injection event handler
From: |
Dan Williams |
Subject: |
RE: [RFC PATCH 5/5] cxl/core: add poison injection event handler |
Date: |
Fri, 9 Feb 2024 22:54:48 -0800 |
Shiyang Ruan wrote:
> Currently driver only trace cxl events, poison injection on cxl memdev
> is silent. OS needs to be notified then it could handle poison range
> in time. Per CXL spec, the device error event could be signaled through
> FW-First and OS-First methods.
>
> So, add poison event handler in OS-First method:
> - qemu:
> - CXL device report POISON event to OS by MSI by sending GMER after
> injecting a poison record
QEMU details do not belong in a kernel changelog. It is ok for an RFC,
but my hope is that this can be tested on hardware after being proven on
QEMU.
> - CXL driver
> a. read the POISON event through GMER; <-- this patch
> b. get POISON list;
> c. translate DPA to HPA;
> d. construct a mce instance, then call mce_log() to queue this mce
> instance;
It is not clear to me why the kernel should proactively fire machine
check notifications on injection? The changelog needs to make clear why
the kernel should do this, and the consequences of not going it.
For CPU consumed poison the machine check event will already fire. For
background discovery of poison, that should translate to a
memory_failure() notification with teh MF_ACTION_REQUIRED flag cleared.
Userspace, like rasdaemon, can then make a page offline decision.
- [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