[PATCH 2/2] tests/qtest/migration: Fix typo for vsock in SocketAddress_to_str

2024-03-19 Thread Het Gala
Signed-off-by: Het Gala --- tests/qtest/migration-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c index fb7156f09a..651c6c555a 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-h

[PATCH 1/2] tests/qtest/migration: Ignore if socket-address is missing to avoid crash below

2024-03-19 Thread Het Gala
'object' can return NULL if there is no socket-address, such as with a file migration. Then the visitor code below fails and the test crashes. Ignore and return NULL when socket-address is missing in the reply so we don't break future tests that use a non-socket type. Suggested-by: Fabiano Rosas

Re: [PATCH v5 10/24] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > The regular qemu_bh_schedule() calls result in non-deterministic > execution of the bh in record-replay mode, which causes replay failure. > > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 08/24] replay: Fix migration use of clock

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > Migration reads host clocks when not holding the replay_mutex, which > asserts when recording a trace. It seems that these migration times > should be host times like other statistics in MigrationState. s/host/CLOCK_HOST/ and s/host/CLOCK_REALTIME/ but its a confusing s

[PATCH] Implement SSH commands in QEMU GA for Windows

2024-03-19 Thread aidan_leuck
From: aidaleuc Signed-off-by: aidaleuc --- qga/commands-posix-ssh.c | 47 +-- qga/commands-ssh-core.c| 52 +++ qga/commands-ssh-core.h| 20 ++ qga/commands-windows-ssh.c | 686 + qga/meson.build| 6 +- qga/qapi-schema.json |

[PULL 6/8] crypto: query gcrypt for cipher availability

2024-03-19 Thread Daniel P . Berrangé
Just because a cipher is defined in the gcrypt header file, does not imply that it can be used. Distros can filter the list of ciphers when building gcrypt. For example, RHEL-9 disables the SM4 cipher. It is also possible that running in FIPS mode might dynamically change what ciphers are available

[PULL 8/8] crypto: report which ciphers are being skipped during tests

2024-03-19 Thread Daniel P . Berrangé
Since the ciphers can be dynamically disabled at runtime, when running unit tests it is helpful to report which ciphers we can skipped for testing. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-cipher.c | 4 1 fil

[PULL 2/8] chardev: lower priority of the HUP GSource in socket chardev

2024-03-19 Thread Daniel P . Berrangé
The socket chardev often has 2 GSource object registered against the same FD. One is registered all the time and is just intended to handle POLLHUP events, while the other gets registered & unregistered on the fly as the frontend is ready to receive more data or not. It is very common for poll() t

[PULL 4/8] Revert "chardev: use a child source for qio input source"

2024-03-19 Thread Daniel P . Berrangé
This reverts commit a7077b8e354d90fec26c2921aa2dea85b90dff90, and add comments to explain why child sources cannot be used. When a GSource is added as a child of another GSource, if its 'prepare' function indicates readiness, then the parent's 'prepare' function will never be run. The io_watch_pol

[PULL 7/8] crypto: use error_abort for unexpected failures

2024-03-19 Thread Daniel P . Berrangé
This improves the error diagnosis from the unit test when a cipher is unexpected not available from ERROR:../tests/unit/test-crypto-cipher.c:683:test_cipher: assertion failed: (err == NULL) Bail out! ERROR:../tests/unit/test-crypto-cipher.c:683:test_cipher: assertion failed: (err == NULL) Aborte

[PULL 1/8] seccomp: report EPERM instead of killing process for spawn set

2024-03-19 Thread Daniel P . Berrangé
When something tries to run one of the spawn syscalls (eg clone), our seccomp deny filter is set to cause a fatal trap which kills the process. This is found to be unhelpful when QEMU has loaded the nvidia GL library. This tries to spawn a process to modprobe the nvidia kmod. This is a dubious thi

[PULL 3/8] Revert "chardev/char-socket: Fix TLS io channels sending too much data to the backend"

2024-03-19 Thread Daniel P . Berrangé
This commit results in unexpected termination of the TLS connection. When 'fd_can_read' returns 0, the code goes on to pass a zero length buffer to qio_channel_read. The TLS impl calls into gnutls_recv() with this zero length buffer, at which point GNUTLS returns an error GNUTLS_E_INVALID_REQUEST.

[PULL 0/8] Misc fixes patches

2024-03-19 Thread Daniel P . Berrangé
The following changes since commit c62d54d0a8067ffb3d5b909276f7296d7df33fa7: Update version for v9.0.0-rc0 release (2024-03-19 19:13:52 +) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/misc-fixes-pull-request for you to fetch changes up to c3b1aa1c1ae66e0

[PULL 5/8] crypto: factor out conversion of QAPI to gcrypt constants

