Commit 6c0a588
NVIDIA: SAUCE: vfio/nvgrace-egm: list gpus through sysfs
To replicate the host EGM topology in the VM in terms of
the GPU affinity, the userspace need to be aware of which
GPUs belong to the same socket as the EGM region.
Expose the list of GPUs associated with an EGM region
through sysfs. The list can be queried from the location
/sys/devices/virtual/egm/egmX/gpu_devices.
Signed-off-by: Ankit Agrawal <ankita@nvidia.com>
Ref: sj24: /home/nvidia/ankita/kernel_patches/0002_vfio_nvgrace-egm_list_gpus_through_sysfs.patch
(koba: Enchance error handling for sysfs_create_group)
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 fec2356 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 2be8d45 commit 6c0a588
1 file changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 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 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
360 | 392 | | |
361 | 393 | | |
362 | 394 | | |
| |||
423 | 455 | | |
424 | 456 | | |
425 | 457 | | |
426 | | - | |
| 458 | + | |
427 | 459 | | |
428 | 460 | | |
429 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
430 | 466 | | |
431 | 467 | | |
| 468 | + | |
| 469 | + | |
432 | 470 | | |
433 | 471 | | |
434 | 472 | | |
| |||
462 | 500 | | |
463 | 501 | | |
464 | 502 | | |
| 503 | + | |
465 | 504 | | |
466 | 505 | | |
467 | 506 | | |
| |||
0 commit comments