Re: [PATCH v3 6/6] sysemu/replay: Restrict icount to system emulation

2023-12-08 Thread Richard Henderson
On 12/8/23 03:35, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpu-timers.h | 2 +- include/sysemu/replay.h | 11 --- stubs/icount.c | 19 --- 3 files changed, 9 insertions(+), 23 deletions(-) Reviewed-by:

Re: [PATCH v3 5/6] util/async: Only call icount_notify_exit() if icount is enabled

2023-12-08 Thread Richard Henderson
On 12/8/23 03:35, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/icount-common.c | 4 +++- stubs/icount.c| 2 +- util/async.c | 16 +--- 3 files changed, 13 insertions(+), 9 deletions(-) Reviewed-by: Richard

Re: [PATCH v3 4/6] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2023-12-08 Thread Richard Henderson
On 12/8/23 03:35, Philippe Mathieu-Daudé wrote: pmu_init() register its event checking the pm_event::supported() handler. For INST_RETIRED, the event is only registered and the bit enabled in the PMU Common Event Identification register when icount is enabled as ICOUNT_PRECISE. PMU events are

Re: [PATCH v3 2/6] system/vl: Evaluate icount after accelerator options are parsed

2023-12-08 Thread Richard Henderson
On 12/8/23 03:35, Philippe Mathieu-Daudé wrote: We need to parse the accelerators first, to be able to check whether TCG is enabled or not. Then we can parse the -icount option. This allows removing the icount_configure() stub. Fixes: 7f8b6126e7 ("vl: move icount configuration earlier")

Re: [PATCH v3 1/6] sysemu/cpu-timers: Have icount_configure() return a boolean

2023-12-08 Thread Richard Henderson
On 12/8/23 03:35, Philippe Mathieu-Daudé wrote: Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have icount_configure() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 0/3] Support for Zoned UFS

