Re: [PATCH v3 00/10] hw/dma: Use dma_addr_t type definition when relevant

2022-01-11 Thread Peter Xu
On Tue, Jan 11, 2022 at 07:42:59PM +0100, Philippe Mathieu-Daudé wrote: > Since v2: > - Split meson patch restricting fw_cfg (Richard) > - Reorder pci_dma_map() docstring (Peter, Richard) > - Move QEMUSGList in previous patch (David) > - Have dma_buf_read/dma_buf_write return dma_addr_t (Peter) >

Re: [PATCH v2 3/4] scripts/qapi-gen.py: add --add-trace-points option

2022-01-11 Thread John Snow
On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy wrote: > > Add and option to generate trace points. We should generate both trace > points and trace-events files for further trace point code generation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Philippe

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-11 Thread John Snow
On Tue, Jan 11, 2022 at 6:53 PM John Snow wrote: > > On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy > wrote: > > > > Add possibility to generate trace points for each qmp command. > > > > We should generate both trace points and trace-events file, for further > > trace point code

Re: [PATCH v2 2/4] scripts/qapi/commands: gen_commands(): add add_trace_points argument

2022-01-11 Thread John Snow
On Thu, Dec 23, 2021 at 6:08 AM Vladimir Sementsov-Ogievskiy wrote: > > Add possibility to generate trace points for each qmp command. > > We should generate both trace points and trace-events file, for further > trace point code generation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > ---

Re: [PATCH v2 1/4] jobs: drop qmp_ trace points

2022-01-11 Thread John Snow
On Mon, Jan 10, 2022 at 11:06 AM Stefan Hajnoczi wrote: > > On Thu, Dec 23, 2021 at 12:07:53PM +0100, Vladimir Sementsov-Ogievskiy wrote: > > diff --git a/block/trace-events b/block/trace-events > > index 549090d453..5be3e3913b 100644 > > --- a/block/trace-events > > +++ b/block/trace-events > >

Re: [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it

2022-01-11 Thread Philippe Mathieu-Daudé
On 22/12/21 16:36, Thomas Huth wrote: The lsi53c895a SCSI controller might have been disabled in the target binary, so let's check for its availability first before using it. Signed-off-by: Thomas Huth --- tests/qtest/hd-geo-test.c | 8 +--- 1 file changed, 5 insertions(+), 3

Re: [PATCH] tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it

2022-01-11 Thread John Snow
On Wed, Dec 22, 2021 at 10:36 AM Thomas Huth wrote: > > The lsi53c895a SCSI controller might have been disabled in the target > binary, so let's check for its availability first before using it. > > Signed-off-by: Thomas Huth > --- > tests/qtest/hd-geo-test.c | 8 +--- > 1 file changed, 5

Re: [PATCH] nbd/server.c: Remove unused field

2022-01-11 Thread Philippe Mathieu-Daudé
On 1/11/22 20:43, Nir Soffer wrote: > NBDRequestData struct has unused QSIMPLEQ_ENTRY filed. It seems that > this field exists since the first git commit and was never used. > > Signed-off-by: Nir Soffer > --- > nbd/server.c | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Philippe

[PATCH] nbd/server.c: Remove unused field

2022-01-11 Thread Nir Soffer
NBDRequestData struct has unused QSIMPLEQ_ENTRY filed. It seems that this field exists since the first git commit and was never used. Signed-off-by: Nir Soffer --- nbd/server.c | 1 - 1 file changed, 1 deletion(-) diff --git a/nbd/server.c b/nbd/server.c index 3927f7789d..ce5b2a1d02 100644 ---

[PATCH v3 09/10] hw/dma: Move ScatterGatherEntry / QEMUSGList declarations around

2022-01-11 Thread Philippe Mathieu-Daudé
In the next commit we will use the dma_addr_t type in the QEMUSGList structure. Since currently dma_addr_t is defined after QEMUSGList, move the declarations to have dma_addr_t defined first. This is a pure code-movement patch. Suggested-by: David Hildenbrand Signed-off-by: Philippe

[PATCH v3 05/10] hw/dma: Remove CONFIG_USER_ONLY check

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé DMA API should not be included in user-mode emulation. If so, build should fail. Remove the CONFIG_USER_ONLY check. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v2 0/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-11 Thread Philippe Mathieu-Daudé
On 1/6/22 12:08, Michael S. Tsirkin wrote: > On Tue, Jan 04, 2022 at 09:54:22AM +0100, Philippe Mathieu-Daudé wrote: >> Since v1: >> - Addressed David review comment (stick to dma_addr_t type) >> - Addressed Peter review comment (incorrect doc string) > > > PCI things: > > Reviewed-by: Michael

[PATCH v3 04/10] hw/pci: Document pci_dma_map()

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci/pci.h | 12 1 file changed, 12 insertions(+) diff --git a/include/hw/pci/pci.h

[PATCH v3 00/10] hw/dma: Use dma_addr_t type definition when relevant

2022-01-11 Thread Philippe Mathieu-Daudé
Since v2: - Split meson patch restricting fw_cfg (Richard) - Reorder pci_dma_map() docstring (Peter, Richard) - Move QEMUSGList in previous patch (David) - Have dma_buf_read/dma_buf_write return dma_addr_t (Peter) - Drop 'propagate MemTxResult' patch (David) - Added R-b tags Since v1: - Addressed

[PATCH v3 02/10] hw/nvram: Restrict fw_cfg QOM interface to sysemu and tools

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé fw_cfg QOM interface is required by system emulation and qemu-storage-daemon. User-mode emulation doesn't need it. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/nvram/meson.build | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH v3 10/10] hw/dma: Use dma_addr_t type definition when relevant

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Update the obvious places where dma_addr_t should be used (instead of uint64_t, hwaddr, size_t, int32_t types). This allows to have _addr_t type portable on 32/64-bit hosts. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by:

[PATCH v3 07/10] hw/scsi: Rename SCSIRequest::resid as 'residual'

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The 'resid' field is slightly confusing and could be interpreted as some ID. Rename it as 'residual' which is clearer to review. No logical change. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand Signed-off-by:

[PATCH v3 08/10] hw/dma: Fix format string issues using dma_addr_t

2022-01-11 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c| 2 +- hw/rdma/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 205dfdc6622..6c727dd0c08 100644

[PATCH v3 06/10] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Various APIs use 'pval' naming for 'pointer to val'. rdma_pci_dma_map() uses 'plen' for 'PCI length', but since 'PCI' is already explicit in the function name, simplify and rename the argument 'len'. No logical change. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v3 03/10] hw/pci: Restrict pci-bus stub to sysemu

