Changes: RFCv2 -> v3: 1. patch1: removed changes for flags 2. changed the main idea of this patchset: not for injection event handling, but for creation; 3. removed GET_POISON_LIST command while receiving POISON event; 4. dropped poison report in debugfs; 5. added DER event handler to handle POISON event, in case POISON event is sent by DER; After the above changes, this patchset becomes smaller. Main code changes are in patch2, which seems could't be divided smaller.
Currently driver only traces cxl events, poison creation (for both vmem and pmem type) on cxl memdev is silent. OS needs to be notified then it could handle poison pages in time. Per CXL spec, the device error event could be signaled through FW-First and OS-First methods. So, add poison creation event handler in OS-First method: - Qemu: - CXL device reports POISON creation event to OS by MSI by sending GMER/DER after injecting a poison record; - CXL driver: <--- this patchset a. parse the POISON event from GMER/DER; b. translate poisoned DPA to HPA (PFN); c. enqueue poisoned PFN to memory_failure's work queue; Shiyang Ruan (2): cxl/core: correct length of DPA field masks cxl/core: add poison creation event handler drivers/cxl/core/mbox.c | 119 +++++++++++++++++++++++++++++++++----- drivers/cxl/core/trace.h | 2 +- drivers/cxl/cxlmem.h | 8 +-- include/linux/cxl-event.h | 18 +++++- 4 files changed, 126 insertions(+), 21 deletions(-) -- 2.34.1