[nvidia_stable-11.0] NVIDIA: SAUCE: WAR: hw/vfio: Retry dma_map to bypass PFNMAP#20
Open
NathanChenNVIDIA wants to merge 1 commit into
Open
Conversation
The dma_map_file pathway doesn't fit into the kernel WAR that bypasses PFNMAP, resulting dma_map failures. Only the dma_map pathway could work. So retry with that upon a failure. Keep this WAR until the kernel WAR for PFNMAP is lifted. Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> (cherry picked from commit faff92d https://github.com/nvmochs/QEMU/tree/stable101_smmuv3-accel-07212025_egm) [nathanc: Moved changes from hw/vfio/container-base.c to hw/vfio/container.c for 11.0 base] Signed-off-by: Nathan Chen <nathanc@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EGM uses file-backed guest RAM (/dev/egm*) which selects the vfio_container_dma_map() path in hw/vfio/container.c. When this mapping fails with kernels lacking dmabuf support, return a successful return value to move forward with the bypass PFNMAP WAR in place of dmabuf support: NVIDIA: SAUCE: WAR: iommufd/pages: Bypass PFNMAP. This patch is not required when dmabuf support is present.
Testing
Launch 4 GPU EGM VM on GB200 with linux-nvidia 6.17.0-1018-nvidia-64k, verify nvidia-smi and CUDA samples