diff options
| author | Cédric Le Goater <clg@redhat.com> | 2025-08-14 17:34:19 +0200 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-09-08 16:46:31 +0200 |
| commit | ceb59c1cc61dee57c8806571e7c723e555914547 (patch) | |
| tree | 7492d2c891bcfd19283a9334463f1432c6581d31 /python/qemu/utils/qemu_ga_client.py | |
| parent | 36cd81dc139f899127d868ba9baaf3079c336efc (diff) | |
| download | focaccia-qemu-ceb59c1cc61dee57c8806571e7c723e555914547.tar.gz focaccia-qemu-ceb59c1cc61dee57c8806571e7c723e555914547.zip | |
vfio: Report an error when the 'dma_max_mappings' limit is reached
The VFIO IOMMU Type1 kernel driver enforces a default IOMMU mapping limit of 65535, which is configurable via the 'dma_max_mappings' module parameter. When this limit is reached, QEMU issues a warning and fails the mapping operation, but allows the VM to continue running, potentially causing issues later. This scenario occurs with SEV-SNP guests, which must update all IOMMU mappings during initialization. To address this, update vfio_ram_discard_register_listener() to accept an 'Error **' parameter and propagate the error to the caller. This change will halt the VM immediately, at init time, with the same error message. Additionally, the same behavior will be enforced at runtime. While this might be considered too brutal, the rarity of this case and the planned removal of the dma_max_mappings module parameter make it a reasonable approach. Cc: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250814153419.1643897-1-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'python/qemu/utils/qemu_ga_client.py')
0 files changed, 0 insertions, 0 deletions