Shiyang Ruan wrote: > If poison is detected(reported from cxl memdev), OS should be notified to > handle it. So, introduce this helper function for later use: > 1. translate DPA to HPA; > 2. enqueue records into memory_failure's work queue; > > Signed-off-by: Shiyang Ruan <ruansy.f...@fujitsu.com>
This patch is too small, it needs the corresponding caller to make sense of the proposed change. > --- > > Currently poison injection from debugfs always create a 64-bytes-length > record, which is fine. But the injection from qemu's QMP API: > qmp_cxl_inject_poison() could create a poison record contains big length, > which may cause many many times of calling memory_failure_queue(). > Though the MEMORY_FAILURE_FIFO_SIZE is 1 << 4, it seems not enougth. What matters is what devices do in practice, the kernel should not be worried about odd corner cases that only exist in QEMU injection scenarios.