2022-01-11 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Neither tools nor user-mode emulation require the PCI bus stub. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Reviewed-by: David Hildenbrand Signed-off-by: Philippe Mathieu-Daudé --- stubs/meson.build | 2

[PATCH v3 01/10] stubs: Restrict fw_cfg to system emulation

2022-01-11 Thread Philippe Mathieu-Daudé
fw_cfg_arch_key_name() stub is only required for sysemu. Signed-off-by: Philippe Mathieu-Daudé --- stubs/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/meson.build b/stubs/meson.build index 71469c1d50a..363f6fa785d 100644 --- a/stubs/meson.build +++

Re: [PATCH v3 0/3] block: Minor vhost-user-blk fixes

2022-01-11 Thread Kevin Wolf
Am 07.01.2022 um 11:54 hat Philippe Mathieu-Daudé geschrieben: > - Add vhost-user-blk help to qemu-storage-daemon, > - Do not list vhost-user-blk in BlockExportType when > CONFIG_VHOST_USER_BLK_SERVER is disabled. Thanks, applied to the block branch. Kevin

Re: [PATCH v2] block-backend: prevent dangling BDS pointers across aio_poll()

2022-01-11 Thread Stefan Hajnoczi
On Mon, Jan 10, 2022 at 07:57:05PM +0100, Hanna Reitz wrote: > On 14.12.21 15:35, Stefan Hajnoczi wrote: > > The BlockBackend root child can change when aio_poll() is invoked. This > > happens when a temporary filter node is removed upon blockjob > > completion, for example. > > > > Functions in

[PATCH v3 1/2] block-backend: prevent dangling BDS pointers across aio_poll()

2022-01-11 Thread Stefan Hajnoczi
The BlockBackend root child can change when aio_poll() is invoked. This happens when a temporary filter node is removed upon blockjob completion, for example. Functions in block/block-backend.c must be aware of this when using a blk_bs() pointer across aio_poll() because the BlockDriverState

[PATCH v3 2/2] iotests/stream-error-on-reset: New test

2022-01-11 Thread Stefan Hajnoczi
From: Hanna Reitz Test the following scenario: - Simple stream block in two-layer backing chain (base and top) - The job is drained via blk_drain(), then an error occurs while the job settles the ongoing request - And so the job completes while in blk_drain() This was reported as a segfault,

[PATCH v3 0/2] block-backend: prevent dangling BDS pointers across aio_poll()

2022-01-11 Thread Stefan Hajnoczi
This series fixes use-after-free bugs when blk->root changes across aio_poll(). For example, a temporary filter node can be removed by a blockjob when a drained section begins. If the caller doesn't hold a ref on the BDS then it will have been freed. Hanna Reitz (1):

Re: [PATCH 1/1] hw/usb: pacify xhciwmi.exe warning

2022-01-11 Thread Yan Vugenfirer
On Tue, Jan 11, 2022 at 3:20 PM Denis V. Lunev wrote: > On 12/23/21 12:54 PM, Denis V. Lunev wrote: > > xhciwmi.exe is used inside Windows 2022 SVVP tests. This tool called as > > 'xhciwmi.exe --verify' reports that 'The firmware loaded on this > > controller has known bugs and/or compatibility

Re: [PULL 0/2] SD/MMC patches for 2022-01-08

2022-01-11 Thread Peter Maydell
On Sat, 8 Jan 2022 at 21:59, Philippe Mathieu-Daudé wrote: > > Hi Richard, > > This is the SD/MMC PR that ought to be sent previously. > > The following changes since commit b5a3d8bc9146ba22a25116cb748c97341bf99737: > > Merge tag 'pull-misc-20220103' of https://gitlab.com/rth7680/qemu into >

