Re: building qemu on a system with libxkbcommon installed but not xkeyboard-config produces an core dump

2024-02-05 Thread Zhang Wen
> So how the problem manifests itself? What the actual error message is? > You mentioned some segfault iirc, care to share some details? I'm doing a rebuild, and will attach the error message and coredump file here in one or two days. -- Key fingerprint: 419F 72F3 F3A9 36EE 1B72 B00B C1C3 4BD4

Re: [PATCH 1/5] virtio-blk: enforce iothread-vq-mapping validation

2024-02-05 Thread Manos Pitsidianakis
On Mon, 05 Feb 2024 19:26, Stefan Hajnoczi wrote: Hanna Czenczek noticed that the safety of `vq_aio_context[vq->value] = ctx;` with user-defined vq->value inputs is not obvious. The code is structured in validate() + apply() steps so input validation is there, but it happens way earlier and

Re: [PATCH 5/5] monitor: use aio_co_reschedule_self()

2024-02-05 Thread Manos Pitsidianakis
On Mon, 05 Feb 2024 19:26, Stefan Hajnoczi wrote: The aio_co_reschedule_self() API is designed to avoid the race condition between scheduling the coroutine in another AioContext and yielding. The QMP dispatch code uses the open-coded version that appears susceptible to the race condition at

Re: [PATCH 2/5] virtio-blk: clarify that there is at least 1 virtqueue

2024-02-05 Thread Manos Pitsidianakis
On Mon, 05 Feb 2024 19:26, Stefan Hajnoczi wrote: It is not possible to instantiate a virtio-blk device with 0 virtqueues. The following check is located in ->realize(): if (!conf->num_queues) { error_setg(errp, "num-queues property must be larger than 0"); return; } Later on we

[PULL v3 3/3] oslib-posix: initialize backend memory objects in parallel

2024-02-05 Thread David Hildenbrand
From: Mark Kanda QEMU initializes preallocated backend memory as the objects are parsed from the command line. This is not optimal in some cases (e.g. memory spanning multiple NUMA nodes) because the memory objects are initialized in series. Allow the initialization to occur in parallel

[PULL v3 1/3] hv-balloon: use get_min_alignment() to express 32 GiB alignment

2024-02-05 Thread David Hildenbrand
Let's implement the get_min_alignment() callback for memory devices, and copy for the device memory region the alignment of the host memory region. This mimics what virtio-mem does, and allows for re-introducing proper alignment checks for the memory region size (where we don't care about

Re: [PATCH 3/5] virtio-blk: add vq_rq[] bounds check in virtio_blk_dma_restart_cb()

