[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 5ef1f4: block/nvme: Use safer trace format st
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 5ef1f4: block/nvme: Use safer trace format string |
Date: |
Tue, 07 Sep 2021 08:09:09 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 5ef1f4ec6fd8cbf0b312acb32be8166ab8b1b24d
https://github.com/qemu/qemu/commit/5ef1f4ec6fd8cbf0b312acb32be8166ab8b1b24d
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M block/trace-events
Log Message:
-----------
block/nvme: Use safer trace format string
Fix when building with -Wshorten-64-to-32:
warning: implicit conversion loses integer precision: 'unsigned long' to
'int' [-Wshorten-64-to-32]
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-2-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: cb49dfce586367cda313fe9ce92e095f534e8178
https://github.com/qemu/qemu/commit/cb49dfce586367cda313fe9ce92e095f534e8178
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report()
Instead of displaying the error on stderr, use error_report()
which also report to the monitor.
Reviewed-by: Fam Zheng <fam@euphon.net>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-3-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: a990858b0cc0a7fcbf6e0ee102603e6adbbbbaef
https://github.com/qemu/qemu/commit/a990858b0cc0a7fcbf6e0ee102603e6adbbbbaef
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Replace qemu_mutex_lock() calls with QEMU_LOCK_GUARD
Simplify qemu_vfio_dma_[un]map() handlers by replacing a pair of
qemu_mutex_lock/qemu_mutex_unlock calls by the WITH_QEMU_LOCK_GUARD
macro.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-4-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 3f4c0affcfbc7c1da0b117bee0cd5be6f52fa3e5
https://github.com/qemu/qemu/commit/3f4c0affcfbc7c1da0b117bee0cd5be6f52fa3e5
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Remove unreachable code in qemu_vfio_dma_map()
qemu_vfio_add_mapping() returns a pointer to an indexed entry
in pre-allocated QEMUVFIOState::mappings[], thus can not be NULL.
Remove the pointless check.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-5-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 526c37c19df31a651b3f9de7b5f2f5100c25017b
https://github.com/qemu/qemu/commit/526c37c19df31a651b3f9de7b5f2f5100c25017b
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M block/nvme.c
Log Message:
-----------
block/nvme: Have nvme_create_queue_pair() report errors consistently
nvme_create_queue_pair() does not return a boolean value (indicating
eventual error) but a pointer, and is inconsistent in how it fills the
error handler. To fulfill callers expectations, always set an error
message on failure.
Reported-by: Auger Eric <eric.auger@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-6-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 521b97cd4e5f4a636f56515057084b1a86552b0b
https://github.com/qemu/qemu/commit/521b97cd4e5f4a636f56515057084b1a86552b0b
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M block/nvme.c
M include/qemu/vfio-helpers.h
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Pass Error handle to qemu_vfio_dma_map()
Currently qemu_vfio_dma_map() displays errors on stderr.
When using management interface, this information is simply
lost. Pass qemu_vfio_dma_map() an Error** handle so it can
propagate the error to callers.
Reviewed-by: Fam Zheng <fam@euphon.net>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-7-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 71e3038c1500e2d6075b306f26d565f982287756
https://github.com/qemu/qemu/commit/71e3038c1500e2d6075b306f26d565f982287756
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Extract qemu_vfio_water_mark_reached()
Extract qemu_vfio_water_mark_reached() for readability,
and have it provide an error hint it its Error* handle.
Suggested-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-8-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 453095e98dc2cefba81dae800614f136f3c1c341
https://github.com/qemu/qemu/commit/453095e98dc2cefba81dae800614f136f3c1c341
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Use error_setg in qemu_vfio_find_[fixed/temp]_iova
Both qemu_vfio_find_fixed_iova() and qemu_vfio_find_temp_iova()
return an errno which is unused (or overwritten). Have them propagate
eventual errors to callers, returning a boolean (which is what the
Error API recommends, see commit e3fe3988d78 "error: Document Error
API usage rules" for rationale).
Suggested-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-9-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 5a4f1626e307024765f7e5b45f5884e34a27d968
https://github.com/qemu/qemu/commit/5a4f1626e307024765f7e5b45f5884e34a27d968
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Simplify qemu_vfio_dma_map() returning directly
To simplify qemu_vfio_dma_map():
- reduce 'ret' (returned value) scope by returning errno directly,
- remove the goto 'out' label.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-10-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: f38b376d421dcb35027e6d9bf852b4091dc87d83
https://github.com/qemu/qemu/commit/f38b376d421dcb35027e6d9bf852b4091dc87d83
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M util/vfio-helpers.c
Log Message:
-----------
util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error
Pass qemu_vfio_do_mapping() an Error* argument so it can propagate
any error to callers. Replace error_report() which only report
to the monitor by the more generic error_setg_errno().
Reviewed-by: Fam Zheng <fam@euphon.net>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-11-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: 9bd2788f49c331b02372cc257b11e4c984d39708
https://github.com/qemu/qemu/commit/9bd2788f49c331b02372cc257b11e4c984d39708
Author: Philippe Mathieu-Daudé <philmd@redhat.com>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M block/nvme.c
Log Message:
-----------
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>
Commit: f9128631fbeb40a55f7bc145397981c963d40909
https://github.com/qemu/qemu/commit/f9128631fbeb40a55f7bc145397981c963d40909
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-09-07 (Tue, 07 Sep 2021)
Changed paths:
M block/nvme.c
M block/trace-events
M include/qemu/vfio-helpers.h
M util/vfio-helpers.c
Log Message:
-----------
Merge remote-tracking branch
'remotes/stefanha-gitlab/tags/block-pull-request' into staging
Pull request
Userspace NVMe driver patches.
# gpg: Signature made Tue 07 Sep 2021 09:13:57 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha-gitlab/tags/block-pull-request:
block/nvme: Only report VFIO error on failed retry
util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error
util/vfio-helpers: Simplify qemu_vfio_dma_map() returning directly
util/vfio-helpers: Use error_setg in qemu_vfio_find_[fixed/temp]_iova
util/vfio-helpers: Extract qemu_vfio_water_mark_reached()
util/vfio-helpers: Pass Error handle to qemu_vfio_dma_map()
block/nvme: Have nvme_create_queue_pair() report errors consistently
util/vfio-helpers: Remove unreachable code in qemu_vfio_dma_map()
util/vfio-helpers: Replace qemu_mutex_lock() calls with QEMU_LOCK_GUARD
util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report()
block/nvme: Use safer trace format string
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/a61c30b8c8c3...f9128631fbeb