Commit 2be8d45
NVIDIA: SAUCE: vfio/nvgrace-egm: track GPUs associated with the EGM regions
GB200 systems could have multiple GPUs associated with
an EGM region. For proper EGM functionality the host
topology in terms of GPU affinity has to be replicated
in the VM. Hence the EGM region structure must track the
GPU devices belonging to the same socket.
On the device probe, the device pci_dev struct is added to a
linked list of the appropriate EGM region.
Similarly on device remove, the pci_dev struct for the GPU
is removed from the EGM region.
Signed-off-by: Ankit Agrawal <ankita@nvidia.com>
Ref: sj24: /home/nvidia/ankita/kernel_patches/0001_vfio_nvgrace-egm_track_GPUs_associated_with_the_EGM_regions.patch
(koba: Enhance error handling, Remove egm_node from unregister_egm_node
and move destroy_egm_chardev a little forward)
Signed-off-by: Koba Ko <kobak@nvidia.com>
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
Acked-by: Carol L. Soto <csoto@nvidia.com>
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
(cherry picked from commit 0222c35 https://github.com/NVIDIA/NV-Kernels/tree/24.04_linux-nvidia-adv-6.11-next)
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>1 parent 522bd1c commit 2be8d45
1 file changed
Lines changed: 59 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
271 | 282 | | |
272 | 283 | | |
273 | 284 | | |
| |||
346 | 357 | | |
347 | 358 | | |
348 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
349 | 386 | | |
350 | 387 | | |
351 | 388 | | |
| |||
356 | 393 | | |
357 | 394 | | |
358 | 395 | | |
| 396 | + | |
359 | 397 | | |
360 | | - | |
361 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
362 | 402 | | |
363 | 403 | | |
| 404 | + | |
364 | 405 | | |
365 | 406 | | |
366 | 407 | | |
| |||
370 | 411 | | |
371 | 412 | | |
372 | 413 | | |
| 414 | + | |
| 415 | + | |
373 | 416 | | |
374 | 417 | | |
375 | 418 | | |
376 | 419 | | |
377 | 420 | | |
378 | 421 | | |
379 | | - | |
| 422 | + | |
380 | 423 | | |
381 | 424 | | |
382 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
383 | 430 | | |
384 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
385 | 436 | | |
386 | 437 | | |
387 | 438 | | |
388 | 439 | | |
389 | 440 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | 441 | | |
396 | 442 | | |
397 | 443 | | |
| |||
407 | 453 | | |
408 | 454 | | |
409 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
410 | 460 | | |
411 | 461 | | |
412 | 462 | | |
| |||
0 commit comments