Re: tests/avocado: Add LoongArch machine start test

2024-05-30 Thread Jiaxun Yang
在2024年5月31日五月 上午2:52,gaosong写道: > 在 2024/5/30 下午9:16, Jiaxun Yang 写道: >> >> 在2024年5月30日五月 下午2:00,gaosong写道: >> [...] FYI, the test does not seem to work anymore - apparently the binaries have changed and now the hashes do not match anymore. Could you please update it? (preferably

RE: [PATCH v4 12/16] aspeed/soc: Add AST2700 support

2024-05-30 Thread Jamin Lin
Hi Cedric, > From: Cédric Le Goater > Subject: Re: [PATCH v4 12/16] aspeed/soc: Add AST2700 support > > On 5/27/24 10:02, Jamin Lin wrote: > > Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 > CPU). > > > > AST2700 SOC and its interrupt controller are too complex to

Re: [PATCH] Use "void *" as parameter for functions that are used for aio_set_event_notifier()

2024-05-30 Thread Thomas Huth
On 29/05/2024 20.22, Stefan Hajnoczi wrote: On Wed, May 29, 2024 at 07:49:48PM +0200, Thomas Huth wrote: aio_set_event_notifier() and aio_set_event_notifier_poll() in util/aio-posix.c and util/aio-win32.c are casting function pointers of functions that take an "EventNotifier *" pointer as

Re: [PATCH V2 1/3] vl: Allow multiple -overcommit commands

2024-05-30 Thread Thomas Huth
On 30/05/2024 16.01, Zhao Liu wrote: On Mon, May 27, 2024 at 07:19:56AM +0200, Thomas Huth wrote: Date: Mon, 27 May 2024 07:19:56 +0200 From: Thomas Huth Subject: Re: [PATCH V2 1/3] vl: Allow multiple -overcommit commands On 24/05/2024 22.00, Zide Chen wrote: Both cpu-pm and mem-lock are

Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-30 Thread David Gibson
On Thu, May 30, 2024 at 10:03:51AM +0100, Peter Maydell wrote: > On Thu, 30 May 2024 at 01:52, David Gibson > wrote: > > > > On Wed, May 29, 2024 at 02:07:18PM +0300, Oleg Sviridov wrote: > > > Pointer, returned from function 'spapr_vio_find_by_reg', may be NULL and > > > is dereferenced

Re: [PATCH 4/4] hw/s390x: Deprecate the QMP @dump-skeys command

2024-05-30 Thread Thomas Huth
On 30/05/2024 09.45, Philippe Mathieu-Daudé wrote: Prefer @dump-s390-skeys which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/deprecated.rst | 5 + qapi/misc-target.json | 5 + 2 files changed, 10 insertions(+) diff --git a/docs/about/deprecated.rst

Re: [PATCH 0/4] hw/s390x: Alias @dump-skeys -> @dump-s390-skey and deprecate

2024-05-30 Thread Thomas Huth
On 30/05/2024 09.45, Philippe Mathieu-Daudé wrote: We are trying to unify all qemu-system-FOO to a single binary. In order to do that we need to remove QAPI target specific code. @dump-skeys is only available on qemu-system-s390x. This series rename it as @dump-s390-skey, making it available on

Re: Unexpected error in rme_configure_one() at ../target/arm/kvm-rme.c:159

2024-05-30 Thread Itaru Kitayama
> On May 30, 2024, at 22:30, Philippe Mathieu-Daudé wrote: > > Cc'ing more developers > > On 30/5/24 06:30, Itaru Kitayama wrote: >> Hi, >> When I see a Realm VM creation fails with: >> Unexpected error in rme_configure_one() at ../target/arm/kvm-rme.c:159: >> qemu-system-aarch64: RME:

[PATCH v4 09/10] hw/nvme: add reservation protocal command

2024-05-30 Thread Changqi Lu
Add reservation acquire, reservation register, reservation release and reservation report commands in the nvme device layer. By introducing these commands, this enables the nvme device to perform reservation-related tasks, including querying keys, querying reservation status, registering

[PATCH v4 02/10] block/raw: add persistent reservation in/out driver

2024-05-30 Thread Changqi Lu
Add persistent reservation in/out operations for raw driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by:

[PATCH v4 10/10] block/iscsi: add persistent reservation in/out driver

2024-05-30 Thread Changqi Lu
Add persistent reservation in/out operations for iscsi driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by:

[PATCH v4 05/10] hw/scsi: add persistent reservation in/out api for scsi device

2024-05-30 Thread Changqi Lu
Add persistent reservation in/out operations in the SCSI device layer. By introducing the persistent reservation in/out api, this enables the SCSI device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservation keys, initiating and