2024-03-19 Thread Daniel P . Berrangé
The conversion of cipher mode will shortly be required in more than one place. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- crypto/cipher-gcrypt.c.inc | 116 +++-- 1 file changed, 60 insertions(+), 56 deletio

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-19 Thread Peter Xu
On Tue, Mar 19, 2024 at 07:52:47PM +, Daniel P. Berrangé wrote: > On Tue, Mar 19, 2024 at 03:25:18PM -0400, Peter Xu wrote: > > On Tue, Mar 19, 2024 at 04:25:32PM +, Daniel P. Berrangé wrote: > > > On Fri, Mar 15, 2024 at 04:54:27PM -0400, Peter Xu wrote: > > > > On Fri, Mar 15, 2024 at 03:

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 06:41:28PM +0100, Kevin Wolf wrote: > Am 19.03.2024 um 18:10 hat Daniel P. Berrangé geschrieben: > > On Tue, Mar 19, 2024 at 05:54:38PM +0100, Kevin Wolf wrote: > > > Am 19.03.2024 um 14:43 hat Daniel P. Berrangé geschrieben: > > > > On Mon, Mar 18, 2024 at 02:34:29PM -0400,

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 01:55:10PM -0400, Stefan Hajnoczi wrote: > On Tue, Mar 19, 2024 at 01:43:32PM +, Daniel P. Berrangé wrote: > > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > > diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c > > > index 5fd2dbaf8b..279095

Re: [PATCH 08/22] plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB

2024-03-19 Thread Richard Henderson
On 3/19/24 03:22, Pierrick Bouvier wrote: @@ -798,6 +816,25 @@ static void plugin_gen_inject(struct qemu_plugin_tb *plugin_tb)   assert(insn != NULL);   gen_disable_mem_helper(plugin_tb, insn);   break; + +    case PLUGIN_GEN_FROM_TB: +

Re: [PATCH 07/22] plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

