Commit c5c27fd
CA-236863: division by 0 in VGPU-g detection (xapi-project#281)
* CA-236863: division by 0 in VGPU-g detection
If the Intel GPU BAR size is too small, the number of VGPUs per PGPU
could become zero and give rise to a division by zero. The suggested
fix adds an itermediate check to the VGPU generation code to prevent
this from happening.
Signed-off-by: Marcello Seri <[email protected]>
* CA-236863: add warning in the logs if BAR size is too small
Signed-off-by: Marcello Seri <[email protected]>
* Cleanup vgpu_type record creation
Signed-off-by: Marcello Seri <[email protected]>1 parent 71b953c commit c5c27fd
1 file changed
+41
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
471 | 477 | | |
472 | 478 | | |
473 | 479 | | |
474 | 480 | | |
475 | 481 | | |
476 | 482 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
492 | 501 | | |
493 | | - | |
| 502 | + | |
494 | 503 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
500 | 519 | | |
501 | 520 | | |
502 | 521 | | |
| |||
0 commit comments