Commit 598498e
committed
femu/ocssd: refuse a geometry the timing model cannot index
The model stamps and locks fixed-size per-chip arrays in the controller,
indexed by channel * lnum_lun + lun, so it is the product that has to
fit; lnum_ch=64,lnum_lun=8 indexes 511 entries into an array of 128 and
writes into the rest of the controller. Both versions asserted on this
during realize, which aborts QEMU over a property the user chose. Refuse
the device with a message naming the limits instead.
Zero is refused for the same reason: the counts divide the namespace
size while the geometry is built, so lnum_ch=0 is a division fault at
realize. Version 2.0 also stops building the controller once a namespace
has failed.1 parent d5a5b78 commit 598498e
4 files changed
Lines changed: 43 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | 1136 | | |
1146 | 1137 | | |
1147 | 1138 | | |
| |||
1293 | 1284 | | |
1294 | 1285 | | |
1295 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1296 | 1291 | | |
1297 | 1292 | | |
1298 | 1293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | 1158 | | |
1166 | 1159 | | |
1167 | 1160 | | |
| |||
1486 | 1479 | | |
1487 | 1480 | | |
1488 | 1481 | | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1489 | 1486 | | |
1490 | 1487 | | |
1491 | | - | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
1492 | 1491 | | |
1493 | 1492 | | |
1494 | 1493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
3 | 34 | | |
4 | 35 | | |
5 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
0 commit comments