2024-03-19 Thread Richard Henderson
On 3/19/24 03:32, Pierrick Bouvier wrote:   static void plugin_gen_inject(struct qemu_plugin_tb *plugin_tb)   { -    TCGOp *op; +    TCGOp *op, *next;   int insn_idx = -1;   pr_ops(); -    QTAILQ_FOREACH(op, &tcg_ctx->ops, link) { +    /* + * While injecting code, we cannot afford to

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 03:25:18PM -0400, Peter Xu wrote: > On Tue, Mar 19, 2024 at 04:25:32PM +, Daniel P. Berrangé wrote: > > On Fri, Mar 15, 2024 at 04:54:27PM -0400, Peter Xu wrote: > > > On Fri, Mar 15, 2024 at 03:01:09PM -0300, Fabiano Rosas wrote: > > > > Peter Xu writes: > > > > > > >

Re: [PATCH 06/22] plugins: Create TCGHelperInfo for all out-of-line callbacks

2024-03-19 Thread Richard Henderson
On 3/19/24 03:12, Pierrick Bouvier wrote: On 3/16/24 05:57, Richard Henderson wrote: TCGHelperInfo includes the ABI for every function call. Signed-off-by: Richard Henderson ---   include/qemu/plugin.h |  1 +   plugins/core.c    | 51 ++-   2 files ch

Re: [RFC PATCH] target/hppa: Introduce and use IAQEntry

2024-03-19 Thread Sven Schnelle
Sven Schnelle writes: > Hi Richard, > > Richard Henderson writes: > >> Wrap offset and space into a single structure, with >> offset represented either as a constant or as variable. >> This enhances copy_iaoq_entry to copy the space, and at >> the same time simplifying the code. >> >> Signed-off

Re: [RFC PATCH v8 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-19 Thread Peter Maydell
On Tue, 19 Mar 2024 at 18:51, Richard Henderson wrote: > > On 3/19/24 07:28, Peter Maydell wrote: > >> switch (excp_idx) { > >> +case EXCP_NMI: > >> +pstate_unmasked = !allIntMask; > >> +break; > >> + > >> +case EXCP_VNMI: > >> +if ((!(hcr_el2 & HCR_IMO) && !(

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-19 Thread Peter Xu
On Tue, Mar 19, 2024 at 04:25:32PM +, Daniel P. Berrangé wrote: > On Fri, Mar 15, 2024 at 04:54:27PM -0400, Peter Xu wrote: > > On Fri, Mar 15, 2024 at 03:01:09PM -0300, Fabiano Rosas wrote: > > > Peter Xu writes: > > > > > > > [I queued patch 1-2 into -stable, leaving this patch for further

Re: [PATCH v5 07/24] chardev: set record/replay on the base device of a muxed device

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > chardev events to a muxed device don't get recorded because e.g., > qemu_chr_be_write() checks whether the base device has the record flag > set. > > This can be seen when replaying a trace that has characters typed into > the console, an examination of the log shows the

Re: [RFC PATCH] target/hppa: Introduce and use IAQEntry

2024-03-19 Thread Sven Schnelle
Hi Richard, Richard Henderson writes: > Wrap offset and space into a single structure, with > offset represented either as a constant or as variable. > This enhances copy_iaoq_entry to copy the space, and at > the same time simplifying the code. > > Signed-off-by: Richard Henderson > --- > > Sv

Re: [PULL 0/1] Block patches

2024-03-19 Thread Peter Maydell
On Tue, 19 Mar 2024 at 15:09, Stefan Hajnoczi wrote: > > The following changes since commit ddc27d2ad9361a81c2b3800d14143bf420dae172: > > Merge tag 'pull-request-2024-03-18' of https://gitlab.com/thuth/qemu into > staging (2024-03-19 10:25:25 +) > > are available in the Git repository at: >

Re: [PATCH v7 3/8] tests/qtest/migration: Replace migrate_get_connect_uri inplace of migrate_get_socket_address

2024-03-19 Thread Fabiano Rosas
Het Gala writes: > On 18/03/24 7:46 pm, Fabiano Rosas wrote: >> Het Gala writes: >> >>> On 15/03/24 6:28 pm, Fabiano Rosas wrote: Het Gala writes: > Refactor migrate_get_socket_address to internally utilize 'socket-address' > parameter, reducing redundancy in the function def

Re: [PATCH] block/io: accept NULL qiov in bdrv_pad_request

2024-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 10:13:41AM +0100, Fiona Ebner wrote: > From: Stefan Reiter > > Some operations, e.g. block-stream, perform reads while discarding the > results (only copy-on-read matters). In this case, they will pass NULL > as the target QEMUIOVector, which will however trip bdrv_pad_req

Re: [RFC PATCH v8 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-19 Thread Richard Henderson
On 3/19/24 07:28, Peter Maydell wrote: switch (excp_idx) { +case EXCP_NMI: +pstate_unmasked = !allIntMask; +break; + +case EXCP_VNMI: +if ((!(hcr_el2 & HCR_IMO) && !(hcr_el2 & HCR_FMO)) || + (hcr_el2 & HCR_TGE)) { +/* VNMIs(VIRQs or VF

Re: [PATCH v7 3/8] tests/qtest/migration: Replace migrate_get_connect_uri inplace of migrate_get_socket_address

2024-03-19 Thread Het Gala
On 18/03/24 7:46 pm, Fabiano Rosas wrote: Het Gala writes: On 15/03/24 6:28 pm, Fabiano Rosas wrote: Het Gala writes: Refactor migrate_get_socket_address to internally utilize 'socket-address' parameter, reducing redundancy in the function definition. migrate_get_socket_address implicit

Re: [RFC PATCH v5 06/22] target/arm: Add support for Non-maskable Interrupt

2024-03-19 Thread Richard Henderson
On 3/19/24 07:03, Peter Maydell wrote: On Thu, 29 Feb 2024 at 23:02, Richard Henderson wrote: On 2/29/24 03:10, Jinjie Ruan via wrote: +bool new_state = ((env->cp15.hcr_el2 & HCR_VI) && + (env->cp15.hcrx_el2 & HCRX_VINMI)) || + ((env->cp15.hcr_el2

Re: [PATCH v2 3/6] target/hppa: fix access_id check

2024-03-19 Thread Richard Henderson
On 3/19/24 06:19, Sven Schnelle wrote: PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle --- target/hppa/mem_helper.c | 59 +--- 1 file changed, 49 insertions(+), 10 deletions(-) Reviewed-by: Richard Henderson +/* Return the se

[RFC PATCH] target/hppa: Introduce and use IAQEntry

2024-03-19 Thread Richard Henderson
Wrap offset and space into a single structure, with offset represented either as a constant or as variable. This enhances copy_iaoq_entry to copy the space, and at the same time simplifying the code. Signed-off-by: Richard Henderson --- Sven, I think this might solve your branch-with-space-chang

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-19 Thread Dave Jiang
On 3/18/24 5:38 PM, Dan Williams wrote: > Jonathan Cameron wrote: >> On Mon, 18 Mar 2024 10:29:28 +0800 >> Yuquan Wang wrote: >> >>> The dev_dbg info for Clear Event Records mailbox command would report >>> the handle of the next record to clear not the current one. >>> >>> This was because the

Re: [PATCH v5 00/25] qapi: statically type schema.py

2024-03-19 Thread Markus Armbruster
Queued for 9.1 with PATCH 25's commit message typo fixed. Thanks!

Re: [PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Eric Auger
Hi, On 3/19/24 19:07, Daniel P. Berrangé wrote: > On Tue, Mar 19, 2024 at 06:58:33PM +0100, Eric Auger wrote: >> Hi Daniel, >> >> On 3/19/24 16:22, Daniel P. Berrangé wrote: >>> On Wed, Feb 21, 2024 at 01:34:31AM -0500, Shaoqin Huang wrote: The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability

Re: [PATCH-for-9.1 5/8] target/microblaze: Restrict 64-bit 'res_addr' to system emulation

2024-03-19 Thread Philippe Mathieu-Daudé
On 19/3/24 17:27, Edgar E. Iglesias wrote: On Tue, Mar 19, 2024 at 07:28:52AM +0100, Philippe Mathieu-Daudé wrote: 'res_addr' is only used in system emulation, where we have TARGET_LONG_BITS = 64, so we can directly use the native uint64_t type instead of target_ulong. Hi Philippe, This brea

Re: [PATCH-for-9.1 07/21] target/mips: Make MIPS_CPU common to new MIPS32_CPU / MIPS64_CPU types

2024-03-19 Thread Philippe Mathieu-Daudé
On 15/3/24 14:08, Philippe Mathieu-Daudé wrote: "target/foo/cpu-qom.h" can not use any target specific definitions. Currently "target/mips/cpu-qom.h" defines TYPE_MIPS_CPU depending on the mips(32)/mips64 build type. This doesn't scale in a heterogeneous context where we need to access both type

Re: [PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 06:58:33PM +0100, Eric Auger wrote: > Hi Daniel, > > On 3/19/24 16:22, Daniel P. Berrangé wrote: > > On Wed, Feb 21, 2024 at 01:34:31AM -0500, Shaoqin Huang wrote: > >> The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide > >> which PMU events are provi

Re: [PATCH v3 6/7] qga/commands-posix: don't do fork()/exec() when suspending via sysfs

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:45PM +0200, Andrey Drobyshev wrote: > Since commit 246d76eba ("qga: guest_suspend: decoupling pm-utils and sys > logic") pm-utils logic is running in a separate child from the sysfs > logic. Now when suspending via sysfs we don't really need to do that in > a separate

Re: [PATCH v3 7/7] qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:46PM +0200, Andrey Drobyshev wrote: > There's no need to check for the existence of the "chpasswd", "pw" > executables, as the exec() call will do that for us. > > Signed-off-by: Andrey Drobyshev > --- > qga/commands-posix.c | 96 ++--

Re: [PATCH v3 5/7] qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:44PM +0200, Andrey Drobyshev wrote: > There's no need to check for the existence of the hook executable, as the > exec() call will do that for us. > > Signed-off-by: Andrey Drobyshev > --- > qga/commands-posix.c | 35 +++ > 1 file cha

Re: [PULL 1/1] coroutine: cap per-thread local pool size

2024-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 03:14:07PM +, Daniel P. Berrangé wrote: > Sending this PULL feels little rushed, as I still have > un-answered questions on the inital patch posting just > a few hours ago Sorry, I hadn't seen your email. I'll update this email thread once the discussion has finishe

Re: [PATCH v3 3/7] qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:42PM +0200, Andrey Drobyshev wrote: > Also remove the G_GNUC_UNUSED attribute added in the previous commit from > the helper. > > Signed-off-by: Andrey Drobyshev > --- > qga/commands-posix.c | 39 ++- > 1 file changed, 6 insertion

Re: [PATCH v7] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2024-03-19 Thread Eric Auger
Hi Daniel, On 3/19/24 16:22, Daniel P. Berrangé wrote: > On Wed, Feb 21, 2024 at 01:34:31AM -0500, Shaoqin Huang wrote: >> The KVM_ARM_VCPU_PMU_V3_FILTER provides the ability to let the VMM decide >> which PMU events are provided to the guest. Add a new option >> `kvm-pmu-filter` as -cpu sub-optio

Re: [PATCH v3 4/7] qga/commands-posix: qmp_guest_set_time: use ga_run_command helper

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:43PM +0200, Andrey Drobyshev wrote: > There's no need to check for the existence of "/sbin/hwclock", the > exec() call will do that for us. > > Signed-off-by: Andrey Drobyshev > --- > qga/commands-posix.c | 43 +++ > 1 file ch

Re: [PATCH v5 06/24] tests/avocado: replay_kernel.py add x86-64 q35 machine test

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > The x86-64 pc machine is flaky with record/replay, but q35 is more > stable. Add a q35 test to replay_kernel.py. > > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée Tested-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 05/24] Revert "replay: stop us hanging in rr_wait_io_event"

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > This reverts commit 1f881ea4a444ef36a8b6907b0b82be4b3af253a2. > > That commit causes reverse_debugging.py test failures, and does > not seem to solve the root cause of the problem x86-64 still > hangs in record/replay tests. > > The problem with short-cutting the iowait

Re: [PATCH v5 13/24] tests/avocado: replay_linux.py remove the timeout expected guards

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > replay_linux tests with virtio on aarch64 gciv3 and x86-64 q35 machines > seems to be more reliable now, so timeouts are no longer expected. > pc_i440fx, gciv2, and non-virtio still have problems, so mark them as > flaky: they are not just long-running, but can hang inde

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Stefan Hajnoczi
On Tue, Mar 19, 2024 at 01:43:32PM +, Daniel P. Berrangé wrote: > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > The coroutine pool implementation can hit the Linux vm.max_map_count > > limit, causing QEMU to abort with "failed to allocate memory for stack" > > or "failed

Re: [PATCH v3 2/7] qga: introduce ga_run_command() helper for guest cmd execution

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:41PM +0200, Andrey Drobyshev wrote: > When executing guest commands in *nix environment, we repeat the same > fork/exec pattern multiple times. Let's just separate it into a single > helper which would also be able to feed input data into the launched > process' stdin

Re: Request for Support: QEMU IPv6 Port Forwarding Issue

2024-03-19 Thread BALATON Zoltan
On Tue, 19 Mar 2024, Thomas Huth wrote: On 19/03/2024 06.53, Srinivasu Kandukuri (MS/ECP2-ETAS-VOS) wrote: Dear QEMU Support Team, We are currently encountering difficulties in utilizing QEMU for starting a virtual machine image on Windows with IPv6 networking, specifically related to port fo

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Kevin Wolf
Am 19.03.2024 um 18:10 hat Daniel P. Berrangé geschrieben: > On Tue, Mar 19, 2024 at 05:54:38PM +0100, Kevin Wolf wrote: > > Am 19.03.2024 um 14:43 hat Daniel P. Berrangé geschrieben: > > > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > > > The coroutine pool implementation ca

Re: [PATCH v3 1/7] qga: guest-get-fsinfo: add optional 'total-bytes-root' field

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 02:29:40PM +0200, Andrey Drobyshev wrote: > Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to > GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: > used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as > returned by statvfs(

Re: [PULL 0/3] for-9.0 queue

2024-03-19 Thread Peter Maydell
ilable in the Git repository at: > > https://github.com/legoater/qemu/ tags/pull-for-9.0-20240319 > > for you to fetch changes up to a7538ca0791880b6aeb2cc4cc8c00305e2d975f8: > > aspeed/smc: Only wire flash devices at reset (2024-03-19 11:58:15 +0100) > > ---

Re: [RFC PATCH v8 05/23] target/arm: Support MSR access to ALLINT

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 09:37, Jinjie Ruan wrote: > > Support ALLINT msr access as follow: > mrs , ALLINT// read allint > msr ALLINT, // write allint with imm > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson > --- > v5: > - Add Reviewed-by. > v4: > -

Re: [RFC PATCH v8 06/23] target/arm: Add support for Non-maskable Interrupt

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 09:37, Jinjie Ruan wrote: > > This only implements the external delivery method via the GICv3. > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson > --- > v8: > - Fix the rcu stall after sending a VNMI in qemu VM. > v7: > - Add Reviewed-by. > v6: > - env->cp15.

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Daniel P . Berrangé
On Tue, Mar 19, 2024 at 05:54:38PM +0100, Kevin Wolf wrote: > Am 19.03.2024 um 14:43 hat Daniel P. Berrangé geschrieben: > > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > > The coroutine pool implementation can hit the Linux vm.max_map_count > > > limit, causing QEMU to abort

Re: [RFC PATCH v5 06/22] target/arm: Add support for Non-maskable Interrupt

2024-03-19 Thread Peter Maydell
On Thu, 29 Feb 2024 at 23:02, Richard Henderson wrote: > > On 2/29/24 03:10, Jinjie Ruan via wrote: > > +bool new_state = ((env->cp15.hcr_el2 & HCR_VI) && > > + (env->cp15.hcrx_el2 & HCRX_VINMI)) || > > + ((env->cp15.hcr_el2 & HCR_VF) && > > +

Re: [PATCH] coroutine: cap per-thread local pool size

2024-03-19 Thread Kevin Wolf
Am 19.03.2024 um 14:43 hat Daniel P. Berrangé geschrieben: > On Mon, Mar 18, 2024 at 02:34:29PM -0400, Stefan Hajnoczi wrote: > > The coroutine pool implementation can hit the Linux vm.max_map_count > > limit, causing QEMU to abort with "failed to allocate memory for stack" > > or "failed to set up

Re: [PATCH for-9.0 1/2] nbd/server: Fix race in draining the export

2024-03-19 Thread Michael Tokarev
14.03.2024 19:58, Kevin Wolf wrote: When draining an NBD export, nbd_drained_begin() first sets client->quiescing so that nbd_client_receive_next_request() won't start any new request coroutines. Then nbd_drained_poll() tries to makes sure that we wait for any existing request coroutines by check

Re: [RFC PATCH v8 09/23] target/arm: Handle PSTATE.ALLINT on taking an exception

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 09:37, Jinjie Ruan wrote: > > Set or clear PSTATE.ALLINT on taking an exception to ELx according to the > SCTLR_ELx.SPINTMASK bit. > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson > --- > v3: > - Add Reviewed-by. > --- > target/arm/helper.c | 9 + >

Re: [RFC PATCH v8 05/23] target/arm: Support MSR access to ALLINT

2024-03-19 Thread Peter Maydell
On Mon, 18 Mar 2024 at 09:37, Jinjie Ruan wrote: > > Support ALLINT msr access as follow: > mrs , ALLINT// read allint > msr ALLINT, // write allint with imm > > Signed-off-by: Jinjie Ruan > Reviewed-by: Richard Henderson > --- > v5: > - Add Reviewed-by. > v4: > -

Re: Request for Support: QEMU IPv6 Port Forwarding Issue

2024-03-19 Thread Samuel Thibault
Hello, Thomas Huth, le mar. 19 mars 2024 15:28:12 +0100, a ecrit: > On 19/03/2024 06.53, Srinivasu Kandukuri (MS/ECP2-ETAS-VOS) wrote: > > Dear QEMU Support Team, > > > > We are currently encountering difficulties in utilizing QEMU for > > starting a virtual machine image on Windows with IPv6 net

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 09:13:52AM -0300, Fabiano Rosas wrote: > Daniel P. Berrangé writes: > > > On Fri, Mar 15, 2024 at 12:20:40AM -0300, Fabiano Rosas wrote: > >> The fd: URI has supported migration to a file or socket since before > >> QEMU 8.2. In 8.2 we added the file: URI that supported mi

Re: [PATCH-for-9.1 2/8] target/microblaze: Use hwaddr/vaddr in cpu_get_phys_page_attrs_debug()

2024-03-19 Thread Edgar E. Iglesias
On Tue, Mar 19, 2024 at 07:28:49AM +0100, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias > --- > target/microblaze/helper.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/microblaze/helper.c b/target/mic

Re: [PATCH-for-9.1 1/8] target/microblaze: Use correct string format in do_unaligned_access()

2024-03-19 Thread Edgar E. Iglesias
On Tue, Mar 19, 2024 at 07:28:48AM +0100, Philippe Mathieu-Daudé wrote: > 'addr' is of type 'vaddr'; no need to cast, use the > corresponding format string. > > Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access") > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Igle

Re: [PATCH-for-9.1 5/8] target/microblaze: Restrict 64-bit 'res_addr' to system emulation

2024-03-19 Thread Edgar E. Iglesias
On Tue, Mar 19, 2024 at 07:28:52AM +0100, Philippe Mathieu-Daudé wrote: > 'res_addr' is only used in system emulation, where we have > TARGET_LONG_BITS = 64, so we can directly use the native > uint64_t type instead of target_ulong. Hi Philippe, This breaks linux-user, lwx and swx are valid user

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-19 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 04:54:27PM -0400, Peter Xu wrote: > On Fri, Mar 15, 2024 at 03:01:09PM -0300, Fabiano Rosas wrote: > > Peter Xu writes: > > > > > [I queued patch 1-2 into -stable, leaving this patch for further > > > discussions] > > > > > > On Fri, Mar 15, 2024 at 08:55:42AM +, Dani

Re: [PATCH 1/5] target/riscv: Add support for Zve32x extension

2024-03-19 Thread Jason Chien
Ping. Can anyone review the patches please? Jason Chien 於 2024年3月7日 週四 上午1:09寫道: > Add support for Zve32x extension and replace some checks for Zve32f with > Zve32x, since Zve32f depends on Zve32x. > > Signed-off-by: Jason Chien > Reviewed-by: Frank Chang > Reviewed-by: Max Chou > --- > targ

Re: [PATCH 0/5] target/riscv: Support Zve32x and Zve64x extensions

2024-03-19 Thread Jason Chien
Ping. Can anyone review the patches please? Jason Chien 於 2024年3月7日 週四 上午1:09寫道: > This patch series adds the support for Zve32x and Zvx64x and makes vector > registers visible in GDB if any of the V/Zve*/Zvk* extensions is enabled. > > Jason Chien (5): > target/riscv: Add support for Zve32x e

[PATCH v2 3/6] target/hppa: fix access_id check

2024-03-19 Thread Sven Schnelle
PA2.0 provides 8 instead of 4 PID registers. Signed-off-by: Sven Schnelle --- target/hppa/mem_helper.c | 59 +--- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 80f51e753f..f89ba91b20 1

Re: [RFC PATCH-for-9.1 8/8] target/microblaze: Widen $ear to 64-bit

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > The Exception Address Register is 64-bit wide. > User emulation only access the 32 lower bits. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/cpu.h | 2 +- > linux-user/elfload.c | 2 +- > target/microblaze/gdbstub.

[PATCH v2 4/6] target/hppa: exit tb on flush cache instructions

2024-03-19 Thread Sven Schnelle
When the guest modifies the tb it is currently executing from, it executes a fic instruction. Exit the tb on such instruction, otherwise we might execute stale code. Signed-off-by: Sven Schnelle --- target/hppa/insns.decode | 6 +++--- target/hppa/translate.c | 11 +++ 2 files changed,

[PATCH v2 0/6] few fixes for hppa target

2024-03-19 Thread Sven Schnelle
Hi, here are a few fixes for the hppa target i made while debugging some wide mode issues. Changes in v2: - use Richards version for access id matching - add trans_fic() Sven Schnelle (6): target/hppa: ldcw,s uses static shift of 3 target/hppa: fix shrp for wide mode target/hppa: fix acce

[PATCH v2 1/6] target/hppa: ldcw,s uses static shift of 3

2024-03-19 Thread Sven Schnelle
Fixes: 96d6407f363 ("target-hppa: Implement loads and stores") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index eb2046c5ad..6a513d7d5

[PATCH v2 6/6] target/hppa: fix do_stdby_e()

2024-03-19 Thread Sven Schnelle
stdby,e,m was writing data from the wrong half of the register into memory for cases 0-3. Fixes: 25460fc5a71 ("target/hppa: Implement STDBY") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson --- target/hppa/op_helper.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH v2 2/6] target/hppa: fix shrp for wide mode

2024-03-19 Thread Sven Schnelle
Fixes: f7b775a9c075 ("target/hppa: Implement SHRPD") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index

[PATCH v2 5/6] target/hppa: mask privilege bits in mfia

2024-03-19 Thread Sven Schnelle
mfia should return only the iaoq bits without privilege bits. Fixes: 98a9cb792c8 ("target-hppa: Implement system and memory-management insns") Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson Reviewed-by: Helge Deller --- target/hppa/translate.c | 2 +- 1 file changed, 1 insertion(+

Re: [PATCH v3 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-19 Thread Alex Bennée
Marcin Juszkiewicz writes: > Updating sbsa-ref firmware for QEMU CI was manual task. Now it is > replaced by CI job run on CodeLinaro Gitlab instance. > > This patchset updates to current state: > > - Trusted Firmware v2.10.2 (latest LTS) > - Tianocore EDK2 stable202402 (latest release) > > And T

Re: [PATCH v5 24/25] qapi: Tighten check whether implicit object type already exists

2024-03-19 Thread John Snow
On Tue, Mar 19, 2024, 12:02 PM Markus Armbruster wrote: > John Snow writes: > > > On Fri, Mar 15, 2024, 11:23 AM Markus Armbruster > wrote: > > > >> Entities with names starting with q_obj_ are implicit object types. > >> Therefore, QAPISchema._make_implicit_object_type()'s .lookup_entity() > >

Re: [PATCH for-9.0] qapi: drop unused QCryptoBlockCreateOptionsLUKS.detached-header

2024-03-19 Thread Markus Armbruster
Daniel P. Berrangé writes: > The 'detached-header' field in QCryptoBlockCreateOptionsLUKS > was left over from earlier patch iterations. > > Signed-off-by: Daniel P. Berrangé > --- > qapi/crypto.json | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/qapi/crypto.json b

Re: [PATCH v5 24/25] qapi: Tighten check whether implicit object type already exists

2024-03-19 Thread Markus Armbruster
John Snow writes: > On Fri, Mar 15, 2024, 11:23 AM Markus Armbruster wrote: > >> Entities with names starting with q_obj_ are implicit object types. >> Therefore, QAPISchema._make_implicit_object_type()'s .lookup_entity() >> can only return a QAPISchemaObjectType. Assert that. >> >> Signed-off-

Re: [PATCH-for-9.1 5/8] target/microblaze: Restrict 64-bit 'res_addr' to system emulation

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > 'res_addr' is only used in system emulation, where we have > TARGET_LONG_BITS = 64, so we can directly use the native > uint64_t type instead of target_ulong. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/cpu.h | 10 +--

Re: [PATCH-for-9.1 7/8] target/microblaze: Move MMU helpers to sys_helper.c

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > MMU helpers are only used during system emulation, > move them to sys_helper.c. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/op_helper.c | 48 -- > target/microblaze/sys_helper.c | 47 +++

Re: [PATCH-for-9.1 00/27] accel/tcg: Introduce TCGCPUOps::get_cpu_state() handler

2024-03-19 Thread Claudio Fontana
Thanks Philippe, I fear I am unable to really be uptodate, but it's great to see all the cleanup you and others have done! Ciao, Claudio On 3/19/24 16:48, Philippe Mathieu-Daudé wrote: > (Forgot to Cc Claudio to keep him updated) > > On 19/3/24 16:42, Philippe Mathieu-Daudé wrote: >> Hi, >> >>

Re: [PATCH-for-9.1 6/8] target/microblaze: Rename helper.c -> sys_helper.c

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > helper.c only contains system emulation helpers, > rename it as sys_helper.c. > Adapt meson and remove pointless #ifdef'ry. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/{helper.c => sys_helper.c} | 5 + > target/microblaze/m

Re: [PATCH-for-9.1 4/8] target/microblaze: Use 32-bit destination in gen_goto_tb()

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > cpu_pc and jmp_dest are 32-bit. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/translate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c > i

Re: [PATCH v1] target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0'

2024-03-19 Thread Richard Henderson
On 3/18/24 20:32, Song Gao wrote: On gen_ll, if a->imm is 0, The value of t0 should be src1. Links: https://www.openwall.com/lists/musl/2024/03/12/4 Signed-off-by: Song Gao --- target/loongarch/tcg/insn_trans/trans_atomic.c.inc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) d

Re: [PATCH-for-9.1 3/8] target/microblaze: Widen vaddr in mmu_translate()

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > Use 'vaddr' type for virtual addresses. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/mmu.h | 2 +- > target/microblaze/mmu.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target/microblaze/mmu.h b/

Re: [PATCH-for-9.1 2/8] target/microblaze: Use hwaddr/vaddr in cpu_get_phys_page_attrs_debug()

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/helper.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c > index 0a12c4ea94..3f410fc7b5 100644 > --- a/t

[PATCH-for-9.1 05/27] target/arm: Convert to TCGCPUOps::get_cpu_state()

2024-03-19 Thread Philippe Mathieu-Daudé
Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state(). Move mve_no_pred() along because it is only used by arm_get_cpu_state(). Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 5 -- target/arm/internals.h | 2 + target/arm/cpu.c | 110 ++

Re: [PATCH-for-9.1 1/8] target/microblaze: Use correct string format in do_unaligned_access()

2024-03-19 Thread Anton Johansson via
On 19/03/24, Philippe Mathieu-Daudé wrote: > 'addr' is of type 'vaddr'; no need to cast, use the > corresponding format string. > > Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access") > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/helper.c | 4 ++-- > 1 file c

[PATCH-for-9.1 16/27] target/openrisc: Convert to TCGCPUOps::get_cpu_state()

2024-03-19 Thread Philippe Mathieu-Daudé
Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state(). Signed-off-by: Philippe Mathieu-Daudé --- target/openrisc/cpu.h | 12 target/openrisc/cpu.c | 11 +++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h

Re: [PATCH-for-9.1 00/27] accel/tcg: Introduce TCGCPUOps::get_cpu_state() handler

2024-03-19 Thread Philippe Mathieu-Daudé
(Forgot to Cc Claudio to keep him updated) On 19/3/24 16:42, Philippe Mathieu-Daudé wrote: Hi, This series introduce a generic get_cpu_state() handler in TCGCPUOps and convert each target to it. This is required to get a single cpu_get_tb_cpu_state() for heterogeneous emulation (since this met

[PATCH-for-9.1 23/27] target/sh4: Convert to TCGCPUOps::get_cpu_state()

2024-03-19 Thread Philippe Mathieu-Daudé
Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state(). Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/cpu.h | 15 --- target/sh4/cpu.c | 16 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 9211da

[PATCH-for-9.1 24/27] target/sparc: Convert to TCGCPUOps::get_cpu_state()

2024-03-19 Thread Philippe Mathieu-Daudé
Convert cpu_get_tb_cpu_state() to TCGCPUOps::get_cpu_state(). Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.h | 37 ++--- target/sparc/cpu.c | 1 + target/sparc/translate.c | 33 + 3 files changed, 36 inser

Re: [PATCH 2/2] aspeed: Make the ast1030-a1 SoC not user creatable

2024-03-19 Thread Philippe Mathieu-Daudé
On 19/3/24 16:09, Cédric Le Goater wrote: Aspeed SoCs are complex devices that can not be specified on the command line. Fix that to avoid QEMU aborts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227 Fixes: 356b230ed138 ("aspeed/soc : Add AST1030 support") Reported-by: Thomas Huth

Re: [PATCH 00/29] include: move include/qapi/qmp/ to include/qobject/

2024-03-19 Thread Daniel P . Berrangé
Ping I don't want to spend time rebasing without opinions on whether this is a desirable kind of cleanup to make. (obviously this is /not/ for 9.0) On Mon, Jan 08, 2024 at 06:23:36PM +, Daniel P. Berrangé wrote: > To repeat the 1st patch commit message... > > The general expectation is that

<    1   2   3   4   >