2024-02-05 Thread Manos Pitsidianakis
On Mon, 05 Feb 2024 19:26, Stefan Hajnoczi wrote: Hanna Czenczek noted that the array index in virtio_blk_dma_restart_cb() is not bounds-checked: g_autofree VirtIOBlockReq **vq_rq = g_new0(VirtIOBlockReq *, num_queues); ... while (rq) { VirtIOBlockReq *next = rq->next; uint16_t

[PULL v3 2/3] memory-device: reintroduce memory region size check

2024-02-05 Thread David Hildenbrand
We used to check that the memory region size is multiples of the overall requested address alignment for the device memory address. We removed that check, because there are cases (i.e., hv-balloon) where devices unconditionally request an address alignment that has a very large alignment (i.e.,

[PULL v3 0/3] Host Memory Backends and Memory devices queue 2024-02-06

2024-02-05 Thread David Hildenbrand
The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into staging (2024-02-03 13:31:58 +) are available in the Git repository at: https://github.com/davidhildenbrand/qemu.git

Re: [PULL v2 0/3] Host Memory Backends and Memory devices queue 2024-02-06

2024-02-05 Thread David Hildenbrand
On 06.02.24 08:14, David Hildenbrand wrote: The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into staging (2024-02-03 13:31:58 +) are available in the Git repository at:

Re: [PATCH 4/5] virtio-blk: declare VirtIOBlock::rq with a type

2024-02-05 Thread Manos Pitsidianakis
On Mon, 05 Feb 2024 19:26, Stefan Hajnoczi wrote: The VirtIOBlock::rq field has had the type void * since its introduction in commit 869a5c6df19a ("Stop VM on error in virtio-blk. (Gleb Natapov)"). Perhaps this was done to avoid the forward declaration of VirtIOBlockReq. Hanna Czenczek

[PULL v2 1/3] hv-balloon: use get_min_alignment() to express 32 GiB alignment

2024-02-05 Thread David Hildenbrand
Let's implement the get_min_alignment() callback for memory devices, and copy for the device memory region the alignment of the host memory region. This mimics what virtio-mem does, and allows for re-introducing proper alignment checks for the memory region size (where we don't care about

[PULL v2 0/3] Host Memory Backends and Memory devices queue 2024-02-06

2024-02-05 Thread David Hildenbrand
The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into staging (2024-02-03 13:31:58 +) are available in the Git repository at: https://github.com/davidhildenbrand/qemu.git

Re: [PULL 0/3] Host Memory Backends and Memory devices queue 2024-02-6

2024-02-05 Thread David Hildenbrand
On 06.02.24 08:02, David Hildenbrand wrote: The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into staging (2024-02-03 13:31:58 +) are available in the Git repository at:

Re: building qemu on a system with libxkbcommon installed but not xkeyboard-config produces an core dump

2024-02-05 Thread Michael Tokarev
06.02.2024 09:35, Zhang Wen: ... I'm so sorry for the misspelling in my initial post and the confusion caused by that. That's no problem, things happen. I'm building my own system following the Linux From Scratch package, which is at https://www.linuxfromscratch.org. I accidently built

[PULL 0/3] Host Memory Backends and Memory devices queue 2024-02-6

2024-02-05 Thread David Hildenbrand
The following changes since commit 39a6e4f87e7b75a45b08d6dc8b8b7c2954c87440: Merge tag 'pull-qapi-2024-02-03' of https://repo.or.cz/qemu/armbru into staging (2024-02-03 13:31:58 +) are available in the Git repository at: https://github.com/davidhildenbrand/qemu.git tags/mem-2024-02-06

[PULL 1/3] hv-balloon: use get_min_alignment() to express 32 GiB alignment

2024-02-05 Thread David Hildenbrand
Let's implement the get_min_alignment() callback for memory devices, and copy for the device memory region the alignment of the host memory region. This mimics what virtio-mem does, and allows for re-introducing proper alignment checks for the memory region size (where we don't care about

Re: building qemu on a system with libxkbcommon installed but not xkeyboard-config produces an core dump

2024-02-05 Thread Zhang Wen
Peter Maydell 于2024年2月1日周四 20:57写道: > > On Thu, 1 Feb 2024 at 12:50, Michael Tokarev wrote: > > > > 01.02.2024 15:11, Michael Tokarev wrote: > > > 31.01.2024 11:13, Zhang Wen: > > >> With this patch, qemu requires keyboard-config when libxkbcommon is > > >> found on the system. So if the qemu

[PATCH 1/3] tests/migration-test: Stick with gicv3 in aarch64 test

2024-02-05 Thread peterx
From: Peter Xu Recently we introduced cross-binary migration test. It's always wanted that migration-test uses stable guest ABI for both QEMU binaries in this case, so that both QEMU binaries will be compatible on the migration stream with the cmdline specified. Switch to a static gic version

[PATCH 2/3] ci: Remove tag dependency for build-previous-qemu

2024-02-05 Thread peterx
From: Peter Xu The new build-previous-qemu job relies on QEMU release tag being present, while that may not be always true for personal git repositories since by default tag is not pushed. The job can fail on those CI kicks, as reported by Peter Maydell. Fix it by fetching the tags remotely

[PATCH 3/3] ci: Update comment for migration-compat-aarch64

2024-02-05 Thread peterx
From: Peter Xu It turns out that we may not be able to enable this test even for the upcoming v9.0. Document what we're still missing. Signed-off-by: Peter Xu --- .gitlab-ci.d/buildtest.yml | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml

[PATCH 0/3] ci: Fixes on the recent cross-binary test case

2024-02-05 Thread peterx
From: Peter Xu Hi, This small patchset updates the recent cross-binary test for migration on a few things. Patch 1 modifies the aarch64 test GIC version to 3 rather than "max", paving way for enabling it, even if the CPU model is not yet ready. Patch 2 removes the tag dependency of the new

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Feb 05, 2024 at 12:18:19PM -0500, Stefan Hajnoczi wrote: >> C99 mixed declarations support interleaving of local variable >> declarations and code. >> >> The coding style "generally" forbids C99 mixed declarations with some >> exceptions to the rule. This

Re: [PATCH v2 0/6] migration/multifd: Fix channel creation vs. cleanup races

2024-02-05 Thread Peter Xu
On Mon, Feb 05, 2024 at 04:49:23PM -0300, Fabiano Rosas wrote: > Based-on: 20240202102857.110210-1-pet...@redhat.com > [PATCH v2 00/23] migration/multifd: Refactor ->send_prepare() and cleanups > https://lore.kernel.org/r/20240202102857.110210-1-pet...@redhat.com > > Hi, > > In this v2 I made

Re: [PATCH v2 6/6] migration/multifd: Add a synchronization point for channel creation

2024-02-05 Thread Peter Xu
On Mon, Feb 05, 2024 at 04:49:29PM -0300, Fabiano Rosas wrote: > It is possible that one of the multifd channels fails to be created at > multifd_new_send_channel_async() while the rest of the channel > creation tasks are still in flight. > > This could lead to multifd_save_cleanup() executing

Re: [PATCH v2 5/6] migration/multifd: Unify multifd and TLS connection paths

2024-02-05 Thread Peter Xu
On Mon, Feb 05, 2024 at 04:49:28PM -0300, Fabiano Rosas wrote: > During multifd channel creation (multifd_send_new_channel_async) when > TLS is enabled, the multifd_channel_connect function is called twice, > once to create the TLS handshake thread and another time after the > asynchrounous TLS

RE: [PATCH v0 1/2] aspeed: support uart controller both 0 and 1 base

2024-02-05 Thread Jamin Lin
> -Original Message- > The uart definitions on the AST2700 are different : > > > https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v6.6/arch/arm > 64/boot/dts/aspeed/aspeed-g7.dtsi > > serial0 = > serial1 = > serial2 = > serial3 = > serial4 =

[PULL v2 38/39] tcg/s390x: Support TCG_COND_TST{EQ,NE}

2024-02-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.h | 2 +- tcg/s390x/tcg-target.c.inc | 139 + 2 files changed, 97 insertions(+), 44 deletions(-) diff --git a/tcg/s390x/tcg-target.h b/tcg/s390x/tcg-target.h index 53bed8c8d2..ae448c3a3a 100644

[PULL v2 00/39] tcg patch queue

2024-02-05 Thread Richard Henderson
repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20240205-2 for you to fetch changes up to 23c5692abc3917151dee36c00d751cf5bc46ef19: tcg/tci: Support TCG_COND_TST{EQ,NE} (2024-02-05 22:45:41 +) tcg: Introduce

RE: [PATCH v0 1/2] aspeed: support uart controller both 0 and 1 base

2024-02-05 Thread Jamin Lin
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Monday, February 5, 2024 9:16 PM > To: Cédric Le Goater ; Jamin Lin ; > Peter Maydell ; Andrew Jeffery > ; Joel Stanley ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee > Subject: Re: [PATCH v0 1/2]

[PATCH v2 2/6] target/arm: Fix nregs computation in do_ld_zpa

2024-02-05 Thread Richard Henderson
The field is encoded as [0-3], which is convenient for indexing our array of function pointers, but the true value is [1-4]. Adjust before calling do_mem_zpa. Add an assert, and move the comment re passing ZT to the helper back next to the relevant code. Cc: qemu-sta...@nongnu.org Fixes:

[PATCH v2 1/6] linux-user/aarch64: Extend PR_SET_TAGGED_ADDR_CTRL for FEAT_MTE3

2024-02-05 Thread Richard Henderson
When MTE3 is supported, the kernel maps PR_MTE_TCF_ASYNC | PR_MTE_TCF_SYNC to MTE_CTRL_TCF_ASYMM and from there to SCTLR_EL1.TCF0 = 3 There is no error reported for setting ASYNC | SYNC when MTE3 is not supported; the kernel simply selects the ASYNC behavior of TCF0=2. Signed-off-by:

[PATCH v2 6/6] target/arm: Fix SVE/SME gross MTE suppression checks

2024-02-05 Thread Richard Henderson
The TBI and TCMA bits are located within mtedesc, not desc. Signed-off-by: Richard Henderson --- target/arm/tcg/sme_helper.c | 8 target/arm/tcg/sve_helper.c | 12 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/target/arm/tcg/sme_helper.c

[PATCH v2 3/6] target/arm: Adjust and validate mtedesc sizem1

2024-02-05 Thread Richard Henderson
When we added SVE_MTEDESC_SHIFT, we effectively limited the maximum size of MTEDESC. Adjust SIZEM1 to consume the remaining bits (32 - 10 - 5 - 12 == 5). Assert that the data to be stored fits within the field (expecting 8 * 4 - 1 == 31, exact fit). Signed-off-by: Richard Henderson ---

[PATCH v2 4/6] target/arm: Split out make_svemte_desc

2024-02-05 Thread Richard Henderson
Share code that creates mtedesc and embeds within simd_desc. Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.h | 2 ++ target/arm/tcg/translate-sme.c | 15 +++ target/arm/tcg/translate-sve.c | 47 ++ 3 files changed, 31 insertions(+),

Re: [PATCH v2 00/23] migration/multifd: Refactor ->send_prepare() and cleanups

2024-02-05 Thread Peter Xu
queued. -- Peter Xu

[PATCH v2 5/6] target/arm: Handle mte in do_ldrq, do_ldro

2024-02-05 Thread Richard Henderson
These functions "use the standard load helpers", but fail to clean_data_tbi or populate mtedesc. Signed-off-by: Richard Henderson --- target/arm/tcg/translate-sve.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/translate-sve.c

[PATCH v2 0/6] target/arm: assorted mte fixes

2024-02-05 Thread Richard Henderson
The first patch is unchanged from Supercedes: <20240131003557.176486-1-richard.hender...@linaro.org> while the remaining patches replace Supercedes: <20240205023948.25476-1-richard.hender...@linaro.org> While digging through Gustavo's test case, wondering why it should be failing at all, I

Re: [PATCH] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-02-05 Thread Jason Wang
On Mon, Feb 5, 2024 at 6:51 PM Stefano Garzarella wrote: > > On Fri, Feb 02, 2024 at 02:25:21PM +0100, Kevin Wolf wrote: > >VDUSE requires that virtqueues are first enabled before the DRIVER_OK > >status flag is set; with the current API of the kernel module, it is > >impossible to enable the

Re: [PATCH 0/2] migration: Fix return-path thread exit

2024-02-05 Thread Peter Xu
On Mon, Feb 05, 2024 at 10:32:33AM +, Daniel P. Berrangé wrote: > On Fri, Feb 02, 2024 at 05:53:39PM +0800, Peter Xu wrote: > > On Thu, Feb 01, 2024 at 07:48:51PM +0100, Cédric Le Goater wrote: > > > Hello, > > > > Hi, Cédric, > > > > Thanks for the patches. > > > > > > > > Today,

Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine

2024-02-05 Thread maobibo
Hi Thomas, On 2024/2/5 下午3:47, Thomas Huth wrote: On 05/02/2024 03.13, Bibo Mao wrote: The cdrom test skips to execute on LoongArch system with command "make check" Are you sure the test is marked with "skip"? ... it should at least test with the "none" machine...? I check again, cdrom

Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine

2024-02-05 Thread maobibo
Hi Philippe, On 2024/2/5 下午8:58, Philippe Mathieu-Daudé wrote: Hi Bibo, On 5/2/24 03:13, Bibo Mao wrote: The cdrom test skips to execute on LoongArch system with command "make check", this patch enables cdrom test for LoongArch virt machine platform. With this patch, cdrom test passes to run

RE: [PATCH v0 2/2] aspeed: fix hardcode boot address 0

2024-02-05 Thread Jamin Lin
> -Original Message- > From: Cédric Le Goater > Sent: Monday, February 5, 2024 9:34 PM > To: Jamin Lin ; Peter Maydell > ; Andrew Jeffery ; > Joel Stanley ; open list:ASPEED BMCs > ; open list:All patches CC here > > Cc: Troy Lee > Subject: Re: [PATCH v0 2/2] aspeed: fix hardcode boot

[PATCH V2] loongarch: Change the UEFI loading mode to loongarch

2024-02-05 Thread Xianglai Li
The UEFI loading mode in loongarch is very different from that in other architectures:loongarch's UEFI code is in rom, while other architectures' UEFI code is in flash. loongarch UEFI can be loaded as follows: -machine virt,pflash=pflash0-format -bios ./QEMU_EFI.fd Other architectures load UEFI

RE: [PATCH v0 2/2] aspeed: fix hardcode boot address 0

2024-02-05 Thread Jamin Lin
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Monday, February 5, 2024 9:20 PM > To: Jamin Lin ; Cédric Le Goater ; > Peter Maydell ; Andrew Jeffery > ; Joel Stanley ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee > Subject: Re: [PATCH v0 2/2]

Re: [PATCH v2 6/7] vdpa: move iova_tree allocation to net_vhost_vdpa_init

2024-02-05 Thread Si-Wei Liu
Hi Eugenio, I thought this new code looks good to me and the original issue I saw with x-svq=on should be gone. However, after rebase my tree on top of this, there's a new failure I found around setting up guest mappings at early boot, please see attached the specific QEMU config and

[PATCH v2 1/3] Hexagon (target/hexagon) Pass P0 explicitly to helpers that need it

2024-02-05 Thread Taylor Simpson
Rather than reading P0 from the env, pass it explicitly Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 2 +- target/hexagon/hex_common.py | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index

[PATCH v2 2/3] Hexagon (target/hexagon) Pass SP explicitly to helpers that need it

2024-02-05 Thread Taylor Simpson
Rather than reading SP from the env, pass it explicitly Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 2 +- target/hexagon/attribs_def.h.inc | 1 + target/hexagon/hex_common.py | 11 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH v2 3/3] Hexagon (target/hexagon) Only pass env to generated helper when needed

2024-02-05 Thread Taylor Simpson
Currently, we pass env to every generated helper. When the semantics of the instruction only depend on the arguments, this is unnecessary and adds extra overhead to the helper call. We add the TCG_CALL_NO_RWG_SE flag to any non-HVX helpers that don't get the ptr to env. The A2_nop and

[PATCH v2 0/3] Hexagon (target/hexagon) Only pass env to generated helper when needed

2024-02-05 Thread Taylor Simpson
Currently, we pass env to every generated helper. When the semantics of the instruction only depend on the arguments, this is unnecessary and adds extra overhead to the helper call. Changes in v2 - Separate patches to pass P0 and SP explicitly to helpers that need it - Add the

[PATCH v3 0/4] make vm-build-freebsd fixes

2024-02-05 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00890.html v2 -> v3: Structure the meson check similar to have_asan_fiber; Reduce the context size a little (Philippe). v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05155.html v1 -> v2: Link with libinotify

[PATCH v3 2/4] tests/vm/freebsd: Reload the sshd configuration

2024-02-05 Thread Ilya Leoshkevich
After console_sshd_config(), the SSH server needs to be nudged to pick up the new configs. The scripts for the other BSD flavors already do this with a reboot, but a simple reload is sufficient. Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/vm/freebsd | 1 + 1 file

[PATCH v3 4/4] meson: Link with libinotify on FreeBSD

2024-02-05 Thread Ilya Leoshkevich
make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-inotify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) in archive libqemuutil.a On FreeBSD the inotify