2023-12-08 Thread Daejun Park
This patch enables zoned support for UFS devices. By applying this patch, a QEMU run can use parameters to configure whether each LU of each UFS is zoned, and the capacity, size, and max open zones. Zoned UFS is implemented by referencing ZBC2. (https://www.t10.org/members/w_zbc2.htm) Daejun

Re: [PATCH v2 2/5] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2023-12-08 Thread Philippe Mathieu-Daudé
On 8/12/23 12:23, Philippe Mathieu-Daudé wrote: Hi Peter, On 8/12/23 11:59, Peter Maydell wrote: On Fri, 8 Dec 2023 at 10:36, Philippe Mathieu-Daudé wrote: On 7/12/23 23:12, Richard Henderson wrote: On 12/7/23 07:45, Philippe Mathieu-Daudé wrote: pmu_init() register its event checking the

Re: [PATCH v3 3/6] sysemu/cpu-timers: Introduce ICountMode enumerator

2023-12-08 Thread Philippe Mathieu-Daudé
On 8/12/23 12:35, Philippe Mathieu-Daudé wrote: Rather than having to lookup for what the 0, 1, 2, ... icount values are, use a enum definition. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpu-timers.h | 20 +--- accel/tcg/icount-common.c | 16 +++-

[PATCH for-8.2] block: Fix AioContext locking in qmp_block_resize()

2023-12-08 Thread Kevin Wolf
The AioContext must be unlocked before calling blk_co_unref(), because it takes the AioContext lock internally in blk_unref_bh(), which is scheduled in the main thread. If we don't unlock, the AioContext is locked twice and nested event loops such as in bdrv_graph_wrlock() will deadlock. Cc:

[PATCH v3 3/6] sysemu/cpu-timers: Introduce ICountMode enumerator

2023-12-08 Thread Philippe Mathieu-Daudé
Rather than having to lookup for what the 0, 1, 2, ... icount values are, use a enum definition. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpu-timers.h | 20 +--- accel/tcg/icount-common.c | 16 +++- stubs/icount.c | 2 +-

[PATCH v3 2/6] system/vl: Evaluate icount after accelerator options are parsed

2023-12-08 Thread Philippe Mathieu-Daudé
We need to parse the accelerators first, to be able to check whether TCG is enabled or not. Then we can parse the -icount option. This allows removing the icount_configure() stub. Fixes: 7f8b6126e7 ("vl: move icount configuration earlier") Reported-by: Richard Henderson Signed-off-by: Philippe

[PATCH v3 4/6] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2023-12-08 Thread Philippe Mathieu-Daudé
pmu_init() register its event checking the pm_event::supported() handler. For INST_RETIRED, the event is only registered and the bit enabled in the PMU Common Event Identification register when icount is enabled as ICOUNT_PRECISE. PMU events are TCG-only, hardware accelerators handle them

[PATCH v3 0/6] sysemu/replay: Restrict icount to TCG system emulation

2023-12-08 Thread Philippe Mathieu-Daudé
Slightly simplify non-TCG and user emulation code. This series still adds assertions in ARM INST_RETIRED PMU events, in order to bypass a linking failure. Better would be to restrict ARM PMU events to TCG. Left for another series. Since v2: - Have icount_configure() return bool - Addressed rth's

[PATCH v3 6/6] sysemu/replay: Restrict icount to system emulation

2023-12-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpu-timers.h | 2 +- include/sysemu/replay.h | 11 --- stubs/icount.c | 19 --- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/include/sysemu/cpu-timers.h

[PATCH v3 5/6] util/async: Only call icount_notify_exit() if icount is enabled

2023-12-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/icount-common.c | 4 +++- stubs/icount.c| 2 +- util/async.c | 16 +--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index

[PATCH v3 1/6] sysemu/cpu-timers: Have icount_configure() return a boolean

2023-12-08 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have icount_configure() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpu-timers.h | 10 --

Re: [PATCH v2 2/5] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2023-12-08 Thread Philippe Mathieu-Daudé
Hi Peter, On 8/12/23 11:59, Peter Maydell wrote: On Fri, 8 Dec 2023 at 10:36, Philippe Mathieu-Daudé wrote: On 7/12/23 23:12, Richard Henderson wrote: On 12/7/23 07:45, Philippe Mathieu-Daudé wrote: pmu_init() register its event checking the pm_event::supported() handler. For INST_RETIRED,

Re: [PATCH v2 4/5] system/vl: Restrict icount to TCG emulation

2023-12-08 Thread Philippe Mathieu-Daudé
On 7/12/23 23:38, Richard Henderson wrote: On 12/7/23 07:45, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   stubs/icount.c | 6 --   system/vl.c    | 6 +-   2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/stubs/icount.c b/stubs/icount.c index

Re: [PATCH v2 2/5] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2023-12-08 Thread Peter Maydell
On Fri, 8 Dec 2023 at 10:36, Philippe Mathieu-Daudé wrote: > > On 7/12/23 23:12, Richard Henderson wrote: > > On 12/7/23 07:45, Philippe Mathieu-Daudé wrote: > >> pmu_init() register its event checking the pm_event::supported() > >> handler. For INST_RETIRED, the event is only registered and the

Re: [PATCH v2 2/5] target/arm: Ensure icount is enabled when emulating INST_RETIRED

2023-12-08 Thread Philippe Mathieu-Daudé
On 7/12/23 23:12, Richard Henderson wrote: On 12/7/23 07:45, Philippe Mathieu-Daudé wrote: pmu_init() register its event checking the pm_event::supported() handler. For INST_RETIRED, the event is only registered and the bit enabled in the PMU Common Event Identification register when icount is

Re: [PULL 29/32] virtio-blk: implement BlockDevOps->drained_begin()

2023-12-08 Thread Kevin Wolf
Am 07.12.2023 um 16:22 hat Fiona Ebner geschrieben: > Am 03.11.23 um 14:12 schrieb Fiona Ebner: > > Hi, > > > > I ran into a strange issue where guest IO would get completely stuck > > during certain block jobs a while ago and finally managed to find a > > small reproducer [0]. I'm using a VM