block/nvme: Only report VFIO error on failed retry
commit9bd2788f49c331b02372cc257b11e4c984d39708
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 2 Sep 2021 07:00:25 +0000 (2 09:00 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 7 Sep 2021 08:08:24 +0000 (7 09:08 +0100)
treeeb5311764690bbcab2fd76e8bc7c7233ca7e1a8d
parentf38b376d421dcb35027e6d9bf852b4091dc87d83
block/nvme: Only report VFIO error on failed retry

We expect the first qemu_vfio_dma_map() to fail (indicating
DMA mappings exhaustion, see commit 15a730e7a3a). Do not
report the first failure as error, since we are going to
flush the mappings and retry.

This removes spurious error message displayed on the monitor:

  (qemu) c
  (qemu) qemu-kvm: VFIO_MAP_DMA failed: No space left on device
  (qemu) info status
  VM status: running

Reported-by: Tingting Mao <timao@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-12-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/nvme.c