[PATCH v4 01/10] block: add persistent reservation in/out api

2024-05-30 Thread Changqi Lu
Add persistent reservation in/out operations at the block level. The following operations are included: - read_keys:retrieves the list of registered keys. - read_reservation: retrieves the current reservation status. - register: registers a new reservation key. - reserve:

[PATCH v4 08/10] hw/nvme: enable ONCS and rescap function

2024-05-30 Thread Changqi Lu
This commit enables ONCS to support the reservation function at the controller level. Also enables rescap function in the namespace by detecting the supported reservation function in the backend driver. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/ctrl.c | 3 ++-

[PATCH v4 03/10] scsi/constant: add persistent reservation in/out protocol constants

2024-05-30 Thread Changqi Lu
Add constants for the persistent reservation in/out protocol in the scsi/constant module. The constants include the persistent reservation command, type, and scope values defined in sections 6.13 and 6.14 of the SCSI Primary Commands-4 (SPC-4) specification. Signed-off-by: Changqi Lu

[PATCH v4 04/10] scsi/util: add helper functions for persistent reservation types conversion

2024-05-30 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the persistent reservation types used in the SCSI protocol and those used in the block layer. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/scsi/utils.h | 8 + scsi/utils.c | 81

[PATCH v4 00/10] Support persistent reservation operations

2024-05-30 Thread Changqi Lu
Hi, Patch v4 has been modified. Many thanks to Klaus for the code review. Could anyone please review the core block layer and SCSI layer related codes? v3->v4: - At the nvme layer, the two patches of enabling the ONCS function and enabling rescap are combined into one. - At the nvme layer,

[PATCH v4 07/10] hw/nvme: add helper functions for converting reservation types

2024-05-30 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the reservation types used in the NVME protocol and those used in the block layer. Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/nvme.h | 80

[PATCH v4 06/10] block/nvme: add reservation command protocol constants

2024-05-30 Thread Changqi Lu
Add constants for the NVMe persistent command protocol. The constants include the reservation command opcode and reservation type values defined in section 7 of the NVMe 2.0 specification. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/block/nvme.h | 61

Re: tests/avocado: Add LoongArch machine start test

