Re: [PATCH v4 1/2] avocado_qemu/__init__.py: factor out the qemu-img finding

2023-04-20 Thread Harsh Prateek Bora
Kautuk Consul wrote: > Adding Harsh Prateek Bora. > > On 2023-04-20 23:23:21, Kautuk Consul wrote: > > Factor out the code that finds the qemu-img binary in the > > QemuSystemTest class and create a new get_qemu_img() function > > with it. This function will get called also from the new code > > i

Re: [PATCH 10/10] xxhash: remove qemu_xxhash7

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:00, Alex Bennée wrote: Now we no longer have users for qemu_xxhash7 we can drop an additional multiply and rol and make qemu_xxhash6 the implementation. Adjust the smaller hash functions accordingly. Signed-off-by: Alex Bennée --- include/qemu/xxhash.h | 17 - 1

Re: [PATCH 09/10] hw/9pfs: use qemu_xxhash4

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:35, Christian Schoenebeck wrote: On Thursday, April 20, 2023 5:00:08 PM CEST Alex Bennée wrote: No need to pass zeros as we have helpers that do that for us. Signed-off-by: Alex Bennée --- hw/9pfs/9p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/

Re: [PATCH 03/10] trace: remove vcpu_id from the TraceEvent structure

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:00, Alex Bennée wrote: This does involve temporarily stubbing out some helper functions before we excise the rest of the code. Signed-off-by: Alex Bennée --- trace/control-internal.h | 4 ++-- trace/event-internal.h| 2 -- trace/control.c | 10

Re: [PATCH 07/10] trace: remove control-vcpu.h

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:00, Alex Bennée wrote: Now we no longer have vcpu controlled trace events we can excise the code that allows us to query its status. Signed-off-by: Alex Bennée --- trace/control-vcpu.h | 47 --- trace/qmp.c | 2 +- sc

Re: [PATCH 02/10] trace-events: remove the remaining vcpu trace events

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:00, Alex Bennée wrote: While these are all in helper functions being designated vcpu events complicates the removal of the dynamic vcpu state code. TCG plugins allow you to instrument vcpu_[init|exit|idle]. Signed-off-by: Alex Bennée --- hw/core/cpu-common.c | 2 -- trace/co

