** Description changed: [ Impact ] Users running Ubuntu 24.04 (Noble) experience slow boot times and guest soft lockups when launching VMs on multi-GPU servers. This occurs because the 512 GiB GPU BAR mappings are placed at only 4 KiB-aligned addresses. Backporting the fix to the stable release is necessary to ensure VMs with large GPU setups can boot reliably without locking up. The upload fixes this bug by applying two upstream commits from QEMU 9.2: 49915c0d2c9868e6f25e52e4d839943611b69e98 "vfio/helpers: Refactor vfio_region_mmap() error handling" 00b519c0bca0e933ed22e2e6f8bca6b23f41f950 "vfio/helpers: Align mmaps" These patches correct the mmap alignment for the GPU BARs, restoring normal boot times and preventing the lockups. [ Test Plan ] Set up a host machine running Ubuntu 24.04 with kernel 7.0.0-38-generic. Ensure you have Libvirt 10.0.0-2ubuntu8.19 and the current QEMU 1:8.2.2+ds-0ubuntu1.18 installed. Configure and launch a VM with multiple GPUs passed through via VFIO (e.g., an 8-GPU configuration with large BARs). Notice the slow VM boot time and observe the guest soft lockups in the logs. Update QEMU to the patched package from the proposed repository. Launch the multi-GPU VM again. Verify that the VM boots quickly and that no guest soft lockups happen. + [ Where problems could occur ] + + * Since the patches touch on the mmap behavior by aligning them, there + is a chance that the alignment fails now where previously it succeeded + if the machine runs out of virtual memory due to the alignment headroom. + + * Since now the default and only mmap behavior is aligned, if it fails + for any reason, the fallback is to not use mmap (no-mmap) instead of + trying first none aligned mmap. This can cause performance degradation + on systems where non aligned mmap was working fine but aligned mmap + fails. + + [ Other Info ] The issue was observed on Libvirt 10.0.0-2ubuntu8.19 + QEMU 1:8.2.2+ds-0ubuntu1.18 + host kernel 7.0.0-38-generic. Both upstream commits are required, as the first commit refactors the error handling needed for the second commit to apply properly.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2170738 Title: [SRU] slow VM boot from misaligned BAR MMAPs on multi-GPU servers To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2170738/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
