Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-07 Thread Stefan Hajnoczi
On Mon, Apr 7, 2025 at 12:00 PM Kevin Wolf wrote: > > Originally, all failed SG_IO requests called scsi_handle_rw_error() to > apply the configured error policy. However, commit f3126d65, which was > supposed to be a mere refactoring for scsi-disk.c, broke this and > accidentally completed the SCS

Re: [PATCH v2 1/2] qapi: synchronize jobs and block-jobs documentation

2025-04-07 Thread Vladimir Sementsov-Ogievskiy
On 07.04.25 18:28, Eric Blake wrote: On Fri, Apr 04, 2025 at 10:31:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: Actualize documentation and synchronize it for commands which actually call the same functions internally. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json |

[PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-07 Thread Kevin Wolf
Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without considering the error policy any more if th

[PATCH v6] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-07 Thread Pinku Deb Nath
Full Unit Access (FUA) is an optimization where a disk write with the flag set will be persisted to disk immediately instead of potentially remaining in the disk's write cache. This commit address the todo task for using pwritev2() with RWF_DSYNC in the thread pool section of raw_co_prw(), if pwri

Re: [PATCH v2 2/2] qapi/block-core: derpecate some block-job- APIs

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 10:31:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: In the subject line: s/derpecate/deprecate/ > For change, pause, resume, complete, dismiss and finalize actions > corresponding job- and block-job commands are almost equal. The > difference is in find_block_job_locked(

Re: [PATCH v2 1/2] qapi: synchronize jobs and block-jobs documentation

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 10:31:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Actualize documentation and synchronize it for commands which actually > call the same functions internally. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qapi/block-core.json | 59 +

[PATCH 01/10] various: Fix type conflict of GLib function pointers

2025-04-07 Thread Kohei Tokunaga
On emscripten, function pointer casts can cause function call failure. This commit fixes the function definition to match to the type of the function call. - qtest_set_command_cb passed to g_once should match to GThreadFunc - object_class_cmp and cpreg_key_compare are passed to g_list_sort as GC

Re: [PATCH 00/11] qapi: Documentation improvements

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 02:14:02PM +0200, Markus Armbruster wrote: > Markus Armbruster (11): > docs/devel/qapi-code-gen: Tidy up whitespace > qapi/rocker: Tidy up query-rocker-of-dpa-flows example > docs/interop: Delete "QEMU Guest Agent Protocol Reference" TOC > docs/interop: Sanitize QMP

Re: [PATCH 06/11] docs/sphinx/qmp_lexer: Generalize elision syntax

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 02:14:08PM +0200, Markus Armbruster wrote: > Accept "... lorem ipsum ..." in addition to "...". > > Signed-off-by: Markus Armbruster > --- > @@ -1062,7 +1064,7 @@ For example:: ># "device": "ide0-hd0", ># ... ># } > - #

Re: [PATCH 02/11] qapi/rocker: Tidy up query-rocker-of-dpa-flows example

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 02:14:04PM +0200, Markus Armbruster wrote: > The command can return any number of RockerOfDpaFlow objects. The > example shows it returning exactly two, with the second objecy's object's > members elided. Tweak it so it elides elements after the first > instead. > --

[PATCH 00/10] Enable QEMU to run on browsers

2025-04-07 Thread Kohei Tokunaga
This patch series enables QEMU's system emulator to run in a browser using Emscripten. It includes implementations and workarounds to address browser environment limitations, as shown in the following. # New TCG Backend for Browsers A new TCG backend translates IR instructions into Wasm instructi

[PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-07 Thread Kohei Tokunaga
Emscripten's fiber does not support submitting coroutines to other threads. So this commit modifies hw/9pfs/coth.h to disable this behavior when compiled with Emscripten. Signed-off-by: Kohei Tokunaga --- fsdev/file-op-9p.h | 3 +++ fsdev/meson.build | 2 +- hw/9pfs/9p-util-stub.c | 4

[PATCH 09/10] gitlab: Enable CI for wasm build

2025-04-07 Thread Kohei Tokunaga
Add GitLab CI job that builds QEMU using emscripten. The build runs in the added Dockerfile that contains dependencies (glib, libffi, pixman, zlib) compiled by emscripten. Signed-off-by: Kohei Tokunaga --- .gitlab-ci.d/buildtest-template.yml | 27 .gitlab-ci.d/buildtest.yml

[PATCH 04/10] util: Add coroutine backend for emscripten

2025-04-07 Thread Kohei Tokunaga
Emscripten does not support couroutine methods currently used by QEMU but provides a coroutine implementation called "fiber". This commit introduces a coroutine backend using fiber. Note that fiber does not support submitting coroutines to other threads. Signed-off-by: Kohei Tokunaga --- util/co

[PATCH 05/10] meson: Add wasm build in build scripts

2025-04-07 Thread Kohei Tokunaga
has_int128_type is set to false on emscripten as of now to avoid errors by libffi. And tests aren't integrated with Wasm execution environment as of now so this commit disables tests. Signed-off-by: Kohei Tokunaga --- configs/meson/emscripten.txt | 6 ++ configure | 7

[PATCH 06/10] include/exec: Allow using 64bit guest addresses on emscripten

2025-04-07 Thread Kohei Tokunaga
To enable 64-bit guest support in Wasm 32bit memory model today, it was necessary to partially revert recent changes that removed support for different pointer widths between the host and guest (e.g., commits a70af12addd9060fdf8f3dbd42b42e3072c3914f and bf455ec50b6fea15b4d2493059365bf94c706273) whe

[PATCH 10/10] MAINTAINERS: Update MAINTAINERS file for wasm-related files

2025-04-07 Thread Kohei Tokunaga
Signed-off-by: Kohei Tokunaga --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d54b5578f8..ea5fde475c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3903,6 +3903,17 @@ F: tcg/tci/ F: tcg/tci.c F: disas/tci.c +WebAssembly TCG targ

[PATCH 03/10] util/mmap-alloc: Add qemu_ram_mmap implementation for emscripten

2025-04-07 Thread Kohei Tokunaga
Signed-off-by: Kohei Tokunaga --- util/mmap-alloc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index ed14f9c64d..91f33682e8 100644 --- a/util/mmap-alloc.c +++ b/util/mmap-alloc.c @@ -145,6 +145,7 @@ static bool map_noreserve_effec

[PATCH 02/10] various: Define macros for dependencies on emscripten

2025-04-07 Thread Kohei Tokunaga
Signed-off-by: Kohei Tokunaga --- block/file-posix.c| 18 ++ include/qemu/cacheflush.h | 3 ++- os-posix.c| 5 + util/cacheflush.c | 3 ++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.

Re: [PATCH 14/15] fuse: Implement multi-threading

2025-04-07 Thread Stefan Hajnoczi
On Fri, Apr 04, 2025 at 02:49:08PM +0200, Hanna Czenczek wrote: > On 27.03.25 16:55, Stefan Hajnoczi wrote: > > On Tue, Mar 25, 2025 at 05:06:54PM +0100, Hanna Czenczek wrote: > > > FUSE allows creating multiple request queues by "cloning" /dev/fuse FDs > > > (via open("/dev/fuse") + ioctl(FUSE_DEV

Re: [PATCH v5] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-07 Thread Stefan Hajnoczi
On Sat, Apr 05, 2025 at 04:52:29PM -0700, Pinku Deb Nath wrote: > Full Unit Access (FUA) is an optimization where a disk write with the > flag set will be persisted to disk immediately instead of potentially > remaining in the disk's write cache. > > This commit address the todo task > for using p

RE: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller

2025-04-07 Thread Kane Chen
Hi Cédric, Thank you for your comments and suggestions. I’ll start by reviewing the changes in commit ebc29e1beab0. At the moment, I don’t have another example of a device that is accessed through an external bus, but I’ll look into it and see what I can find. Best Regards, Kane > -Original

RE: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller

2025-04-07 Thread Kane Chen
Hi Cédric/Philippe, OTP (One-Time Programmable) memory is a type of non-volatile memory in which each bit can be programmed only once. It is typically used to store critical and permanent information, such as the chip ID and secure boot keys. The structure and behavior of OTP memory are consistent

Re: [PATCH v4 3/3] vhost-user: return failure if backend crash when live migration

2025-04-07 Thread Haoqian He
> 2025年4月4日 05:15,Michael S. Tsirkin 写道: > > On Tue, Apr 01, 2025 at 11:18:17AM -0400, Haoqian He wrote: >> Live migration should be terminated if the vhost-user backend crashes >> before the migration completes. >> >> Specifically, since the vhost device will be stopped when VM is stopped >>

Re: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller

2025-04-07 Thread Cédric Le Goater
Hello Kane, + Markus (for ebc29e1beab0 implementation) On 4/7/25 09:33, Kane Chen wrote: Hi Cédric/Philippe, OTP (One-Time Programmable) memory is a type of non-volatile memory in which each bit can be programmed only once. It is typically used to store critical and permanent information, such