Re: [PATCH v4 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Harsh Prateek Bora
On 4/21/23 12:08, Kautuk Consul wrote: Adding Harsh Prateek Bora . On 2023-04-20 23:23:22, Kautuk Consul wrote: Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https:/

Re: [PATCH 2/3] docs/specs: Convert pci-serial.txt to rst

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 18:03, Peter Maydell wrote: Convert pci-serial.txt to reStructuredText. This includes some wordsmithing, and the correction of the docs to note that the Windows inf file includes 2x and 4x support (as it has done since commit dc9528fdf9f61 in 2014). Signed-off-by: Peter Maydell ---

Re: [PATCH v4 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Kautuk Consul
Adding Harsh Prateek Bora . On 2023-04-20 23:23:22, Kautuk Consul wrote: > Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the > boot_linux.py test-case due to which the code coverage for ppc > decreased by around 2%. As per the discussion on > https://lore.kernel.org/qemu-devel/87sfdpqcy

Re: [PATCH v4 1/2] avocado_qemu/__init__.py: factor out the qemu-img finding

2023-04-20 Thread Kautuk Consul
Adding Harsh Prateel Bora. On 2023-04-20 23:23:21, Kautuk Consul wrote: > Factor out the code that finds the qemu-img binary in the > QemuSystemTest class and create a new get_qemu_img() function > with it. This function will get called also from the new code > in tuxrun_baselines.py avocado test-

Re: [PATCH v4 0/2] Improve code coverage for ppc64

2023-04-20 Thread Kautuk Consul
Adding Harsh Prateek Bora. On 2023-04-20 23:23:20, Kautuk Consul wrote: > Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the > boot_linux.py test-case due to which the code coverage for ppc > decreased by around 2%. As per the discussion on > https://lore.kernel.org/qemu-devel/87sfdpqcy4

Re: [PATCH v3] migration: move migration_global_dump() to migration-hmp-cmds.c

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 14:10, Juan Quintela wrote: It is only used there, so we can make it static. Once there, remove spice.h that it is not used. Signed-off-by: Juan Quintela --- fix David Edmonson ui/qemu-spice.h unintended removal --- include/migration/misc.h | 1 - migration/migration-hmp-

Re: [PATCH v2] spice: move client_migrate_info command to ui/

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 14:37, Juan Quintela wrote: It has nothing to do with migration, except for the "migrate" in the name of the command. Move it with the rest of the ui commands. Signed-off-by: Juan Quintela --- I would claim that it should be only compiled with CONFIG_SPICE, but I left that to spic

Re: [RFC PATCH] hw/pci-bridge: Fix release ordering by embedding PCIBridgeWindows within PCIBridge

2023-04-20 Thread Philippe Mathieu-Daudé
Hi Jonathan, On 20/4/23 16:59, Jonathan Cameron via wrote: The lifetime of the PCIBridgeWindows instance accessed via the windows pointer in struct PCIBridge is managed separately from the PCIBridge itself. Triggered by ./qemu-system-x86_64 -M x-remote -display none -monitor stdio QEMU monitor:

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Thomas Huth
On 17/04/2023 15.43, Alex Bennée wrote: From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user (i.e. the avocado_qemu python module). In the ear

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Thomas Huth
On 21/04/2023 06.19, Cleber Rosa wrote: On 4/18/23 03:10, Thomas Huth wrote: On 17/04/2023 15.43, Alex Bennée wrote: From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being pa

Re: [PATCH 2/9] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:57, Alex Bennée wrote: From: Yohei Kojima This commit adds the following description: 1. `memdev` option is recommended over `mem` option (see [1,2]) 2. users must specify memory for all NUMA nodes (see [2]) This commit also separates descriptions for `mem` and `memdev` into two

Re: [PATCH 9/9] docs/style: call out the use of GUARD macros

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 17:57, Alex Bennée wrote: There use makes our code safer so we should mention them. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- docs/devel/style.rst | 36 1 file changed, 36 insertions(+) diff --git a/docs/devel/sty

Re: [PATCH 8/9] docs/devel: mention the spacing requirement for QOM

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 21:32, Mark Cave-Ayland wrote: On 20/04/2023 16:57, Alex Bennée wrote: We have a more complete document on QOM but we should at least mention the style requirements in the style guide. Signed-off-by: Alex Bennée Cc: Mark Cave-Ayland ---   docs/devel/qom.rst   |  2 ++   docs/devel/

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Philippe Mathieu-Daudé
On 20/4/23 22:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 | (he

Re: [PATCH v4 1/2] avocado_qemu/__init__.py: factor out the qemu-img finding

2023-04-20 Thread Philippe Mathieu-Daudé
On 21/4/23 06:23, Kautuk Consul wrote: Factor out the code that finds the qemu-img binary in the QemuSystemTest class and create a new get_qemu_img() function with it. This function will get called also from the new code in tuxrun_baselines.py avocado test-case. Signed-off-by: Kautuk Consul ---

Re: [PATCH v4 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Philippe Mathieu-Daudé
On 21/4/23 06:23, Kautuk Consul wrote: Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4@linaro.org/ it was mentioned that t

Re: [PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-04-20 Thread Michael S. Tsirkin
On Thu, Apr 20, 2023 at 09:07:06AM -0400, Stefan Hajnoczi wrote: > Setting the VIRTIO Device Status Field to 0 resets the device. The > device's state is lost, including the vring configuration. > > vhost-user.c currently sends SET_STATUS 0 before GET_VRING_BASE. This > risks confusion about the l

Re: [PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-04-20 Thread Yajun Wu
On 4/20/2023 9:07 PM, Stefan Hajnoczi wrote: Setting the VIRTIO Device Status Field to 0 resets the device. The device's state is lost, including the vring configuration. vhost-user.c currently sends SET_STATUS 0 before GET_VRING_BASE. This risks confusion about the lifetime of the vhost-user

[PATCH 11/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Warner Losh added the bind(2), connect(2), accept(2), getpeername(2) syscalls to freebsd_syscall function defined in bsd-user/freebsd/os-syscall.c --- bsd-user/freebsd/os-syscall.c | 21 + 1 file changed, 21 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c b/bs

[PATCH 07/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son added bsd-user/bsd-socket.h, which contains the implementation of the socket related system call shims. --- bsd-user/bsd-socket.h | 61 +++ 1 file changed, 61 insertions(+) create mode 100644 bsd-user/bsd-socket.h diff --git a/bsd-user/b

[PATCH 06/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Karim Taha add bsd-user/bsd-socket.c to meson.build --- bsd-user/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/bsd-user/meson.build b/bsd-user/meson.build index 5243122fc5..f648bd3554 100644 --- a/bsd-user/meson.build +++ b/bsd-user/meson.build @@ -7,6 +7,7 @@ bsd_user_ss

[PATCH 09/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son added the accept(2) syscall to bsd-user/bsd-socket.h. --- bsd-user/bsd-socket.h | 33 + 1 file changed, 33 insertions(+) diff --git a/bsd-user/bsd-socket.h b/bsd-user/bsd-socket.h index f191f22d63..f748266730 100644 --- a/bsd-user/bsd-socket.h ++

[PATCH 10/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son added the getpeername(2) syscall to bsd-user/bsd-socket.h. --- bsd-user/bsd-socket.h | 28 1 file changed, 28 insertions(+) diff --git a/bsd-user/bsd-socket.h b/bsd-user/bsd-socket.h index f748266730..16fae3752a 100644 --- a/bsd-user/bsd-socket.h ++

[PATCH 02/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son add the relevant definitions of struct target_sockaddr and struct target_ip_mreq and the related flags, to be used in bsd-user/bsd-socket.c for the socket conversion functions: target_to_host_sockaddr, host_to_target_sockaddr, target_to_host_ip_mreq --- bsd-user/syscall_defs.h

[PATCH 05/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son add bsd-user/bsd-socket.c, which contains the actual definitions of the socket conversion functions. --- bsd-user/bsd-socket.c | 108 ++ 1 file changed, 108 insertions(+) create mode 100644 bsd-user/bsd-socket.c diff --git a/bsd-user/bsd

[PATCH 04/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son added bsd-user/qemu-bsd.h, required by bsd-user/bsd-socket.h, contains forward declarations of the socket conversion functions defined in bsd-user/bsd-socket.c. --- bsd-user/qemu-bsd.h | 36 1 file changed, 36 insertions(+) create mode 1006

[PATCH 01/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Warner Losh Allow guest_base to be initialized on 64-bit hosts, the initial value is used by g2h_untagged function defined in include/exec/cpu_ldst.h --- bsd-user/main.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bsd-user/main.c b/bsd-user/main.c

[PATCH 03/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Sean Bruno Co-authored-by: Kyle Evans --- bsd-user/syscall_defs.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index f041245792..b594fafecc 100644 --- a/bsd-user/syscall_defs.h +++ b/bsd-user/

[PATCH 00/11] Contribution task implementations, for the 'FreeBSD user emulation improvements' project.

2023-04-20 Thread Karim Taha
Upstream the implementations of bind(2), connect(2), accept(2) and getpeername(2) system calls from the blitz branch of the bsd-user fork hosted at https://github.com/qemu-bsd-user/qemu-bsd-user/tree/blitz. Karim Taha (1): Signed-off-by: Karim Taha Sean Bruno (1): Signed-off-by: Karim Taha

[PATCH 08/11] Signed-off-by: Karim Taha

2023-04-20 Thread Karim Taha
From: Stacey Son added the connect(2) syscall to bsd-user/bsd-socket.h. --- bsd-user/bsd-socket.h | 21 + 1 file changed, 21 insertions(+) diff --git a/bsd-user/bsd-socket.h b/bsd-user/bsd-socket.h index 7da4cf11a0..f191f22d63 100644 --- a/bsd-user/bsd-socket.h +++ b/bsd-use

Re: [PATCH] hw/riscv: virt: Enable booting M-mode or S-mode FW from pflash0

2023-04-20 Thread Bin Meng
On Fri, Apr 21, 2023 at 12:44 PM Sunil V L wrote: > > On Fri, Apr 21, 2023 at 12:39:46PM +0800, Bin Meng wrote: > > On Fri, Apr 21, 2023 at 12:34 PM Sunil V L wrote: > > > > > > Currently, virt machine supports two pflash instances each with > > > 32MB size. However, the first pflash is always as

Re: [PATCH] hw/riscv: virt: Enable booting M-mode or S-mode FW from pflash0

2023-04-20 Thread Sunil V L
On Fri, Apr 21, 2023 at 12:39:46PM +0800, Bin Meng wrote: > On Fri, Apr 21, 2023 at 12:34 PM Sunil V L wrote: > > > > Currently, virt machine supports two pflash instances each with > > 32MB size. However, the first pflash is always assumed to > > contain M-mode firmware and reset vector is set to

Re: [PATCH] hw/riscv: virt: Enable booting M-mode or S-mode FW from pflash0

2023-04-20 Thread Bin Meng
On Fri, Apr 21, 2023 at 12:34 PM Sunil V L wrote: > > Currently, virt machine supports two pflash instances each with > 32MB size. However, the first pflash is always assumed to > contain M-mode firmware and reset vector is set to this if > enabled. Hence, for S-mode payloads like EDK2, only one p

[PATCH] hw/riscv: virt: Enable booting M-mode or S-mode FW from pflash0

2023-04-20 Thread Sunil V L
Currently, virt machine supports two pflash instances each with 32MB size. However, the first pflash is always assumed to contain M-mode firmware and reset vector is set to this if enabled. Hence, for S-mode payloads like EDK2, only one pflash instance is available for use. This means both code and

Re: [PATCH v3 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Kautuk Consul
On 2023-04-21 09:23:52, Harsh Prateek Bora wrote: > > > On 4/21/23 09:12, Kautuk Consul wrote: > > Hi, > > > > On 2023-04-20 19:20:40, Harsh Prateek Bora wrote: > > > Since we are optimising code a lot, one suggestion below: > > > > > > > > > On Thu, Apr 20, 2023 at 6:23 PM Kautuk Consul > >

[PATCH v4 1/2] avocado_qemu/__init__.py: factor out the qemu-img finding

2023-04-20 Thread Kautuk Consul
Factor out the code that finds the qemu-img binary in the QemuSystemTest class and create a new get_qemu_img() function with it. This function will get called also from the new code in tuxrun_baselines.py avocado test-case. Signed-off-by: Kautuk Consul --- tests/avocado/avocado_qemu/__init__.py

[PATCH v4 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Kautuk Consul
Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4@linaro.org/ it was mentioned that the baseline test for ppc64 could be modif

[PATCH v4 0/2] Improve code coverage for ppc64

2023-04-20 Thread Kautuk Consul
Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4@linaro.org/ it was mentioned that the baseline test for ppc64 could be modif

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Cleber Rosa
On 4/18/23 03:10, Thomas Huth wrote: On 17/04/2023 15.43, Alex Bennée wrote: From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user (i.e. the

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Cleber Rosa
On 4/20/23 12:54, John Snow wrote: On Thu, Apr 20, 2023, 5:19 AM Philippe Mathieu-Daudé wrote: On 17/4/23 19:44, Alex Bennée wrote: > > John Snow writes: > >> On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée wrote: >>> >>> From: Kautuk Consul >>> >>>

Re: [PATCH v3 0/2] Improve avocado code coverage for ppc64

2023-04-20 Thread Kautuk Consul
On 2023-04-20 16:01:45, Alex Bennée wrote: > > Kautuk Consul writes: > > > Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the > > boot_linux.py test-case due to which the code coverage for > > powerpc decreased by 2%. This patchset aims to make up this > > 2% code coverage by modifying

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Cleber Rosa
On 4/20/23 05:18, Philippe Mathieu-Daudé wrote: On 17/4/23 19:44, Alex Bennée wrote: John Snow writes: On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée wrote: From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHEC

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Cleber Rosa
On 4/17/23 12:50, John Snow wrote: On Mon, Apr 17, 2023 at 9:43 AM Alex Bennée wrote: From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user

Re: [PATCH v3 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Harsh Prateek Bora
On 4/21/23 09:12, Kautuk Consul wrote: Hi, On 2023-04-20 19:20:40, Harsh Prateek Bora wrote: Since we are optimising code a lot, one suggestion below: On Thu, Apr 20, 2023 at 6:23 PM Kautuk Consul wrote: Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-cas

Re: [PATCH v4 1/6] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Cleber Rosa
On 4/17/23 09:43, Alex Bennée wrote: From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user (i.e. the avocado_qemu python module). In the earl

Re: [PATCH 1/2] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-20 Thread Cleber Rosa
On 3/27/23 07:50, Kautuk Consul wrote: Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user (i.e. the avocado_qemu python module). In the earlier avocado versions

Re: [PATCH v3 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-20 Thread Kautuk Consul
Hi, On 2023-04-20 19:20:40, Harsh Prateek Bora wrote: > Since we are optimising code a lot, one suggestion below: > > > On Thu, Apr 20, 2023 at 6:23 PM Kautuk Consul > wrote: > > > Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the > > boot_linux.py test-case due to which the code co

Re: [PATCH v3 13/20] block/export: rewrite vduse-blk drain code

2023-04-20 Thread Yongji Xie
Hi Stefan, On Thu, Apr 20, 2023 at 7:39 PM Stefan Hajnoczi wrote: > > vduse_blk_detach_ctx() waits for in-flight requests using > AIO_WAIT_WHILE(). This is not allowed according to a comment in > bdrv_set_aio_context_commit(): > > /* >* Take the old AioContex when detaching it from bs. >

[RESEND][QEMU PATCH] accel/kvm: Don't use KVM maximum support number to alloc user memslots

2023-04-20 Thread Robert Hoo
Corrects QEMU to properly use what KVM_CAP_NR_MEMSLOTS means, i.e. the maximum user memslots KVM supports. 1. Rename KVMState::nr_slots --> max_slots. 2. Remember nr_slots in each KML. This also decouples each KML, e.g. x86's two KMLs don't need to have same size of slots[]. 3. Change back initi

RE: [PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-20 Thread Zhang, Chen
> -Original Message- > From: Vladimir Sementsov-Ogievskiy > Sent: Thursday, April 20, 2023 6:53 AM > To: qemu-devel@nongnu.org > Cc: qemu-bl...@nongnu.org; michael.r...@amd.com; arm...@redhat.com; > ebl...@redhat.com; jasow...@redhat.com; quint...@redhat.com; Zhang, > Hailiang ; phi...@

RE: [PATCH v2 4/4] configure: add --disable-colo-filters option

2023-04-20 Thread Zhang, Chen
> -Original Message- > From: Vladimir Sementsov-Ogievskiy > Sent: Thursday, April 20, 2023 7:26 PM > To: Zhang, Chen ; qemu-devel@nongnu.org > Cc: qemu-bl...@nongnu.org; michael.r...@amd.com; arm...@redhat.com; > ebl...@redhat.com; jasow...@redhat.com; quint...@redhat.com; Zhang, > Haili

[RFC PATCH 08/13] gfxstream + rutabaga prep: added need defintions, fields, and options

2023-04-20 Thread Gurchetan Singh
This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga. It also modifies VirtioGPUGL to have the runtime options needed by rutabaga. They are: - a colon separated list of capset names, defined in the virtio spec - a wayland socket path to enable gu

[RFC PATCH 02/13] virtio-gpu: hostmem

2023-04-20 Thread Gurchetan Singh
From: Gerd Hoffmann Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano Acked-by: Michael S. Tsirkin --- hw/display/virtio-gpu-pci.c| 14 ++ hw/display/virtio-gpu.c| 1 + hw/display/virtio-vga.c| 33

[RFC PATCH 03/13] virtio-gpu blob prep: improve decoding and add memory region

2023-04-20 Thread Gurchetan Singh
From: Antonio Caggiano This adds preparatory functions needed to: - decode blob cmds - track memory regions associated with mappable blobs - tracking iovecs Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu

[RFC PATCH 07/13] gfxstream + rutabaga prep: define callbacks in realize function

2023-04-20 Thread Gurchetan Singh
This reduces the amount of renderer backend specific needed to be exposed to the GL device. We only need one realize function per renderer backend. Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-gl.c | 17 +++-- hw/display/virtio-gpu-virgl.c | 35 +

[RFC PATCH 11/13] gfxstream + rutabaga: enable rutabaga

2023-04-20 Thread Gurchetan Singh
This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-base.c | 3 ++- hw/display/virtio-gpu-gl.c | 9 - hw/display/virtio-gpu.c | 5 +++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff

[RFC PATCH 01/13] virtio: Add shared memory capability

2023-04-20 Thread Gurchetan Singh
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by: Dr. David A

[RFC PATCH 05/13] gfxstream + rutabaga prep: virtio_gpu_gl -> virtio_gpu_virgl

2023-04-20 Thread Gurchetan Singh
The virtio-gpu GL device has a heavy dependence on virgl. Acknowledge this by naming functions accurately. Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-gl.c | 27 ++- hw/display/virtio-gpu-virgl.c | 2 +- include/hw/virtio/virtio-gpu.h | 2 +- 3 files c

[RFC PATCH 04/13] virtio-gpu: CONTEXT_INIT feature

2023-04-20 Thread Gurchetan Singh
From: Antonio Caggiano The feature can be enabled when a backend wants it. Signed-off-by: Antonio Caggiano Reviewed-by: Marc-André Lureau Signed-off-by: Gurchetan Singh --- hw/display/virtio-gpu-base.c | 3 +++ include/hw/virtio/virtio-gpu.h | 3 +++ 2 files changed, 6 insertions(+) diff

[RFC PATCH 06/13] gfxstream + rutabaga prep: make GL device more library agnostic

2023-04-20 Thread Gurchetan Singh
Rather than create a virtio-gpu-gfxstream device and it's associated variants (vga, pci), let's just extend the GL device. We need to: - Move all virgl functions to their own file - Only all needed class callbacks in the generic GL device Signed-off-by: Gurchetan Singh --- hw/display/vi

[RFC PATCH 12/13] HACK: use memory region API to inject memory to guest

2023-04-20 Thread Gurchetan Singh
I just copied the patches that have been floating around that do this, but it doesn't seem to robustly work. This current implementation is probably good enough to run vkcube or simple apps, but whenever a test starts to aggressively map/unmap memory, things do explode on the QEMU side. A simple

[RFC PATCH 10/13] gfxstream + rutabaga: add initial support for gfxstream

2023-04-20 Thread Gurchetan Singh
This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering graphics in the Android

[RFC PATCH 00/13] gfxstream + rutabaga_gfx: a surprising delight or startling epiphany?

2023-04-20 Thread Gurchetan Singh
From: Gurchetan Singh Rationale: - gfxstream [a] is good for the Android Emulator/upstream QEMU alignment - Wayland passhthrough [b] via the cross-domain context type is good for Linux on Linux display virtualization - rutabaga_gfx [c] sits on top of gfxstream, cross-domain and even virglr

[RFC PATCH 09/13] gfxstream + rutabaga: add required meson changes

2023-04-20 Thread Gurchetan Singh
- Add meson detection of rutabaga_gfx - Compile stubs when rutabaga_gfx_ffi is not installed - Compile stubs when virglrenderer is not installed Signed-off-by: Gurchetan Singh --- hw/display/meson.build | 40 -- hw/display/virtio-gpu-rutabaga-stubs.c | 8

[RFC PATCH 13/13] HACK: schedule fence return on main AIO context

2023-04-20 Thread Gurchetan Singh
gfxstream and both cross-domain (and even newer versions virglrenderer: see VIRGL_RENDERER_ASYNC_FENCE_CB) like to signal fence completion on threads ("callback threads") that are different from the thread that processes the command queue ("main thread"). This is generally possible with locking, a

I've made a qemu appimage

2023-04-20 Thread Lucas Machado Zainote
hi there!? I have made a qemu appimage that works in the most linux distros, if you have interest you can use mine as an example to ship your software for the most linux distros. all in a single file working perfectly. in my github you may find commands to use this appimage. https://github.com/luc

Re: [PATCH] target/riscv: add Ventana's Veyron V1 CPU

2023-04-20 Thread Alistair Francis
On Tue, Apr 18, 2023 at 10:37 PM Daniel Henrique Barboza wrote: > > From: Rahul Pathak > > Add a virtual CPU for Ventana's first CPU named veyron-v1. It runs > exclusively for the rv64 target. It's tested with the 'virt' board. > > CPU specs and general information can be found here: > > https://

Re: [PATCH] target/riscv: add Ventana's Veyron V1 CPU

2023-04-20 Thread Alistair Francis
On Tue, Apr 18, 2023 at 10:37 PM Daniel Henrique Barboza wrote: > > From: Rahul Pathak > > Add a virtual CPU for Ventana's first CPU named veyron-v1. It runs > exclusively for the rv64 target. It's tested with the 'virt' board. > > CPU specs and general information can be found here: > > https://

Re: [PATCH RESEND v7 12/12] target/riscv: forbid write_misa() for static CPUs

2023-04-20 Thread Alistair Francis
On Thu, Apr 20, 2023 at 7:22 PM Daniel Henrique Barboza wrote: > > Static CPUs don't want their extensions changed by user interaction. We > can prevent it during init by not exposing user facing properties, but > write_misa() is also capable of disabling/enabling extension during > runtime. > > W

Re: [PATCH RESEND v7 11/12] target/riscv: rework write_misa()

2023-04-20 Thread Alistair Francis
On Thu, Apr 20, 2023 at 7:22 PM Daniel Henrique Barboza wrote: > > write_misa() must use as much common logic as possible. We want to open > code just the bits that are exclusive to the CSR write operation and TCG > internals. > > Our validation is done with riscv_cpu_validate_set_extensions(), bu

Re: [PATCH RESEND v7 05/12] target/riscv: Mask the implicitly enabled extensions in isa_string based on priv version

2023-04-20 Thread Alistair Francis
On Thu, Apr 20, 2023 at 7:23 PM Daniel Henrique Barboza wrote: > > From: Weiwei Li > > Using implicitly enabled extensions such as Zca/Zcf/Zcd instead of their > super extensions can simplify the extension related check. However, they > may have higher priv version than their super extensions. So

Re: [PATCH v3] riscv: Make sure an exception is raised if a pte is malformed

2023-04-20 Thread Alistair Francis
On Fri, Apr 21, 2023 at 1:07 AM Alexandre Ghiti wrote: > > As per the specification, in 64-bit, if any of the pte reserved bits > 60-54 is set an exception should be triggered (see 4.4.1, "Addressing and > Memory Protection"). In addition, we must check the napot/pbmt bits are > not set if those e

[PATCH] hvf: Enable 1G page support

2023-04-20 Thread Alexander Graf
Hvf on x86 only supported 2MiB large pages, but never bothered to strip out the 1GiB page size capability from -cpu host. With QEMU 8.0.0 this became a problem because OVMF started to use 1GiB pages by default. Let's just unconditionally add 1GiB page walk support to the walker. With this fix app

[PATCH 1/8] accel: Replace `target_ulong` with `vaddr` in TB/TLB

2023-04-20 Thread Anton Johansson via
Changes pc and cs_base in TranslationBlock from target_ulong to vaddr. Auxilliary structs and tb_*()/tlb_*() functions that depend on this change are also updated to take a vaddr for guest virtual addresses. Signed-off-by: Anton Johansson --- accel/stubs/tcg-stub.c | 2 +- accel/tcg/cpu-

[PATCH 8/8] tcg: Replace target_ulong with vaddr in tcg_gen_code()

2023-04-20 Thread Anton Johansson via
Signed-off-by: Anton Johansson --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 5cfaa53938..b8dbc66610 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -852,7 +852,7 @@ void

[PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*()

2023-04-20 Thread Anton Johansson via
Updates helper_unaligned_[ld|st] to take the store/load address as a vaddr instead of a target_ulong. Signed-off-by: Anton Johansson --- accel/tcg/user-exec.c | 4 ++-- include/tcg/tcg-ldst.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/

[PATCH 0/8] Start replacing target_ulong with vaddr

2023-04-20 Thread Anton Johansson via
This is a first patchset in removing target_ulong from non-target/ directories. As use of target_ulong is spread accross the codebase we are attempting to target as few maintainers as possible with each patchset in order to ease reviewing. The following instances of target_ulong remain in accel/

[PATCH 3/8] accel/tcg: Replace target_ulong with vaddr in *_mmu_lookup()

2023-04-20 Thread Anton Johansson via
Update atomic_mmu_lookup() and cpu_mmu_lookup() to take the guest virtual address as a vaddr instead of a target_ulong. Signed-off-by: Anton Johansson --- accel/tcg/cputlb.c| 4 ++-- accel/tcg/user-exec.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cput

[PATCH 2/8] accel: Replace target_ulong with vaddr in probe_*()

2023-04-20 Thread Anton Johansson via
Functions for probing memory accesses (and functions that call these) are updated to take a vaddr for guest virtual addresses over target_ulong. Signed-off-by: Anton Johansson --- accel/stubs/tcg-stub.c | 4 ++-- accel/tcg/cputlb.c | 12 ++-- accel/tcg/user-exec.c | 8

[PATCH 7/8] cpu: Replace target_ulong with vaddr in tb_invalidate_phys_addr()

2023-04-20 Thread Anton Johansson via
Signed-off-by: Anton Johansson --- cpu.c | 2 +- include/exec/exec-all.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu.c b/cpu.c index 849bac062c..c245727ca6 100644 --- a/cpu.c +++ b/cpu.c @@ -293,7 +293,7 @@ void list_cpus(const char *optarg) }

[PATCH 6/8] accel/tcg: Replace target_ulong with vaddr in page_*()

2023-04-20 Thread Anton Johansson via
Use vaddr for guest virtual addresses for functions dealing with page flags. Signed-off-by: Anton Johansson --- accel/tcg/user-exec.c| 43 ++-- include/exec/cpu-all.h | 10 - include/exec/translate-all.h | 2 +- 3 files changed, 27 insertion

[PATCH 5/8] accel/tcg: Replace target_ulong with vaddr in translator_*()

2023-04-20 Thread Anton Johansson via
Use vaddr for guest virtual address in translator_use_goto_tb() and translator_loop(). Signed-off-by: Anton Johansson --- accel/tcg/translator.c| 10 +- include/exec/translator.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/accel/tcg/translator.c b/acce

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Daniel Henrique Barboza
On 4/20/23 18:07, Daniel Henrique Barboza wrote: On 4/20/23 17:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list

Re: [PATCH v2 03/13] ram.c: Dont change param->block in the compress thread

2023-04-20 Thread Juan Quintela
Lukas Straub wrote: > Instead introduce a extra parameter to trigger the compress thread. > Now, when the compress thread is done, we know what RAMBlock and > offset it did compress. > > This will be used in the next commits to move save_page_header() > out of compress code. > > Signed-off-by: Luk

Re: [PATCH v2 02/13] ram.c: Let the compress threads return a CompressResult enum

2023-04-20 Thread Juan Quintela
Lukas Straub wrote: > This will be used in the next commits to move save_page_header() > out of compress code. > > Signed-off-by: Lukas Straub Reviewed-by: Juan Quintela

Re: [PATCH v2 01/13] qtest/migration-test.c: Add postcopy tests with compress enabled

2023-04-20 Thread Juan Quintela
Lukas Straub wrote: > On Thu, 20 Apr 2023 12:20:25 +0200 > Juan Quintela wrote: > >> Lukas Straub wrote: >> > Add postcopy tests with compress enabled to ensure nothing breaks >> > with the refactoring in the next commits. >> > >> > preempt+compress is blocked, so no test needed for that case. >

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-04-20 Thread Daniel Henrique Barboza
On 4/20/23 17:29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 |

Re: [PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-20 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@yandex-team.ru) wrote: > We don't allow to use x-colo capability when replication is not > configured. So, no reason to build COLO when replication is disabled, > it's unusable in this case. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > hmp-co

Re: [PATCH v2 28/43] migration: Move migrate_use_tls() to options.c

2023-04-20 Thread Juan Quintela
Fabiano Rosas wrote: > Juan Quintela writes: > > >> +/* >> + * pseudo capabilities >> + * >> + * This are functions that are used in a similar way that capabilities >> + * check, but they are not a capability. > > s/This/These/ > s/that capabilities/to capabilities/ > Fixed, thanks.

Re: [PATCH 9/9] docs/style: call out the use of GUARD macros

2023-04-20 Thread Juan Quintela
Alex Bennée wrote: > There use makes our code safer so we should mention them. > > Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela

Re: [PATCH 8/9] docs/devel: mention the spacing requirement for QOM

2023-04-20 Thread Juan Quintela
Alex Bennée wrote: > We have a more complete document on QOM but we should at least mention > the style requirements in the style guide. > > Signed-off-by: Alex Bennée > Cc: Mark Cave-Ayland Reviewed-by: Juan Quintela

Re: [PATCH 7/9] docs/devel: make a statement about includes

2023-04-20 Thread Juan Quintela
Alex Bennée wrote: > While not explicitly disallowing header macro abuse (because that > would make us hypocrites) lets at least address some things to think > about. > > Signed-off-by: Alex Bennée > --- > docs/devel/style.rst | 14 ++ > 1 file changed, 14 insertions(+) > > diff --gi

Re: [PATCH 6/9] docs/system: remove excessive punctuation from guest-loader docs

2023-04-20 Thread Juan Quintela
Alex Bennée wrote: > A possessive its needs no ' whereas the contraction of it is does. > > Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela

Re: [PATCH 2/9] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-20 Thread Juan Quintela
Alex Bennée wrote: > From: Yohei Kojima > > This commit adds the following description: > 1. `memdev` option is recommended over `mem` option (see [1,2]) > 2. users must specify memory for all NUMA nodes (see [2]) > > This commit also separates descriptions for `mem` and `memdev` into two > parag

  1   2   3   4   5   6   7   >