Re: [PATCH 1/1] hw/usb: pacify xhciwmi.exe warning

2022-01-11 Thread Denis V. Lunev
On 12/23/21 12:54 PM, Denis V. Lunev wrote: > xhciwmi.exe is used inside Windows 2022 SVVP tests. This tool called as > 'xhciwmi.exe --verify' reports that 'The firmware loaded on this > controller has known bugs and/or compatibility issues'. This is just > a warning but there is no particular

Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-01-11 Thread Christian Schoenebeck
On Dienstag, 11. Januar 2022 13:35:05 CET Christian Schoenebeck wrote: > Curiousity was stronger: the original clang behaviour was as I explained: > https://github.com/llvm-mirror/clang/commit/0a0d2b179085a52c10402feebeb6db8b >

Re: [RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-01-11 Thread Christian Schoenebeck
On Montag, 10. Januar 2022 22:05:43 CET Christian Schoenebeck wrote: > On Montag, 10. Januar 2022 21:39:28 CET Akihiko Odaki wrote: > > On 2022/01/11 5:22, Christian Schoenebeck wrote: > > > On Montag, 10. Januar 2022 20:01:40 CET Akihiko Odaki wrote: > > >> On 2022/01/11 3:46, Christian

[PATCH] Fix null pointer dereference in util/fdmon-epoll.c

2022-01-11 Thread Daniella Lee
Orginal qemu commit hash: de3f5223fa4cf8bfc5e3fe1fd495ddf468edcdf7 In util/fdmon-epoll.c, function fdmon_epoll_update, variable "old_node" maybe NULL with the condition, while it is directly used in the statement and may lead to null pointer dereferencen problem. Variable "r" in the condition is

Re: [PULL 0/2] SD/MMC patches for 2022-01-08

2022-01-11 Thread Peter Maydell
On Mon, 10 Jan 2022 at 19:20, Philippe Mathieu-Daudé wrote: > > On 1/10/22 17:02, Peter Maydell wrote: > > On Sat, 8 Jan 2022 at 21:59, Philippe Mathieu-Daudé wrote: > >> > >> Hi Richard, > >> > >> This is the SD/MMC PR that ought to be sent previously. > >> > >> The following changes since

Re: [PATCH 2/2] block/rbd: workaround for ceph issue #53784

2022-01-11 Thread Stefano Garzarella
Hi Peter, On Tue, Jan 11, 2022 at 10:10:16AM +0100, Peter Lieven wrote: Hi Stefano, thanks for the feedback. Please note that you also need the other patch or you will sooner or later run into another assertion as soon as rbd snapshots are involved. Yep, I tested with the entire series

Re: [PATCH v2] block-backend: prevent dangling BDS pointers across aio_poll()

2022-01-11 Thread Stefan Hajnoczi
On Wed, Dec 15, 2021 at 04:31:26PM +0100, Kevin Wolf wrote: > Am 15.12.2021 um 12:28 hat Stefan Hajnoczi geschrieben: > > On Tue, Dec 14, 2021 at 03:59:49PM +0100, Kevin Wolf wrote: > > > Am 14.12.2021 um 15:35 hat Stefan Hajnoczi geschrieben: > > > > The BlockBackend root child can change when

Re: [PATCH v2 1/9] hw/nvram: Restrict stub to sysemu and tools

2022-01-11 Thread Philippe Mathieu-Daudé
On 1/7/22 01:17, Richard Henderson wrote: > On 1/4/22 12:54 AM, Philippe Mathieu-Daudé wrote: >> +if have_system or have_tools > ... >>   if have_system >> +  stub_ss.add(files('fw_cfg.c')) > > Disconnect in tests? (I assume s/tests/stubs/). fw_cfg-interface.c exposes the fw_cfg QOM interface,

[PATCH 0/1 v2] Patch to adjust coroutine pool size adaptively

2022-01-11 Thread Hiroki Narukawa
Resending patch with fixing atomic access method to use qatomic_read(). We encountered random disk IO performance drop since qemu-5.0.0, and this patch fixes it. Commit message in c740ad92 implied to adjust coroutine pool size adaptively, so I tried to implement this. Could you review this

[PATCH 1/1] util: adjust coroutine pool size to virtio block queue

2022-01-11 Thread Hiroki Narukawa
Coroutine pool size was 64 from long ago, and the basis was organized in the commit message in c740ad92. At that time, virtio-blk queue-size and num-queue were not configuable, and equivalent values were 128 and 1. Coroutine pool size 64 was fine then. Later queue-size and num-queue got

Re: [PATCH 2/2] block/rbd: workaround for ceph issue #53784

2022-01-11 Thread Peter Lieven
Am 10.01.22 um 15:18 schrieb Stefano Garzarella: > On Mon, Jan 10, 2022 at 12:41:54PM +0100, Peter Lieven wrote: >> librbd had a bug until early 2022 that affected all versions of ceph that >> supported fast-diff. This bug results in reporting of incorrect offsets >> if the offset parameter to