Commit efccd18
committed
fix(virtio-pci): check guest values for MSI-X vector
We should check that the MSI-X vector that a guest assigns to a VirtIO
queue or configuration is a valid one. If it is a value bigger than the
available vectors allocated for the device, it should not update the
vector field and mark the corresponding vector to the NO_VECTOR value.
Also, add checks in the MSI implementation for VirtioInterrupt trait,
for making sure that we don't try to interact with out-of-range
interrupt vectors.
Signed-off-by: Babis Chalios <[email protected]>1 parent eab2b40 commit efccd18
File tree
2 files changed
+42
-19
lines changed- src/vmm/src/devices/virtio/transport/pci
2 files changed
+42
-19
lines changedLines changed: 29 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
258 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
259 | 273 | | |
260 | 274 | | |
261 | 275 | | |
| 276 | + | |
| 277 | + | |
262 | 278 | | |
263 | 279 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
271 | 289 | | |
272 | 290 | | |
273 | 291 | | |
| |||
446 | 464 | | |
447 | 465 | | |
448 | 466 | | |
449 | | - | |
| 467 | + | |
450 | 468 | | |
451 | | - | |
| 469 | + | |
452 | 470 | | |
453 | 471 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
768 | | - | |
769 | | - | |
770 | | - | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
771 | 774 | | |
772 | 775 | | |
773 | 776 | | |
| |||
793 | 796 | | |
794 | 797 | | |
795 | 798 | | |
796 | | - | |
797 | | - | |
798 | | - | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
799 | 804 | | |
800 | 805 | | |
801 | 806 | | |
| |||
0 commit comments