[PATCH v3 1/4] tests/vm: Set UseDNS=no in the sshd configuration

2024-02-05 Thread Ilya Leoshkevich
make vm-build-freebsd sometimes fails with "Connection timed out during banner exchange". The client strace shows: 13:59:30 write(3, "SSH-2.0-OpenSSH_9.3\r\n", 21) = 21 13:59:30 getpid() = 252655 13:59:30 poll([{fd=3, events=POLLIN}], 1, 5000) = 1 ([{fd=3,

[PATCH v3 3/4] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics

2024-02-05 Thread Ilya Leoshkevich
Unlike on Linux, on FreeBSD renaming a file when the destination already exists results in an IN_DELETE event for that existing file: $ FILEMONITOR_DEBUG=1 build/tests/unit/test-util-filemonitor Rename /tmp/test-util-filemonitor-K13LI2/fish/one.txt ->

Re: [PATCH v3 0/2] riscv: add rv32i,rv32e and rv64e CPUs

2024-02-05 Thread Alistair Francis
On Mon, Jan 22, 2024 at 10:34 PM Daniel Henrique Barboza wrote: > > Hi, > > This v3 has the same patches from v2 rebased with a newer > riscv-to-apply.next branch (@ 096b6b07298). > > No other changes made. All patches acked. > > v2 link: >

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Alex Bennée
Stefan Hajnoczi writes: > C99 mixed declarations support interleaving of local variable > declarations and code. > > The coding style "generally" forbids C99 mixed declarations with some > exceptions to the rule. This rule is not checked by checkpatch.pl and > naturally there are violations in

Re: [PATCH v3 2/3] hw/virtio: cleanup shared resources

2024-02-05 Thread Alex Bennée
Albert Esteve writes: > Ensure that we cleanup all virtio shared > resources when the vhost devices is cleaned > up (after a hot unplug, or a crash). > > To do so, we add a new function to the virtio_dmabuf > API called `virtio_dmabuf_vhost_cleanup`, which > loop through the table and removes

[PATCH] hw/i386/multiboot: Make bootloader_name static

2024-02-05 Thread Jens Nyberg
Global variable is only used in a single file and should therefor be set to static in order to avoid name collisions. Signed-off-by: Jens Nyberg --- hw/i386/multiboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index

[PATCH v5 0/4] target/s390x: Emulate CVDG and CVB*

2024-02-05 Thread Ilya Leoshkevich
v4: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00434.html v4 -> v5: Remove a redundant CVBG overflow check; Write the comment explaining the remaining CVBG overflow check; Add R-bs to the tests (Thomas). v3:

[PATCH v5 4/4] tests/tcg/s390x: Test CONVERT TO BINARY

2024-02-05 Thread Ilya Leoshkevich
Check the CVB's, CVBY's, and CVBG's corner cases. Co-developed-by: Pavel Zbitskiy Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvb.c | 102 2 files

[PATCH v5 3/4] tests/tcg/s390x: Test CONVERT TO DECIMAL

2024-02-05 Thread Ilya Leoshkevich
Check the CVD's, CVDY's, and CVDG's corner cases. Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/cvd.c | 63 + 2 files changed, 64 insertions(+) create mode 100644

[PATCH v5 1/4] target/s390x: Emulate CVDG

2024-02-05 Thread Ilya Leoshkevich
CVDG is the same as CVD, except that it converts 64 bits into 128, rather than 32 into 64. Create a new helper, which uses Int128 wrappers. Reported-by: Ido Plat Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- target/s390x/helper.h| 1 +

[PATCH v5 2/4] target/s390x: Emulate CVB, CVBY and CVBG

2024-02-05 Thread Ilya Leoshkevich
Convert to Binary - counterparts of the already implemented Convert to Decimal (CVD*) instructions. Example from the Principles of Operation: 25594C becomes 63FA. Co-developed-by: Pavel Zbitskiy Signed-off-by: Ilya Leoshkevich --- target/s390x/helper.h| 2 +

[PATCH v2 3/6] migration/multifd: Move multifd_send_setup error handling in to the function

2024-02-05 Thread Fabiano Rosas
Hide the error handling inside multifd_send_setup to make it cleaner for the next patch to move the function around. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 6 +- migration/multifd.c | 24 +--- migration/multifd.h | 2 +- 3

[PATCH v2 2/6] migration/multifd: Remove p->running

2024-02-05 Thread Fabiano Rosas
We currently only need p->running to avoid calling qemu_thread_join() on a non existent thread if the thread has never been created. However, there are at least two bugs in this logic: 1) On the sending side, p->running is set too early and qemu_thread_create() can be skipped due to an error

[PATCH v2 6/6] migration/multifd: Add a synchronization point for channel creation

2024-02-05 Thread Fabiano Rosas
It is possible that one of the multifd channels fails to be created at multifd_new_send_channel_async() while the rest of the channel creation tasks are still in flight. This could lead to multifd_save_cleanup() executing the qemu_thread_join() loop too early and not waiting for the threads which

[PATCH v2 0/6] migration/multifd: Fix channel creation vs. cleanup races

2024-02-05 Thread Fabiano Rosas
Based-on: 20240202102857.110210-1-pet...@redhat.com [PATCH v2 00/23] migration/multifd: Refactor ->send_prepare() and cleanups https://lore.kernel.org/r/20240202102857.110210-1-pet...@redhat.com Hi, In this v2 I made sure NO channel is created after the semaphores are posted. Feel free to call

[PATCH v2 1/6] migration/multifd: Join the TLS thread

2024-02-05 Thread Fabiano Rosas
We're currently leaking the resources of the TLS thread by not joining it and also overwriting the p->thread pointer altogether. Fixes: a1af605bd5 ("migration/multifd: fix hangup with TLS-Multifd due to blocking handshake") Cc: qemu-stable Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas

[PATCH v2 4/6] migration/multifd: Move multifd_send_setup into migration thread

2024-02-05 Thread Fabiano Rosas
We currently have an unfavorable situation around multifd channels creation and the migration thread execution. We create the multifd channels with qio_channel_socket_connect_async -> qio_task_run_in_thread, but only connect them at the multifd_new_send_channel_async callback, called from

[PATCH v2 5/6] migration/multifd: Unify multifd and TLS connection paths

2024-02-05 Thread Fabiano Rosas
During multifd channel creation (multifd_send_new_channel_async) when TLS is enabled, the multifd_channel_connect function is called twice, once to create the TLS handshake thread and another time after the asynchrounous TLS handshake has finished. This creates a slightly confusing call stack

[PATCH] hw/net/tulip: add chip status register values

2024-02-05 Thread Sven Schnelle
Netbsd isn't able to detect a link on the emulated tulip card. That's because netbsd reads the Chip Status Register of the Phy (address 0x14). The default phy data in the qemu tulip driver is all zero, which means no link is established and autonegotation isn't complete. Therefore set the

Re: [PATCH v4 5/5] target/riscv: Implement privilege mode filtering for cycle/instret

2024-02-05 Thread Atish Kumar Patra
On Tue, Jan 23, 2024 at 4:15 PM Atish Kumar Patra wrote: > On Sun, Jan 21, 2024 at 9:04 PM Alistair Francis > wrote: > > > > On Tue, Jan 9, 2024 at 10:29 AM Atish Patra wrote: > > > > > > Privilege mode filtering can also be emulated for cycle/instret by > > > tracking host_ticks/icount during

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Daniel P . Berrangé
On Mon, Feb 05, 2024 at 02:06:39PM -0500, Stefan Hajnoczi wrote: > On Mon, 5 Feb 2024 at 13:16, Samuel Tardieu wrote: > > > > > > Daniel P. Berrangé writes: > > > > > $ gcc -Wall -Wuninitialized -o jump jump.c > > > > Note that many GCC warnings don't trigger if you don't enable > >

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Stefan Hajnoczi
On Mon, 5 Feb 2024 at 13:16, Samuel Tardieu wrote: > > > Daniel P. Berrangé writes: > > > $ gcc -Wall -Wuninitialized -o jump jump.c > > Note that many GCC warnings don't trigger if you don't enable > optimizations. In the case you exhibit, adding -O is enough to get > a sensible warning: > > $

Re: Re: [PATCH v2 4/4] meson: Link with libinotify on FreeBSD

2024-02-05 Thread Ilya Leoshkevich
On Mon, Feb 05, 2024 at 07:36:32PM +0100, Philippe Mathieu-Daudé wrote: > Hi Ilya, > > On 5/2/24 19:11, Ilya Leoshkevich wrote: > > make vm-build-freebsd fails with: > > > > ld: error: undefined symbol: inotify_init1 > > >>> referenced by filemonitor-inotify.c:183 > >

Re: [PATCH v2 2/4] tests/vm/freebsd: Reload the sshd configuration

2024-02-05 Thread Thomas Huth
On 05/02/2024 19.11, Ilya Leoshkevich wrote: After console_sshd_config(), the SSH server needs to be nudged to pick up the new configs. The scripts for the other BSD flavors already do this with a reboot, but a simple reload is sufficient. Signed-off-by: Ilya Leoshkevich --- tests/vm/freebsd

Re: Re: [PATCH v4 2/4] target/s390x: Emulate CVB, CVBY and CVBG

2024-02-05 Thread Ilya Leoshkevich
On Mon, Feb 05, 2024 at 06:04:27PM +0100, Thomas Huth wrote: > On 02/02/2024 15.11, Ilya Leoshkevich wrote: > > Convert to Binary - counterparts of the already implemented Convert > > to Decimal (CVD*) instructions. > > Example from the Principles of Operation: 25594C becomes 63FA. > > > >

Re: [PATCH v2 4/4] meson: Link with libinotify on FreeBSD

2024-02-05 Thread Philippe Mathieu-Daudé
Hi Ilya, On 5/2/24 19:11, Ilya Leoshkevich wrote: make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-inotify.c:183) >>>

[PATCH v2 3/4] tests/test-util-filemonitor: Adapt to FreeBSD inotify rename semantics

2024-02-05 Thread Ilya Leoshkevich
Unlike on Linux, on FreeBSD renaming a file when the destination already exists results in IN_DELETE event for that existing file: $ FILEMONITOR_DEBUG=1 build/tests/unit/test-util-filemonitor Rename /tmp/test-util-filemonitor-K13LI2/fish/one.txt ->

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Samuel Tardieu
Daniel P. Berrangé writes: $ gcc -Wall -Wuninitialized -o jump jump.c Note that many GCC warnings don't trigger if you don't enable optimizations. In the case you exhibit, adding -O is enough to get a sensible warning: $ gcc -Wall -O -o jump jump.c jump.c: In function ‘main’:

[PATCH v2 1/4] tests/vm: Set UseDNS=no in the sshd configuration

2024-02-05 Thread Ilya Leoshkevich
make vm-build-freebsd sometimes fails with "Connection timed out during banner exchange". The client strace shows: 13:59:30 write(3, "SSH-2.0-OpenSSH_9.3\r\n", 21) = 21 13:59:30 getpid() = 252655 13:59:30 poll([{fd=3, events=POLLIN}], 1, 5000) = 1 ([{fd=3,

[PATCH v2 2/4] tests/vm/freebsd: Reload the sshd configuration

2024-02-05 Thread Ilya Leoshkevich
After console_sshd_config(), the SSH server needs to be nudged to pick up the new configs. The scripts for the other BSD flavors already do this with a reboot, but a simple reload is sufficient. Signed-off-by: Ilya Leoshkevich --- tests/vm/freebsd | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v2 4/4] meson: Link with libinotify on FreeBSD

2024-02-05 Thread Ilya Leoshkevich
make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-inotify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) in archive libqemuutil.a On FreeBSD inotify

[PATCH v2 0/4] make vm-build-freebsd fixes

2024-02-05 Thread Ilya Leoshkevich
v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg05155.html v1 -> v2: Link with libinotify instead of disabling the inotify support (Daniel). Use a bit more context lines in order to prevent the incorrect application of the test patch. Hi, I needed to

Re: [PATCH v2 23/23] migration/multifd: Optimize sender side to be lockless

2024-02-05 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Feb 05, 2024 at 11:10:34AM -0300, Fabiano Rosas wrote: >> > (maybe I can repost this single patch in-place to avoid another round of >> > mail bombs..) >> >> Sure. > > I've got the final version attached here. Feel free to have a look, thanks. > > > From

Re: [GIT PULL 5/8] util: Add write-only "node-affinity" property for ThreadContext

2024-02-05 Thread David Hildenbrand
On 05.02.24 17:13, Claudio Fontana wrote: Hello David, Hi, It would seem to me that a lot of the calling code like qemu_prealloc_mem for example should be sysemu-only, not used for tools, or user mode either right? And the thread_context.c itself should also be sysemu-only, correct?

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Peter Maydell
On Mon, 5 Feb 2024 at 17:41, Daniel P. Berrangé wrote: > Rather than accept the status quo and remove the coding guideline, > I think we should strengthen the guidelines, such that it is > explicitly forbidden in any method that uses 'goto'. Personally > I'd go all the way to

Re: [PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Daniel P . Berrangé
On Mon, Feb 05, 2024 at 12:18:19PM -0500, Stefan Hajnoczi wrote: > C99 mixed declarations support interleaving of local variable > declarations and code. > > The coding style "generally" forbids C99 mixed declarations with some > exceptions to the rule. This rule is not checked by checkpatch.pl

[PATCH 0/5] virtio-blk: iothread-vq-mapping cleanups

2024-02-05 Thread Stefan Hajnoczi
Hanna reviewed the iothread-vq-mapping patches after they were applied to qemu.git. This series consists of code cleanups that Hanna identified. There are no functional changes or bug fixes that need to be backported to the stable tree here, but it may make sense to backport them in the future to

[PATCH 2/5] virtio-blk: clarify that there is at least 1 virtqueue

2024-02-05 Thread Stefan Hajnoczi
It is not possible to instantiate a virtio-blk device with 0 virtqueues. The following check is located in ->realize(): if (!conf->num_queues) { error_setg(errp, "num-queues property must be larger than 0"); return; } Later on we access s->vq_aio_context[0] under the assumption

[PATCH 3/5] virtio-blk: add vq_rq[] bounds check in virtio_blk_dma_restart_cb()

2024-02-05 Thread Stefan Hajnoczi
Hanna Czenczek noted that the array index in virtio_blk_dma_restart_cb() is not bounds-checked: g_autofree VirtIOBlockReq **vq_rq = g_new0(VirtIOBlockReq *, num_queues); ... while (rq) { VirtIOBlockReq *next = rq->next; uint16_t idx = virtio_get_queue_index(rq->vq);

[PATCH 5/5] monitor: use aio_co_reschedule_self()

2024-02-05 Thread Stefan Hajnoczi
The aio_co_reschedule_self() API is designed to avoid the race condition between scheduling the coroutine in another AioContext and yielding. The QMP dispatch code uses the open-coded version that appears susceptible to the race condition at first glance:

[PATCH 1/5] virtio-blk: enforce iothread-vq-mapping validation

2024-02-05 Thread Stefan Hajnoczi
Hanna Czenczek noticed that the safety of `vq_aio_context[vq->value] = ctx;` with user-defined vq->value inputs is not obvious. The code is structured in validate() + apply() steps so input validation is there, but it happens way earlier and there is nothing that guarantees apply() can only be

[PATCH 4/5] virtio-blk: declare VirtIOBlock::rq with a type

2024-02-05 Thread Stefan Hajnoczi
The VirtIOBlock::rq field has had the type void * since its introduction in commit 869a5c6df19a ("Stop VM on error in virtio-blk. (Gleb Natapov)"). Perhaps this was done to avoid the forward declaration of VirtIOBlockReq. Hanna Czenczek pointed out the missing type. Specify the actual type

[PATCH] docs/style: allow C99 mixed declarations

2024-02-05 Thread Stefan Hajnoczi
C99 mixed declarations support interleaving of local variable declarations and code. The coding style "generally" forbids C99 mixed declarations with some exceptions to the rule. This rule is not checked by checkpatch.pl and naturally there are violations in the source tree. While contemplating

Re: [PATCH v4 2/4] target/s390x: Emulate CVB, CVBY and CVBG

2024-02-05 Thread Thomas Huth
On 02/02/2024 15.11, Ilya Leoshkevich wrote: Convert to Binary - counterparts of the already implemented Convert to Decimal (CVD*) instructions. Example from the Principles of Operation: 25594C becomes 63FA. Co-developed-by: Pavel Zbitskiy Signed-off-by: Ilya Leoshkevich ---

[PATCH v9 4/5] qmp: Added new command to retrieve eBPF blob.

2024-02-05 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id. It would require for future qmp commands that may require specific eBPF blob. Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in

[PATCH v9 2/5] ebpf: Added eBPF initialization by fds.

2024-02-05 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27

[PATCH v9 0/5] eBPF RSS through QMP support.

2024-02-05 Thread Andrew Melnychenko
This series of patches provides the ability to retrieve eBPF program through qmp, so management application may load bpf blob with proper capabilities. Now, virtio-net devices can accept eBPF programs and maps through properties as external file descriptors. Access to the eBPF map is direct

  1   2   3   >