Commit 98980d7
tools/testing/cxl: Add a sysfs attr to test poison inject limits
CXL devices may report a maximum number of addresses that a device
allows to be poisoned using poison injection. When cxl_test creates
mock CXL memory devices, it defaults to MOCK_INJECT_DEV_MAX==88 for
all mocked memdevs.
Add a sysfs attribute, poison_inject_max to module cxl_mock_mem so
that users can set a custom device injection limit. Fail, and return
-EBUSY, if the mock poison list is not empty.
/sys/bus/platform/drivers/cxl_mock_mem/poison_inject_max
A simple usage model is to set the attribute before running a test in
order to emulate a device's poison handling.
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/0f25b2862b90013545450222d2199e435c6cc11a.1681874357.git.alison.schofield@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>1 parent 8eac7ea commit 98980d7
1 file changed
Lines changed: 48 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
485 | 487 | | |
486 | 488 | | |
487 | 489 | | |
488 | | - | |
| 490 | + | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
| |||
919 | 921 | | |
920 | 922 | | |
921 | 923 | | |
922 | | - | |
| 924 | + | |
923 | 925 | | |
924 | 926 | | |
925 | 927 | | |
| |||
934 | 936 | | |
935 | 937 | | |
936 | 938 | | |
937 | | - | |
| 939 | + | |
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
| |||
972 | 974 | | |
973 | 975 | | |
974 | 976 | | |
975 | | - | |
| 977 | + | |
976 | 978 | | |
977 | 979 | | |
978 | 980 | | |
| |||
1054 | 1056 | | |
1055 | 1057 | | |
1056 | 1058 | | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1057 | 1100 | | |
1058 | 1101 | | |
1059 | 1102 | | |
| |||
1262 | 1305 | | |
1263 | 1306 | | |
1264 | 1307 | | |
| 1308 | + | |
1265 | 1309 | | |
1266 | 1310 | | |
1267 | 1311 | | |
| |||
0 commit comments