Comment 21 for bug 2009048

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Hi Andreas,

> Any particular reason why the patch for bionic and focal does not use strerror(errno) in error_report(), and just logs the errno value? Not a big deal, but I noticed it when comparing the fixes.

This is due to the original call to error_report(), which uses strerror() in jammy only (not on focal/bionic) -- the patch just copies the original call, for simplicity.

$ git show pkg/ubuntu/jammy-proposed:debian/patches/ubuntu/lp2009048-vfio_map_dma_einval_amd_iommu_1tb.patch | grep error_report
+ error_report("VFIO_MAP_DMA failed: %s (hint: AMD IOMMU: reduce VM ram)",
     error_report("VFIO_MAP_DMA failed: %s", strerror(errno));

$ git show pkg/ubuntu/focal-proposed:debian/patches/ubuntu/lp2009048-vfio_map_dma_einval_amd_iommu_1tb.patch | grep error_report
+ error_report("VFIO_MAP_DMA: %d (hint: AMD IOMMU: reduce VM ram)",
     error_report("VFIO_MAP_DMA: %d", -errno);

$ git show pkg/ubuntu/bionic-proposed:debian/patches/ubuntu/lp2009048-vfio_map_dma_einval_amd_iommu_1tb.patch | grep error_report
+ error_report("VFIO_MAP_DMA: %d (hint: AMD IOMMU: reduce VM ram)",
     error_report("VFIO_MAP_DMA: %d", -errno);