Send a signal to OS to let it able to handle the poison range. TODO: This is an rough draft, will add more parameters for qmp_cxl_inject_poison() to set to GMER.
Signed-off-by: Shiyang Ruan <ruansy.f...@fujitsu.com> --- hw/mem/cxl_type3.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c index d8fb63b1de..813f7f2175 100644 --- a/hw/mem/cxl_type3.c +++ b/hw/mem/cxl_type3.c @@ -1116,6 +1116,11 @@ void qmp_cxl_inject_poison(const char *path, uint64_t start, uint64_t length, QLIST_INSERT_HEAD(&ct3d->poison_list, p, node); ct3d->poison_list_cnt++; + + /* Emit an GMER event, let os handle it */ + qmp_cxl_inject_general_media_event(path, CXL_EVENT_LOG_FAILURE, 0, start, + 0, 0, 4, false, 0, false, 0, + false, 0, NULL, errp); } /* For uncorrectable errors include support for multiple header recording */ -- 2.34.1