2024-05-30 Thread gaosong
在 2024/5/30 下午9:16, Jiaxun Yang 写道: 在2024年5月30日五月 下午2:00,gaosong写道: [...] FYI, the test does not seem to work anymore - apparently the binaries have changed and now the hashes do not match anymore. Could you please update it? (preferably with some versioned binaries that do not change in the

Re: [PATCH 5/5] core/cpu-common: initialise plugin state before thread creation

2024-05-30 Thread Pierrick Bouvier
On 5/30/24 12:42, Alex Bennée wrote: Originally I tried to move where vCPU thread initialisation to later in realize. However pulling that thread (sic) got gnarly really quickly. It turns out some steps of CPU realization need values that can only be determined from the running vCPU thread.

Re: [PATCH 4/5] plugins: remove special casing for cpu->realized

2024-05-30 Thread Pierrick Bouvier
On 5/30/24 12:42, Alex Bennée wrote: Now the condition variable is initialised early on we don't need to go through hoops to avoid calling async_run_on_cpu. Signed-off-by: Alex Bennée --- plugins/core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/core.c

Re: [PATCH 3/5] cpu-target: don't set cpu->thread_id to bogus value

2024-05-30 Thread Pierrick Bouvier
On 5/30/24 12:42, Alex Bennée wrote: The thread_id isn't valid until the threads are created. There is no point setting it here. The only thing that cares about the thread_id is qmp_query_cpus_fast. Signed-off-by: Alex Bennée --- cpu-target.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH 1/5] hw/core: expand on the alignment of CPUState

2024-05-30 Thread Pierrick Bouvier
On 5/30/24 12:42, Alex Bennée wrote: Make the relationship between CPUState, ArchCPU and cpu_env a bit clearer in the kdoc comments. Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/hw/core/cpu.h

Re: [PATCH 2/5] cpu: move Qemu[Thread|Cond] setup into common code

2024-05-30 Thread Pierrick Bouvier
On 5/30/24 12:42, Alex Bennée wrote: Aside from the round robin threads this is all common code. By moving the halt_cond setup we also no longer need hacks to work around the race between QOM object creation and thread creation. It is a little ugly to free stuff up for the round robin thread

[PATCH v3 3/6] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control into plugins. From: Alex Bennée Signed-off-by: Alex Bennée Signed-off-by: Pierrick Bouvier --- include/qemu/timer.h | 15 +++

[PATCH v3 4/6] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c

2024-05-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- include/sysemu/qtest.h | 3 --- accel/qtest/qtest.c| 12 system/qtest.c | 12 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index 45f3b7e1df5..c161d751650

[PATCH v3 1/6] sysemu: add set_virtual_time to accel ops

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée We are about to remove direct calls to individual accelerators for this information and will need a central point for plugins to hook into time changes. From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier ---

Re: [PATCH v2 0/6] Implement icount=auto using TCG Plugins

2024-05-30 Thread Pierrick Bouvier
A v3 was just sent, with a fix to the algorithm used. On 5/30/24 10:49, Pierrick Bouvier wrote: The goal here is to be able to scale temporally execution of qemu-user/system, using a given number of instructions per second. We define a virtual clock, that can be late or in advance compared to

[PATCH v3 0/6] Implement icount=auto using TCG Plugins

2024-05-30 Thread Pierrick Bouvier
The goal here is to be able to scale temporally execution of qemu-user/system, using a given number of instructions per second. We define a virtual clock, that can be late or in advance compared to real time. When we are in advance, we slow execution (by sleeping) until catching real time.

[PATCH v3 6/6] contrib/plugins: add ips plugin example for cost modeling

2024-05-30 Thread Pierrick Bouvier
This plugin uses the new time control interface to make decisions about the state of time during the emulation. The algorithm is currently very simple. The user specifies an ips rate which applies per core. If the core runs ahead of its allocated execution time the plugin sleeps for a bit to let

[PATCH v3 5/6] plugins: add time control API

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée Expose the ability to control time through the plugin API. Only one plugin can control time so it has to request control when loaded. There are probably more corner cases to catch here. From: Alex Bennée Signed-off-by: Alex Bennée Signed-off-by: Pierrick Bouvier ---

[PATCH v3 2/6] qtest: use cpu interface in qtest_clock_warp

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée This generalises the qtest_clock_warp code to use the AccelOps handlers for updating its own sense of time. This will make the next patch which moves the warp code closer to pure code motion. From: Alex Bennée Signed-off-by: Alex Bennée Acked-by: Thomas Huth Signed-off-by:

Re: [PATCH v2 13/18] monitor: fdset: Match against O_DIRECT

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:43PM -0300, Fabiano Rosas wrote: > We're about to enable the use of O_DIRECT in the migration code and > due to the alignment restrictions imposed by filesystems we need to > make sure the flag is only used when doing aligned IO. > > The migration will do parallel IO

Re: [PATCH v2 11/18] migration/multifd: Add direct-io support

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:41PM -0300, Fabiano Rosas wrote: > When multifd is used along with mapped-ram, we can take benefit of a > filesystem that supports the O_DIRECT flag and perform direct I/O in > the multifd threads. This brings a significant performance improvement > because direct-io

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-30 Thread Cord Amfmgm
On Thu, May 30, 2024 at 2:14 PM Alex Bennée wrote: > David Hubbard writes: > > > From: Cord Amfmgm > > > > This changes the way the ohci emulation handles a Transfer Descriptor > with > > "Current Buffer Pointer" set to "Buffer End" + 1. > > > > The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to

Re: [PATCH v2 10/18] migration: Add direct-io parameter

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:40PM -0300, Fabiano Rosas wrote: > Add the direct-io migration parameter that tells the migration code to > use O_DIRECT when opening the migration stream file whenever possible. > > This is currently only used with the mapped-ram migration that has a > clear window

Re: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-05-30 Thread Cord Amfmgm
On Thu, May 30, 2024 at 2:12 PM Alex Bennée wrote: > Cord Amfmgm writes: > > > On Thu, May 30, 2024 at 3:33 AM Alex Bennée > wrote: > > > > Cord Amfmgm writes: > > > > > On Tue, May 28, 2024 at 11:32 AM Peter Maydell < > peter.mayd...@linaro.org> wrote: > > > > > > On Tue, 28 May 2024 at

Re: [PATCH v2 09/18] io: Stop using qemu_open_old in channel-file

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:39PM -0300, Fabiano Rosas wrote: > We want to make use of the Error object to report fdset errors from > qemu_open_internal() and passing the error pointer to qemu_open_old() > would require changing all callers. Move the file channel to the new > API instead. > >

Re: [PATCH v2 08/18] monitor: Report errors from monitor_fdset_dup_fd_add

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:38PM -0300, Fabiano Rosas wrote: > I'm keeping the EACCES because callers expect to be able to look at > errno. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 06/18] monitor: Stop removing non-duplicated fds

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:36PM -0300, Fabiano Rosas wrote: > We've been up until now cleaning up any file descriptors that have > been passed into QEMU and never duplicated[1,2]. A file descriptor > without duplicates indicates that no part of QEMU has made use of > it. This approach is

Re: [PATCH v2 05/18] monitor: Introduce monitor_fdset_*free

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:35PM -0300, Fabiano Rosas wrote: > Introduce two new functions to remove and free no longer used fds and > fdsets. > > We need those to decouple the remove/free routines from > monitor_fdset_cleanup() which will go away in the next patches. > > The new functions: >

RE: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-30 Thread Sean Hefty
> > For rdma programming, the current mainstream implementation is to use > rdma_cm to establish a connection, and then use verbs to transmit data. > > > > rdma_cm and ibverbs create two FDs respectively. The two FDs have > > different responsibilities. rdma_cm fd is used to notify connection > >

[PATCH 1/5] hw/core: expand on the alignment of CPUState

2024-05-30 Thread Alex Bennée
Make the relationship between CPUState, ArchCPU and cpu_env a bit clearer in the kdoc comments. Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index

[PATCH 2/5] cpu: move Qemu[Thread|Cond] setup into common code

2024-05-30 Thread Alex Bennée
Aside from the round robin threads this is all common code. By moving the halt_cond setup we also no longer need hacks to work around the race between QOM object creation and thread creation. It is a little ugly to free stuff up for the round robin thread but better it deal with its own

[PATCH 4/5] plugins: remove special casing for cpu->realized

2024-05-30 Thread Alex Bennée
Now the condition variable is initialised early on we don't need to go through hoops to avoid calling async_run_on_cpu. Signed-off-by: Alex Bennée --- plugins/core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/core.c b/plugins/core.c index

[PATCH 5/5] core/cpu-common: initialise plugin state before thread creation

2024-05-30 Thread Alex Bennée
Originally I tried to move where vCPU thread initialisation to later in realize. However pulling that thread (sic) got gnarly really quickly. It turns out some steps of CPU realization need values that can only be determined from the running vCPU thread. However having moved enough out of the

[PATCH 0/5] cpus: a few tweaks to CPU realization

2024-05-30 Thread Alex Bennée
The recent IPS plugin exposed a race condition between vcpu_init callbacks and the other vcpu state callbacks. I originally thought there was some wider re-factoring to be done to clean this up but it turns out things are broadly where they should be. However some of the stuff allocated in the

[PATCH 3/5] cpu-target: don't set cpu->thread_id to bogus value

2024-05-30 Thread Alex Bennée
The thread_id isn't valid until the threads are created. There is no point setting it here. The only thing that cares about the thread_id is qmp_query_cpus_fast. Signed-off-by: Alex Bennée --- cpu-target.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cpu-target.c b/cpu-target.c index

Re: [PATCH V1 00/26] Live update: cpr-exec

2024-05-30 Thread Peter Xu
On Thu, May 30, 2024 at 01:17:05PM -0400, Steven Sistare wrote: > On 5/28/2024 12:42 PM, Peter Xu wrote: > > On Tue, May 28, 2024 at 11:10:27AM -0400, Steven Sistare wrote: > > > On 5/27/2024 1:45 PM, Peter Xu wrote: > > > > On Tue, May 21, 2024 at 07:46:12AM -0400, Steven Sistare wrote: > > > > >

Re: [RFC PATCH] cpus: split qemu_init_vcpu and delay vCPU thread creation

2024-05-30 Thread Alex Bennée
Pierrick Bouvier writes: > On 5/29/24 08:22, Alex Bennée wrote: >> This ensures we don't start the thread until cpu_common_realizefn has >> finished. This ensures that plugins will always run >> qemu_plugin_vcpu_init__async first before any other states. It doesn't >> totally eliminate the race

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-30 Thread Alex Bennée
David Hubbard writes: > From: Cord Amfmgm > > This changes the way the ohci emulation handles a Transfer Descriptor with > "Current Buffer Pointer" set to "Buffer End" + 1. > > The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be > to signal the buffer has zero length.

Re: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-05-30 Thread Alex Bennée
Cord Amfmgm writes: > On Thu, May 30, 2024 at 3:33 AM Alex Bennée wrote: > > Cord Amfmgm writes: > > > On Tue, May 28, 2024 at 11:32 AM Peter Maydell > wrote: > > > > On Tue, 28 May 2024 at 16:37, Cord Amfmgm wrote: > > > > > > On Tue, May 28, 2024 at 9:03 AM Peter Maydell >

Re: [PATCH V1 19/26] physmem: preserve ram blocks for cpr

2024-05-30 Thread Peter Xu
On Thu, May 30, 2024 at 01:12:40PM -0400, Steven Sistare wrote: > On 5/29/2024 3:25 PM, Peter Xu wrote: > > On Wed, May 29, 2024 at 01:31:53PM -0400, Steven Sistare wrote: > > > On 5/28/2024 5:44 PM, Peter Xu wrote: > > > > On Mon, Apr 29, 2024 at 08:55:28AM -0700, Steve Sistare wrote: > > > > >

Re: [PATCH V1 17/26] machine: memfd-alloc option

2024-05-30 Thread Peter Xu
On Thu, May 30, 2024 at 01:11:09PM -0400, Steven Sistare wrote: > On 5/29/2024 3:14 PM, Peter Xu wrote: > > On Wed, May 29, 2024 at 01:31:38PM -0400, Steven Sistare wrote: > > > > > diff --git a/system/memory.c b/system/memory.c > > > > > index 49f1cb2..ca04a0e 100644 > > > > > ---

Re: [PATCH V1 07/26] migration: VMStateId

2024-05-30 Thread Peter Xu
On Thu, May 30, 2024 at 01:11:26PM -0400, Steven Sistare wrote: > On 5/29/2024 2:53 PM, Peter Xu wrote: > > On Wed, May 29, 2024 at 01:30:18PM -0400, Steven Sistare wrote: > > > How about a more general name for the type: > > > > > > migration/misc.h > > > typedef char (MigrationId)[256]; >

[PATCH v2 6/6] contrib/plugins: add ips plugin example for cost modeling

2024-05-30 Thread Pierrick Bouvier
This plugin uses the new time control interface to make decisions about the state of time during the emulation. The algorithm is currently very simple. The user specifies an ips rate which applies per core. If the core runs ahead of its allocated execution time the plugin sleeps for a bit to let

[PATCH v2 5/6] plugins: add time control API

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée Expose the ability to control time through the plugin API. Only one plugin can control time so it has to request control when loaded. There are probably more corner cases to catch here. From: Alex Bennée Signed-off-by: Alex Bennée Signed-off-by: Pierrick Bouvier ---

[PATCH v2 2/6] qtest: use cpu interface in qtest_clock_warp

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée This generalises the qtest_clock_warp code to use the AccelOps handlers for updating its own sense of time. This will make the next patch which moves the warp code closer to pure code motion. From: Alex Bennée Signed-off-by: Alex Bennée Acked-by: Thomas Huth Signed-off-by:

[PATCH v2 3/6] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control into plugins. From: Alex Bennée Signed-off-by: Alex Bennée Signed-off-by: Pierrick Bouvier --- include/qemu/timer.h | 15 +++

[PATCH v2 4/6] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c

2024-05-30 Thread Pierrick Bouvier
Signed-off-by: Pierrick Bouvier --- include/sysemu/qtest.h | 3 --- accel/qtest/qtest.c| 12 system/qtest.c | 12 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index 45f3b7e1df5..c161d751650

[PATCH v2 1/6] sysemu: add set_virtual_time to accel ops

2024-05-30 Thread Pierrick Bouvier
From: Alex Bennée We are about to remove direct calls to individual accelerators for this information and will need a central point for plugins to hook into time changes. From: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier ---

[PATCH v2 0/6] Implement icount=auto using TCG Plugins

2024-05-30 Thread Pierrick Bouvier
The goal here is to be able to scale temporally execution of qemu-user/system, using a given number of instructions per second. We define a virtual clock, that can be late or in advance compared to real time. When we are in advance, we slow execution (by sleeping) until catching real time.

Re: [PATCH RISU v2 06/13] risugen: Add sparc64 support

2024-05-30 Thread Richard Henderson
On 5/30/24 06:23, Peter Maydell wrote: +sub open_asm($) +{ +my ($basename) = @_; +my $fname = $basename . ".s"; +open(ASM, ">", $fname) or die "can't open $fname: $!"; +select ASM; I think that using Perl select like this is liable to be rather confusing, because it has "action

Re: [PATCH 2/5] qtest: use cpu interface in qtest_clock_warp

2024-05-30 Thread Pierrick Bouvier
On 5/29/24 23:32, Paolo Bonzini wrote: On Fri, May 17, 2024 at 12:21 AM Pierrick Bouvier wrote: From: Alex Bennée This generalises the qtest_clock_warp code to use the AccelOps handlers for updating its own sense of time. This will make the next patch which moves the warp code closer to

Re: [PATCH RISU v2 05/13] risugen: Be explicit about print destinations

2024-05-30 Thread Richard Henderson
On 5/30/24 05:51, Peter Maydell wrote: @@ -87,13 +87,13 @@ sub progress_update($) my $barlen = int($proglen * $done / $progmax); if ($barlen != $lastprog) { $lastprog = $barlen; -print "[" . "-" x $barlen . " " x ($proglen - $barlen) . "]\r"; +print STDOUT

Re: [RFC PATCH] cpus: split qemu_init_vcpu and delay vCPU thread creation

2024-05-30 Thread Pierrick Bouvier
On 5/29/24 08:22, Alex Bennée wrote: This ensures we don't start the thread until cpu_common_realizefn has finished. This ensures that plugins will always run qemu_plugin_vcpu_init__async first before any other states. It doesn't totally eliminate the race that plugin_cpu_update__locked has to

Re: [PATCH 1/5] sysemu: add set_virtual_time to accel ops

2024-05-30 Thread Pierrick Bouvier
On 5/29/24 23:30, Paolo Bonzini wrote: On Fri, May 17, 2024 at 12:21 AM Pierrick Bouvier wrote: diff --git a/stubs/meson.build b/stubs/meson.build index 3b9d42023cb..672213b7482 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -3,6 +3,11 @@ # below, so that it is clear who needs the

Re: [PATCH V1 00/26] Live update: cpr-exec

2024-05-30 Thread Steven Sistare via
On 5/28/2024 12:42 PM, Peter Xu wrote: On Tue, May 28, 2024 at 11:10:27AM -0400, Steven Sistare wrote: On 5/27/2024 1:45 PM, Peter Xu wrote: On Tue, May 21, 2024 at 07:46:12AM -0400, Steven Sistare wrote: I understand, thanks. If I can help with any of your todo list, just ask - steve

Re: [PATCH V1 19/26] physmem: preserve ram blocks for cpr

2024-05-30 Thread Steven Sistare via
On 5/29/2024 3:25 PM, Peter Xu wrote: On Wed, May 29, 2024 at 01:31:53PM -0400, Steven Sistare wrote: On 5/28/2024 5:44 PM, Peter Xu wrote: On Mon, Apr 29, 2024 at 08:55:28AM -0700, Steve Sistare wrote: Preserve fields of RAMBlocks that allocate their host memory during CPR so the RAM

Re: [PATCH V1 07/26] migration: VMStateId

2024-05-30 Thread Steven Sistare via
On 5/29/2024 2:53 PM, Peter Xu wrote: On Wed, May 29, 2024 at 01:30:18PM -0400, Steven Sistare wrote: How about a more general name for the type: migration/misc.h typedef char (MigrationId)[256]; How about qemu/typedefs.h? Not sure whether it's applicable. Markus (in the loop) may have

Re: [PATCH V1 17/26] machine: memfd-alloc option

2024-05-30 Thread Steven Sistare via
On 5/29/2024 3:14 PM, Peter Xu wrote: On Wed, May 29, 2024 at 01:31:38PM -0400, Steven Sistare wrote: diff --git a/system/memory.c b/system/memory.c index 49f1cb2..ca04a0e 100644 --- a/system/memory.c +++ b/system/memory.c @@ -1552,8 +1552,9 @@ bool memory_region_init_ram_nomigrate(MemoryRegion

Re: [PATCH V1 05/26] migration: precreate vmstate

2024-05-30 Thread Steven Sistare via
On 5/29/2024 2:39 PM, Peter Xu wrote: On Tue, May 28, 2024 at 11:09:49AM -0400, Steven Sistare wrote: On 5/27/2024 2:16 PM, Peter Xu wrote: On Mon, Apr 29, 2024 at 08:55:14AM -0700, Steve Sistare wrote: Provide the VMStateDescription precreate field to mark objects that must be loaded on the

Re: [PATCH v2 03/18] tests/qtest/migration: Add a precopy file test with fdset

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:33PM -0300, Fabiano Rosas wrote: > Add a test for file migration using fdset. The passing of fds is more > complex than using a file path. This is also the scenario where it's > most important we ensure that the initial migration stream offset is > respected because

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-30 Thread Chen, Zide
On 5/30/2024 6:54 AM, Zhao Liu wrote: > Hi Zide, > > On Wed, May 29, 2024 at 10:31:21AM -0700, Chen, Zide wrote: >> Date: Wed, 29 May 2024 10:31:21 -0700 >> From: "Chen, Zide" >> Subject: Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off >> >> >> >> On 5/29/2024 5:46 AM, Igor Mammedov

Re: [PATCH v2 02/18] tests/qtest/migration: Fix file migration offset check

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:32PM -0300, Fabiano Rosas wrote: > When doing file migration, QEMU accepts an offset that should be > skipped when writing the migration stream to the file. The purpose of > the offset is to allow the management layer to put its own metadata at > the start of the

Re: [PATCH v2 01/18] migration: Fix file migration with fdset

2024-05-30 Thread Peter Xu
On Thu, May 23, 2024 at 04:05:31PM -0300, Fabiano Rosas wrote: > When the "file:" migration support was added we missed the special > case in the qemu_open_old implementation that allows for a particular > file name format to be used to refer to a set of file descriptors that > have been

Re: hw/usb/hcd-ohci: Fix #1510, #303: pid not IN or OUT

2024-05-30 Thread Cord Amfmgm
On Thu, May 30, 2024 at 3:33 AM Alex Bennée wrote: > Cord Amfmgm writes: > > > On Tue, May 28, 2024 at 11:32 AM Peter Maydell > wrote: > > > > On Tue, 28 May 2024 at 16:37, Cord Amfmgm wrote: > > > > > > On Tue, May 28, 2024 at 9:03 AM Peter Maydell < > peter.mayd...@linaro.org> wrote: > >

Re: [PATCH] hw/riscv/virt.c: add address-cells in create_fdt_one_aplic()

2024-05-30 Thread Conor Dooley
On Thu, May 30, 2024 at 09:26:58AM -0300, Daniel Henrique Barboza wrote: > > > On 5/30/24 08:06, Andrew Jones wrote: > > On Thu, May 30, 2024 at 01:05:41PM GMT, Andrew Jones wrote: > > > On Thu, May 30, 2024 at 05:49:49AM GMT, Daniel Henrique Barboza wrote: > > > > We need #address-cells

Re: [PATCH 1/2] accel/tcg: Make TCGCPUOps::cpu_exec_halt return bool for whether to halt

2024-05-30 Thread Peter Maydell
On Tue, 30 Apr 2024 at 18:15, Alex Bennée wrote: > The x86 version is essentially being called for side effects. Do we want > to document this usage in the method? I plan to take these two patches into target-arm.next, with a slightly beefed up doc comment: /** * @cpu_exec_halt:

[RFC PATCH 0/1] vhost-user: Add SHMEM_MAP/UNMAP requests

2024-05-30 Thread Albert Esteve
Hi all, This is an early attempt to have backends support dynamic fd mapping into shared memory regions. As such, there are a few things that need settling, so I wanted to post this first to have some early feedback. The usecase for this is, e.g., to support vhost-user-gpu RESOURCE_BLOB

[RFC PATCH 1/1] vhost-user: add shmem mmap request

2024-05-30 Thread Albert Esteve
Add SHMEM_MAP/UNMAP requests to vhost-user. This request allows backends to dynamically map fds into a shared memory region indentified by its `shmid`. Then, the fd memory is advertised to the frontend through a BAR+offset, so it can be read by the driver while its valid. Then, the backend can

Re: [Semihosting Tests PATCH v2 1/3] .editorconfig: add code conventions for tooling

2024-05-30 Thread Brian Cain
On 5/30/2024 6:23 AM, Alex Bennée wrote: It's a pain when you come back to a code base you haven't touched in a while and realise whatever indent settings you were using having carried over. Add an editorconfig and be done with it. Signed-off-by: Alex Bennée Adding an editorconfig seems

Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs

2024-05-30 Thread Peter Maydell
On Tue, 21 May 2024 at 00:26, David Hubbard wrote: > > From: Cord Amfmgm > > This changes the way the ohci emulation handles a Transfer Descriptor with > "Current Buffer Pointer" set to "Buffer End" + 1. > > The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be > to signal

[PATCH v2 0/3] semihosting: Restrict to TCG

2024-05-30 Thread Philippe Mathieu-Daudé
v2: Address Paolo's comment Semihosting currently uses the TCG probe_access API, so it is pointless to have it in the binary when TCG isn't. It could be implemented for other accelerators, but work need to be done. Meanwhile, do not enable it unless TCG is available. Philippe Mathieu-Daudé (3):

[PATCH v2 2/3] target/riscv: Restrict semihosting to TCG

2024-05-30 Thread Philippe Mathieu-Daudé
Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 3/3] semihosting: Restrict to TCG

2024-05-30 Thread Philippe Mathieu-Daudé
Semihosting currently uses the TCG probe_access API. It is pointless to have it in the binary when TCG isn't. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- semihosting/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/Kconfig

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-30 Thread Sean Christopherson
On Thu, May 30, 2024, Igor Mammedov wrote: > On Thu, 30 May 2024 21:54:47 +0800 Zhao Liu wrote: ... > > > >> following, CPUID_EXT_MONITOR is set after x86_cpu_filter_features(), so > > > >> that it doesn't have a chance to check MWAIT against host features and > > > >> will be advertised to the

[PATCH v2 1/3] target/mips: Restrict semihosting to TCG

2024-05-30 Thread Philippe Mathieu-Daudé
Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- target/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-30 Thread Igor Mammedov
On Thu, 30 May 2024 21:54:47 +0800 Zhao Liu wrote: > Hi Zide, > > On Wed, May 29, 2024 at 10:31:21AM -0700, Chen, Zide wrote: > > Date: Wed, 29 May 2024 10:31:21 -0700 > > From: "Chen, Zide" > > Subject: Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off > > > > > > > > On 5/29/2024 5:46

Re: [PATCH] target/arm: Disable SVE extensions when SVE is disabled

2024-05-30 Thread Peter Maydell
On Sun, 26 May 2024 at 21:46, Richard Henderson wrote: > > From: Marcin Juszkiewicz > > Cc: qemu-sta...@nongnu.org > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2304 > Reported-by: Marcin Juszkiewicz > Signed-off-by: Richard Henderson > --- Applied to target-arm.next, thanks.

Re: [PATCH] hw/net: prevent potential NULL dereference

2024-05-30 Thread Олег Свиридов
Thanks for review. Would it be correct to use hcall_dprintf() as in other functions of the module? For example, in h_add_logical_lan_buffer(). Best regards, Oleg. 29.05.2024 16:52, Philippe Mathieu-Daudé пишет: On 29/5/24 13:07, Oleg Sviridov wrote: Pointer, returned from function

Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off

2024-05-30 Thread Igor Mammedov
On Thu, 30 May 2024 21:54:47 +0800 Zhao Liu wrote: > Hi Zide, > > On Wed, May 29, 2024 at 10:31:21AM -0700, Chen, Zide wrote: > > Date: Wed, 29 May 2024 10:31:21 -0700 > > From: "Chen, Zide" > > Subject: Re: [PATCH V2 0/3] improve -overcommit cpu-pm=on|off > > > > > > > > On 5/29/2024 5:46

Re: [QEMU][PATCH 1/1] hw/net/can: Fix sorting of the tx queue

2024-05-30 Thread Francisco Iglesias
Hi Shiva, On Wed, May 29, 2024 at 03:54:58PM +0530, Shiva sagar Myana wrote: > Returning an uint32_t casted to a gint from g_cmp_ids causes the tx queue to > become wrongly sorted when executing g_slist_sort. Fix this by always > returning -1 or 1 from g_cmp_ids based on the ID comparison

Re: [PATCH v3 00/33] target/arm: Convert a64 advsimd to decodetree (part 1b)

2024-05-30 Thread Peter Maydell
On Tue, 28 May 2024 at 21:31, Richard Henderson wrote: > > Changes for v3: > * Reword prefetch unpredictable patch. > * Validate vector length when qc is an implied operand. > * Adjust some legacy decode based on review. > * Apply r-b. > > Patches needing review: >

Re: [Semihosting Tests PATCH v2 0/3] add SYS_GET_CMDLINE test

2024-05-30 Thread Peter Maydell
On Thu, 30 May 2024 at 12:23, Alex Bennée wrote: > > Hi Peter, > > Looking at bug #2322 I wanted to make sure SYS_GET_CMDLINE works as I > expected. While at it I needed to fix a compile error with headers > which I guess we got away with on earlier compilers. > > I've added an editorconfig for

Re: [PATCH v3 04/33] target/arm: Convert SUQADD and USQADD to gvec

2024-05-30 Thread Peter Maydell
On Tue, 28 May 2024 at 21:31, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > target/arm/helper.h| 16 + > target/arm/tcg/translate-a64.h | 6 ++ > target/arm/tcg/gengvec64.c | 110 > target/arm/tcg/translate-a64.c |

Re: [PATCH v3 03/33] target/arm: Assert oprsz in range when using vfp.qc

2024-05-30 Thread Peter Maydell
On Tue, 28 May 2024 at 21:30, Richard Henderson wrote: > > Suggested-by: Peter Maydell > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

RE: [PATCH 1/7] docs/migration: add uadk compression feature

2024-05-30 Thread Liu, Yuan1
> -Original Message- > From: Shameerali Kolothum Thodi > Sent: Thursday, May 30, 2024 10:01 PM > To: Liu, Yuan1 ; pet...@redhat.com; faro...@suse.de > Cc: qemu-devel@nongnu.org; Linuxarm ; linwenkai (C) > ; zhangfei@linaro.org; huangchenghai > > Subject: RE: [PATCH 1/7]

Re: [PATCH v3 12/33] target/arm: Convert SQSHL and UQSHL (register) to gvec

2024-05-30 Thread Peter Maydell
On Tue, 28 May 2024 at 21:33, Richard Henderson wrote: > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

  1   2   3   >