Commit ed8e826
committed
msix: relax assertion on data accesses from guest
It is true that writes/reads of an MSI-X table are either 32 or 64 bits
long. However, we do check for this invariant in the `match` expression
just after the assertion. If the invariant is not held (the guest tried
to read/write with an invalid length) we just print an error and
continue. This branch of the `match` block is never reached due to the
assertion itself.
To simplify things, just remove the assertion and let the `match` block
logic handle invalid memory accesses. This should also help us better
fuzz the bus accesses.
Do add a check that the data access is up to 8 bytes long. These are
all MMIO or Port IO accesses and they can't be bigger than 8 bytes. So
this assertion should never fail in production (unless there's a KVM
bug or we try to run Firecracker in some architecture that allows more
than 64bit memory accesses).
Signed-off-by: Babis Chalios <[email protected]>1 parent dc4e6ca commit ed8e826
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
0 commit comments