Re: [RFC PATCH-for-9.1 00/21] qapi: Make @query-cpu-definitions command target-agnostic

2024-03-26 Thread Markus Armbruster
The general approach looks sane enough to me.

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Thomas Huth
On 26/03/2024 14.29, Philippe Mathieu-Daudé wrote: Hi Igor, On 26/3/24 14:08, Thomas Huth wrote: s/iaspc/isapc/ in the subject On 26/03/2024 13.51, Igor Mammedov wrote: ISAPC machine was introduced 25 years ago and it's a lot of time since such machine was around with real ISA only PC hardwa

[PATCH for-9.1 v2 10/11] tests/qtest/vhost-user-blk-test: use memory-backend-shm

2024-03-26 Thread Stefano Garzarella
`memory-backend-memfd` is available only on Linux while the new `memory-backend-shm` can be used on any POSIX-compliant operating system. Let's use it so we can run the test in multiple environments. Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-blk-test.c | 2 +- 1 file changed,

[PATCH for-9.1 v2 02/11] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-03-26 Thread Stefano Garzarella
In vu_message_write() we use sendmsg() to send the message header, then a write() to send the payload. If sendmsg() fails we should avoid sending the payload, since we were unable to send the header. Discovered before fixing the issue with the previous patch, where sendmsg() failed on macOS due t

[PATCH for-9.1 v2 08/11] contrib/vhost-user-blk: enable it on any POSIX system

2024-03-26 Thread Stefano Garzarella
Let's make the code more portable by using the "qemu/bswap.h" API and adding defines from block/file-posix.c to support O_DIRECT in other systems (e.g. macOS). vhost-user-server.c is a dependency, let's enable it for any POSIX system. Signed-off-by: Stefano Garzarella --- meson.build

[PATCH for-9.1 v2 07/11] libvhost-user: enable it on any POSIX system

2024-03-26 Thread Stefano Garzarella
The vhost-user protocol is not really Linux-specific so let's enable libvhost-user for any POSIX system. Compiling it on macOS and FreeBSD some problems came up: - avoid to include linux/vhost.h which is avaibale only on Linux (vhost_types.h contains many of the things we need) - macOS doesn't p

[PATCH for-9.1 v2 05/11] contrib/vhost-user-blk: fix bind() using the right size of the address

2024-03-26 Thread Stefano Garzarella
On macOS passing `-s /tmp/vhost.socket` parameter to the vhost-user-blk application, the bind was done on `/tmp/vhost.socke` pathname, missing the last character. This sounds like one of the portability problems described in the unix(7) manpage: Pathname sockets When binding a socket

[PATCH for-9.1 v2 01/11] libvhost-user: set msg.msg_control to NULL when it is empty

2024-03-26 Thread Stefano Garzarella
On some OS (e.g. macOS) sendmsg() returns -1 (errno EINVAL) if the `struct msghdr` has the field `msg_controllen` set to 0, but `msg_control` is not NULL. Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojec

[PATCH for-9.1 v2 09/11] hostmem: add a new memory backend based on POSIX shm_open()

2024-03-26 Thread Stefano Garzarella
shm_open() creates and opens a new POSIX shared memory object. A POSIX shared memory object allows creating memory backend with an associated file descriptor that can be shared with external processes (e.g. vhost-user). The new `memory-backend-shm` can be used as an alternative when `memory-backen

[PATCH for-9.1 v2 06/11] vhost-user: enable frontends on any POSIX system

2024-03-26 Thread Stefano Garzarella
The vhost-user protocol is not really Linux-specific so let's enable vhost-user frontends for any POSIX system. In vhost_net.c we use VHOST_FILE_UNBIND which is defined in a Linux specific header, let's define it for other systems as well. Signed-off-by: Stefano Garzarella --- meson.build

[PATCH for-9.1 v2 00/11] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-03-26 Thread Stefano Garzarella
v1: https://patchew.org/QEMU/20240228114759.44758-1-sgarz...@redhat.com/ v2: - fixed Author email and little typos in some patches - added memory-backend-shm (patches 9, 10, 11) [Daniel, David, Markus] - removed changes to memory-backend-file (ex patch 9) - used memory-backend-shm in tests/

[PATCH for-9.1 v2 03/11] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-03-26 Thread Stefano Garzarella
libvhost-user will panic when receiving VHOST_USER_GET_INFLIGHT_FD message if MFD_ALLOW_SEALING is not defined, since it's not able to create a memfd. VHOST_USER_GET_INFLIGHT_FD is used only if VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD is negotiated. So, let's mask that feature if the backend is not ab

[PATCH for-9.1 v2 04/11] vhost-user-server: don't abort if we can't set fd non-blocking

2024-03-26 Thread Stefano Garzarella
In vhost-user-server we set all fd received from the other peer in non-blocking mode. For some of them (e.g. memfd, shm_open, etc.) if we fail, it's not really a problem, because we don't use these fd with blocking operations, but only to map memory. In these cases a failure is not bad, so let's j

[PULL 0/6] Block layer patches

2024-03-26 Thread Kevin Wolf
The following changes since commit 096ae430a7b5a704af4cd94dca7200d6cb069991: Merge tag 'pull-qapi-2024-03-26' of https://repo.or.cz/qemu/armbru into staging (2024-03-26 09:50:21 +) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fe

[PULL 1/6] tests/qemu-iotests: Test 157 and 227 require virtio-blk

2024-03-26 Thread Kevin Wolf
From: Thomas Huth Tests 157 and 227 use the virtio-blk device, so we have to mark these tests accordingly to be skipped if this devices is not available (e.g. when running the tests with qemu-system-avr only). Signed-off-by: Thomas Huth Message-ID: <20240325154737.1305063-1-th...@redhat.com> Re

[PULL 5/6] block-backend: fix edge case in bdrv_next_cleanup() where BDS associated to BB changes

2024-03-26 Thread Kevin Wolf
From: Fiona Ebner Same rationale as for commit "block-backend: fix edge case in bdrv_next() where BDS associated to BB changes". The block graph might change between the bdrv_next() call and the bdrv_next_cleanup() call, so it could be that the associated BDS is not the same that was referenced p

[PULL 4/6] block-backend: fix edge case in bdrv_next() where BDS associated to BB changes

2024-03-26 Thread Kevin Wolf
From: Fiona Ebner The old_bs variable in bdrv_next() is currently determined by looking at the old block backend. However, if the block graph changes before the next bdrv_next() call, it might be that the associated BDS is not the same that was referenced previously. In that case, the wrong BDS i

[PULL 2/6] vdpa-dev: Fix initialisation order to restore VDUSE compatibility

2024-03-26 Thread Kevin Wolf
VDUSE requires that virtqueues are first enabled before the DRIVER_OK status flag is set; with the current API of the kernel module, it is impossible to enable the opposite order in our block export code because userspace is not notified when a virtqueue is enabled. This requirement also mathces t

[PULL 6/6] iotests: add test for stream job with an unaligned prefetch read

2024-03-26 Thread Kevin Wolf
From: Fiona Ebner Previously, bdrv_pad_request() could not deal with a NULL qiov when a read needed to be aligned. During prefetch, a stream job will pass a NULL qiov. Add a test case to cover this scenario. By accident, also covers a previous race during shutdown, where block graph changes duri

[PULL 3/6] block/io: accept NULL qiov in bdrv_pad_request

2024-03-26 Thread Kevin Wolf
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_request, since it wants to extend its passed vector. In particular, this i

[PATCH for-9.1 v2 11/11] tests/qtest/vhost-user-test: add a test case for memory-backend-shm

2024-03-26 Thread Stefano Garzarella
`memory-backend-shm` can be used with vhost-user devices, so let's add a new test case for it. Signed-off-by: Stefano Garzarella --- tests/qtest/vhost-user-test.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-t

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Philippe Mathieu-Daudé
On 26/3/24 14:37, Thomas Huth wrote: On 26/03/2024 14.29, Philippe Mathieu-Daudé wrote: Hi Igor, On 26/3/24 14:08, Thomas Huth wrote: s/iaspc/isapc/ in the subject On 26/03/2024 13.51, Igor Mammedov wrote: ISAPC machine was introduced 25 years ago and it's a lot of time since such machine w

Re: [PATCH for-9.1 v2 01/11] libvhost-user: set msg.msg_control to NULL when it is empty

2024-03-26 Thread Eric Blake
On Tue, Mar 26, 2024 at 02:39:26PM +0100, Stefano Garzarella wrote: > On some OS (e.g. macOS) sendmsg() returns -1 (errno EINVAL) if > the `struct msghdr` has the field `msg_controllen` set to 0, but > `msg_control` is not NULL. > > Signed-off-by: Stefano Garzarella > --- > subprojects/libvhost-

Re: [PATCH for-9.1 v2 01/11] libvhost-user: set msg.msg_control to NULL when it is empty

2024-03-26 Thread David Hildenbrand
On 26.03.24 14:39, Stefano Garzarella wrote: On some OS (e.g. macOS) sendmsg() returns -1 (errno EINVAL) if the `struct msghdr` has the field `msg_controllen` set to 0, but `msg_control` is not NULL. Signed-off-by: Stefano Garzarella --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 fil

Re: [PATCH for-9.1 v2 02/11] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-03-26 Thread Eric Blake
On Tue, Mar 26, 2024 at 02:39:27PM +0100, Stefano Garzarella wrote: > In vu_message_write() we use sendmsg() to send the message header, > then a write() to send the payload. > > If sendmsg() fails we should avoid sending the payload, since we > were unable to send the header. > > Discovered befo

Re: [PATCH for-9.1 v2 03/11] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported

2024-03-26 Thread Eric Blake
On Tue, Mar 26, 2024 at 02:39:28PM +0100, Stefano Garzarella wrote: > libvhost-user will panic when receiving VHOST_USER_GET_INFLIGHT_FD > message if MFD_ALLOW_SEALING is not defined, since it's not able > to create a memfd. > > VHOST_USER_GET_INFLIGHT_FD is used only if > VHOST_USER_PROTOCOL_F_IN

Re: [PATCH for-9.1 v2 02/11] libvhost-user: fail vu_message_write() if sendmsg() is failing

2024-03-26 Thread David Hildenbrand
On 26.03.24 15:34, Eric Blake wrote: On Tue, Mar 26, 2024 at 02:39:27PM +0100, Stefano Garzarella wrote: In vu_message_write() we use sendmsg() to send the message header, then a write() to send the payload. If sendmsg() fails we should avoid sending the payload, since we were unable to send th

Re: [PATCH for-9.1 v2 04/11] vhost-user-server: don't abort if we can't set fd non-blocking

2024-03-26 Thread Eric Blake
On Tue, Mar 26, 2024 at 02:39:29PM +0100, Stefano Garzarella wrote: > In vhost-user-server we set all fd received from the other peer > in non-blocking mode. For some of them (e.g. memfd, shm_open, etc.) > if we fail, it's not really a problem, because we don't use these > fd with blocking operatio

Re: [PATCH for-9.1 v2 09/11] hostmem: add a new memory backend based on POSIX shm_open()

2024-03-26 Thread David Hildenbrand
+mode = 0; +oflag = O_RDWR | O_CREAT | O_EXCL; +backend_name = host_memory_backend_get_name(backend); + +/* + * Some operating systems allow creating anonymous POSIX shared memory + * objects (e.g. FreeBSD provides the SHM_ANON constant), but this is not + * defined by

[PATCH net v2 2/2] virtio_net: Do not send RSS key if it is not supported

2024-03-26 Thread Breno Leitao
There is a bug when setting the RSS options in virtio_net that can break the whole machine, getting the kernel into an infinite loop. Running the following command in any QEMU virtual machine with virtionet will reproduce this problem: # ethtool -X eth0 hfunc toeplitz This is how the proble

[PULL 00/13] Misc HW patches for 2024-03-26

2024-03-26 Thread Philippe Mathieu-Daudé
The following changes since commit 096ae430a7b5a704af4cd94dca7200d6cb069991: Merge tag 'pull-qapi-2024-03-26' of https://repo.or.cz/qemu/armbru into staging (2024-03-26 09:50:21 +) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-misc-2024032

[PULL 04/13] target/tricore/helper: Use correct string format in cpu_tlb_fill()

2024-03-26 Thread Philippe Mathieu-Daudé
'address' got converted from target_ulong to vaddr in commit 68d6eee73c ("target/tricore: Convert to CPUClass::tlb_fill"). Use the corresponding format string to avoid casting. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240319051413.6956-1-phi...@linaro.org> Reviewed-by: Richard Henders

[PULL 01/13] target/i386/tcg: Enable page walking from MMIO memory

2024-03-26 Thread Philippe Mathieu-Daudé
From: Gregory Price CXL emulation of interleave requires read and write hooks due to requirement for subpage granularity. The Linux kernel stack now enables using this memory as conventional memory in a separate NUMA node. If a process is deliberately forced to run from that node $ numactl --memb

[PULL 05/13] hw/clock: Let clock_set_mul_div() return a boolean value

2024-03-26 Thread Philippe Mathieu-Daudé
Let clock_set_mul_div() return a boolean value whether the clock has been updated or not, similarly to clock_set(). Return early when clock_set_mul_div() is called with same mul/div values the clock has. Acked-by: Luc Michel Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis M

[PULL 10/13] hw/smbios: add stub for smbios_get_table_legacy()

2024-03-26 Thread Philippe Mathieu-Daudé
From: Igor Mammedov QEMU build fails with hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy' when it's built with only 'microvm' enabled i.e. with config patch +++ b/configs/devices/i386-softmmu/default.mak @@ -26,7 +26,7 @@ # Boards: # -CONFIG_ISAPC=y -

[PULL 07/13] hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock

2024-03-26 Thread Philippe Mathieu-Daudé
From: Arnaud Minier The "clock_set_mul_div" function doesn't propagate the clock period to the children if it is changed (e.g. by enabling/disabling a clock multiplexer). This was overlooked during the implementation due to late changes. This commit propagates the change if the multiplier or div

[PULL 13/13] ui/cocoa: Use NSTrackingInVisibleRect

2024-03-26 Thread Philippe Mathieu-Daudé
From: Akihiko Odaki I observed [NSTrackingArea rect] becomes de-synchronized with the view frame with some unknown condition, and fails to track mouse movement on some area of the view. Specify NSTrackingInVisibleRect option to let Cocoa automatically update NSTrackingArea, which also saves code

[PULL 03/13] monitor/hmp-cmds-target: Append a space in error message in gpa2hva()

2024-03-26 Thread Philippe Mathieu-Daudé
From: Yao Xingtao In qemu monitor mode, when we use gpa2hva command to print the host virtual address corresponding to a guest physical address, if the gpa is not in RAM, the error message is below: (qemu) gpa2hva 0x75000 Memory at address 0x75000is not RAM A space is missed between

[PULL 08/13] docs/system/ppc/amigang.rst: Fix formatting

2024-03-26 Thread Philippe Mathieu-Daudé
From: BALATON Zoltan Add missing space to fix character formatting where it was missed in two places. Fixes: 623d9065b6 (docs/system/ppc: Document running Linux on AmigaNG machines) Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell Message-ID: <20240324161148.4650d4e6...@zero.eik.bme.hu

[PULL 11/13] ui/cocoa: Fix aspect ratio

2024-03-26 Thread Philippe Mathieu-Daudé
From: Akihiko Odaki [NSWindow setContentAspectRatio:] does not trigger window resize itself, so the wrong aspect ratio will persist if nothing resizes the window. Call [NSWindow setContentSize:] in such a case. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: A

[PULL 12/13] ui/cocoa: Resize window after toggling zoom-to-fit

2024-03-26 Thread Philippe Mathieu-Daudé
From: Akihiko Odaki Resize the window so that the content will fit without zooming. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Message-ID: <20240323-fixes-v2-2-18651a2b0...@daynix.com> Signed-off-by: Philippe Mat

[PULL 06/13] hw/misc/stm32l4x5_rcc: Inline clock_update() in clock_mux_update()

2024-03-26 Thread Philippe Mathieu-Daudé
Trivial inlining in preliminary patch to make the next one easier to review. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-Id: <20240325152827.73817-3-phi...@linaro.org> --- hw/misc/stm32l4x5_rcc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -

[PULL 02/13] hw/scsi/scsi-generic: Fix io_timeout property not applying

2024-03-26 Thread Philippe Mathieu-Daudé
From: Lorenz Brun The io_timeout property, introduced in c9b6609 (part of 6.0) is silently overwritten by the hardcoded default value of 30 seconds (DEFAULT_IO_TIMEOUT) in scsi_generic_realize because that function is being called after the properties have already been applied. The property defi

[PULL 09/13] contrib/plugins/execlog: Fix compiler warning

2024-03-26 Thread Philippe Mathieu-Daudé
From: Yao Xingtao 1. The g_pattern_match_string() is deprecated when glib2 version >= 2.70. Use g_pattern_spec_match_string() instead to avoid this problem. 2. The type of second parameter in g_ptr_array_add() is 'gpointer' {aka 'void *'}, but the type of reg->name is 'const char*'. Cas

Re: [PATCH 12/26] KVM: track whether guest state is encrypted

2024-03-26 Thread Xiaoyao Li
On 3/23/2024 2:11 AM, Paolo Bonzini wrote: So far, KVM has allowed KVM_GET/SET_* ioctls to execute even if the guest state is encrypted, in which case they do nothing. For the new API using VM types, instead, the ioctls will fail which is a safer and more robust approach. The new API will be th

Re: [PATCH-for-9.1] hw/i386: Add a config to only build the microvm machine

2024-03-26 Thread Michael Tokarev
26.03.2024 16:14, Philippe Mathieu-Daudé wrote: Add a config file to build a binary only containing the microvm machine, inspired by a discussion on the list: https://lore.kernel.org/qemu-devel/604bf457-23a7-4d06-b59f-a7b46945c...@tls.msk.ru/ As suggested in commit d1d5e9eefd ("configure: allow

Re: target/hppa: be,n nullifying first insn at branch target?

2024-03-26 Thread Richard Henderson
On 3/25/24 09:33, Sven Schnelle wrote: diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 7546a5f5a2..56c68a7cbe 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -3847,7 +3849,7 @@ static bool trans_be(DisasContext *ctx, arg_be *a) copy_iaoq_entry(

Re: [PATCH for-9.0 0/3] qtest/virtio-9p-test.c: fix slow tests

2024-03-26 Thread Greg Kurz
Bom dia Daniel ! On Tue, 26 Mar 2024 10:26:03 -0300 Daniel Henrique Barboza wrote: > Hi, > > Thomas reported in [1] a problem that happened with the RISC-V machine > where some tests from virtio-9p-test.c were failing with '-m slow', i.e. > enabling slow tests. > > In the end it wasn't a RISC-

Re: [PATCH-for-9.1] hw/i386: Add a config to only build the microvm machine

2024-03-26 Thread Philippe Mathieu-Daudé
On 26/3/24 16:48, Michael Tokarev wrote: 26.03.2024 16:14, Philippe Mathieu-Daudé wrote: Add a config file to build a binary only containing the microvm machine, inspired by a discussion on the list: https://lore.kernel.org/qemu-devel/604bf457-23a7-4d06-b59f-a7b46945c...@tls.msk.ru/ As suggeste

Re: [PATCH] edk2: get version + date from git submodule

2024-03-26 Thread Gerd Hoffmann
On Mon, Mar 25, 2024 at 02:55:11PM +, Peter Maydell wrote: > On Mon, 25 Mar 2024 at 14:45, Gerd Hoffmann wrote: > > > > Turned out hard-coding version and date in the Makefile wasn't a bright > > idea. Updating it on edk2 updates is easily forgotten. Fetch the info > > from git instead. > >

Re: [PATCH-for-9.1] hw/i386: Add a config to only build the microvm machine

2024-03-26 Thread Michael Tokarev
26.03.2024 18:58, Philippe Mathieu-Daudé: This is not enough.  This step is good already, but it lacks default machine type selection.  In debian we carry a tiny patch to make microvm the default machine type or else it crashes at startup not finding "pc" machine or one of its required devices.

Re: [PULL 35/38] spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls.

2024-03-26 Thread Peter Maydell
On Tue, 12 Mar 2024 at 17:11, Nicholas Piggin wrote: > > From: Harsh Prateek Bora > > Introduce the nested PAPR hcalls: > - H_GUEST_GET_STATE which is used to get state of a nested guest or > a guest VCPU. The value field for each element in the request is > destination to be upda

Re: [PATCH trivial for-9.0] smbios: add stub for smbios_get_table_legacy()

2024-03-26 Thread Michael Tokarev
26.03.2024 15:26, Igor Mammedov wrote: QEMU build fails with hw/i386/fw_cfg.c:74: undefined reference to `smbios_get_table_legacy' when it's built with only 'microvm' enabled i.e. with config patch +++ b/configs/devices/i386-softmmu/default.mak @@ -26,7 +26,7 @@ # Boards: #

Re: [PATCH for-9.0 0/3] qtest/virtio-9p-test.c: fix slow tests

2024-03-26 Thread Daniel Henrique Barboza
On 3/26/24 12:55, Greg Kurz wrote: Bom dia Daniel ! Bonne après-midi ! On Tue, 26 Mar 2024 10:26:03 -0300 Daniel Henrique Barboza wrote: Hi, Thomas reported in [1] a problem that happened with the RISC-V machine where some tests from virtio-9p-test.c were failing with '-m slow', i.e.

Endless data flow on i2c bus

2024-03-26 Thread Paz Offer
Hi, I am simulating an i2c slave device, listening on address 0x30. My intention is that in the hosted Linux OS, my driver will communicate with this (simulated) HW device. The problem I have is that ever since I start QEMU, and even before the hosted Linux OS was fully loaded, the device recei

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Igor Mammedov
On Tue, 26 Mar 2024 14:29:58 +0100 Philippe Mathieu-Daudé wrote: > Hi Igor, > > On 26/3/24 14:08, Thomas Huth wrote: > > > > s/iaspc/isapc/ in the subject > > > > On 26/03/2024 13.51, Igor Mammedov wrote: > >> ISAPC machine was introduced 25 years ago and it's a lot of time since > >> such m

Re: [PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated

2024-03-26 Thread Igor Mammedov
On Tue, 26 Mar 2024 13:30:48 + Mark Cave-Ayland wrote: > On 26/03/2024 12:51, Igor Mammedov wrote: > > > ISAPC machine was introduced 25 years ago and it's a lot of time since > > such machine was around with real ISA only PC hardware practically defunct. > > Also it's slowly bit-rots (for e

Re: [PATCH for-9.0 0/3] qtest/virtio-9p-test.c: fix slow tests

2024-03-26 Thread Thomas Huth
On 26/03/2024 14.26, Daniel Henrique Barboza wrote: Hi, Thomas reported in [1] a problem that happened with the RISC-V machine where some tests from virtio-9p-test.c were failing with '-m slow', i.e. enabling slow tests. In the end it wasn't a RISC-V specific problem. It just so happens that th

Re: [PATCH-for-9.1] hw/i386: Add a config to only build the microvm machine

2024-03-26 Thread Peter Maydell
On Tue, 26 Mar 2024 at 16:03, Michael Tokarev wrote: > > 26.03.2024 18:58, Philippe Mathieu-Daudé: > > >> This is not enough. This step is good already, but it lacks default > >> machine > >> type selection. In debian we carry a tiny patch to make microvm the > >> default > >> machine type or

Re: [PATCH-for-9.1] hw/i386: Add a config to only build the microvm machine

2024-03-26 Thread Igor Mammedov
On Tue, 26 Mar 2024 19:01:50 +0300 Michael Tokarev wrote: > 26.03.2024 18:58, Philippe Mathieu-Daudé: > > >> This is not enough.  This step is good already, but it lacks default > >> machine > >> type selection.  In debian we carry a tiny patch to make microvm the > >> default > >> machine typ

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-26 Thread Jonah Palmer
On 3/25/24 4:33 PM, Eugenio Perez Martin wrote: On Mon, Mar 25, 2024 at 5:52 PM Jonah Palmer wrote: On 3/22/24 7:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer wrote: The goal of these patches is to add support to a variety of virtio and vhost devices

Re: target/hppa: be,n nullifying first insn at branch target?

2024-03-26 Thread Sven Schnelle
Richard Henderson writes: > On 3/25/24 09:33, Sven Schnelle wrote: >> diff --git a/target/hppa/translate.c b/target/hppa/translate.c >> index 7546a5f5a2..56c68a7cbe 100644 >> --- a/target/hppa/translate.c >> +++ b/target/hppa/translate.c >> @@ -3847,7 +3849,7 @@ static bool trans_be(DisasContext

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-26 Thread Greg Kurz
On Tue, 26 Mar 2024 10:26:04 -0300 Daniel Henrique Barboza wrote: > The local 9p driver in virtio-9p-test.c its temporary dir right at the > start of qos-test (via virtio_9p_create_local_test_dir()) and only > deletes it after qos-test is finished (via > virtio_9p_remove_local_test_dir()). > > T

Re: [PATCH v2 1/2] hw/xen: detect when running inside stubdomain

2024-03-26 Thread Anthony PERARD
On Tue, Mar 05, 2024 at 08:12:29PM +0100, Marek Marczykowski-Górecki wrote: > diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c > index 124dd5f3d6..6bd4e6eb2f 100644 > --- a/hw/xen/xen-legacy-backend.c > +++ b/hw/xen/xen-legacy-backend.c > @@ -603,6 +603,20 @@ static void xen_s

[PATCH-for-9.0? v2 0/4] overall: Avoid using inlined functions with external linkage again

2024-03-26 Thread Philippe Mathieu-Daudé
Oops, I forgot patch 3 needed rework :/ Is it too late to enforce that flag for 9.0? Missing review: #3 Since v1: - Reduce size_to_prdtl() scope Mostly as a C style cleanup, use -Wstatic-in-inline to avoid using inlined function with external linkage. Philippe Mathieu-Daudé (4): hw/arm/smmu:

[PATCH-for-9.0? v2 4/4] meson: Enable -Wstatic-in-inline

2024-03-26 Thread Philippe Mathieu-Daudé
Compilers are clever enough to inline code when necessary. The only case we accept an inline function is static in header (we use C, not C++). Add the -Wstatic-in-inline CPPFLAG to prevent public and inline function to be added in the code base. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by

[PATCH-for-9.0? v2 2/4] accel/hvf: Un-inline hvf_arch_supports_guest_debug()

2024-03-26 Thread Philippe Mathieu-Daudé
See previous commit and commit 9de9fa5cf2 ("Avoid using inlined functions with external linkage") for rationale. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20240313184954.42513-3-phi...@linaro.org> --- target/arm/hvf/hvf.c | 2

[PATCH-for-9.0? v2 3/4] qtest/libqos: Reduce size_to_prdtl() declaration scope

2024-03-26 Thread Philippe Mathieu-Daudé
Since size_to_prdtl() is only used within ahci.c, declare it statically. This removes the last use of "inlined function with external linkage". See previous commit and commit 9de9fa5cf2 for rationale. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqos/ahci.

[PATCH-for-9.0? v2 1/4] hw/arm/smmu: Avoid using inlined functions with external linkage again

2024-03-26 Thread Philippe Mathieu-Daudé
Similarly to commit 9de9fa5cf2 ("hw/arm/smmu-common: Avoid using inlined functions with external linkage"): None of our code base require / use inlined functions with external linkage. Some places use internal inlining in the hot path. These two functions are certainly not in any hot path an

Re: [PATCH-for-9.0? v2 3/4] qtest/libqos: Reduce size_to_prdtl() declaration scope

2024-03-26 Thread Peter Maydell
On Tue, 26 Mar 2024 at 17:10, Philippe Mathieu-Daudé wrote: > > Since size_to_prdtl() is only used within ahci.c, > declare it statically. This removes the last use > of "inlined function with external linkage". See > previous commit and commit 9de9fa5cf2 for rationale. > > Suggested-by: Peter May

Re: [PATCH-for-9.0? v2 3/4] qtest/libqos: Reduce size_to_prdtl() declaration scope

2024-03-26 Thread Thomas Huth
On 26/03/2024 18.10, Philippe Mathieu-Daudé wrote: Since size_to_prdtl() is only used within ahci.c, declare it statically. This removes the last use of "inlined function with external linkage". See previous commit and commit 9de9fa5cf2 for rationale. Suggested-by: Peter Maydell Signed-off-by:

Re: [PATCH-for-9.0? v2 4/4] meson: Enable -Wstatic-in-inline

2024-03-26 Thread Thomas Huth
On 26/03/2024 18.10, Philippe Mathieu-Daudé wrote: Compilers are clever enough to inline code when necessary. The only case we accept an inline function is static in header (we use C, not C++). Add the -Wstatic-in-inline CPPFLAG to prevent public and I think this is rather a compiler than a p

Re: [PATCH v2 2/2] xen: fix stubdom PCI addr

2024-03-26 Thread Anthony PERARD
First things first, could you fix the coding style? Run something like `./scripts/checkpatch.pl @^..` or `./scripts/checkpatch.pl master..`. Patchew might have run that for you if the patch series had a cover letter. On Tue, Mar 05, 2024 at 08:12:30PM +0100, Marek Marczykowski-Górecki wrote: > di

Re: [PATCH-for-9.0? v2 1/4] hw/arm/smmu: Avoid using inlined functions with external linkage again

2024-03-26 Thread Eric Auger
Hi, On 3/26/24 18:10, Philippe Mathieu-Daudé wrote: > Similarly to commit 9de9fa5cf2 ("hw/arm/smmu-common: Avoid using > inlined functions with external linkage"): > > None of our code base require / use inlined functions with external > linkage. Some places use internal inlining in the hot pa

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-26 Thread Daniel Henrique Barboza
On 3/26/24 14:05, Greg Kurz wrote: On Tue, 26 Mar 2024 10:26:04 -0300 Daniel Henrique Barboza wrote: The local 9p driver in virtio-9p-test.c its temporary dir right at the start of qos-test (via virtio_9p_create_local_test_dir()) and only deletes it after qos-test is finished (via virtio_9p

Re: [PATCH v5 1/7] docs/migration: add qpl compression feature

2024-03-26 Thread Peter Xu
On Wed, Mar 20, 2024 at 12:45:21AM +0800, Yuan Liu wrote: > add Intel Query Processing Library (QPL) compression method > introduction > > Signed-off-by: Yuan Liu > Reviewed-by: Nanhai Zou > --- > docs/devel/migration/features.rst| 1 + > docs/devel/migration/qpl-compression.rst | 231

[PATCH v2 1/3] target/hppa: Generate getshadowregs inline

2024-03-26 Thread Richard Henderson
This operation is trivial and does not require a helper. Signed-off-by: Richard Henderson --- target/hppa/helper.h | 1 - target/hppa/sys_helper.c | 4 ++-- target/hppa/translate.c | 17 + 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/target/hppa/helper.h

[PATCH v2 3/3] target/hppa: Fix diag instructions to set/restore shadow registers

2024-03-26 Thread Richard Henderson
The 32-bit 7300LC CPU and the 64-bit PCX-W 8500 CPU use different diag instructions to save or restore the CPU registers to/from the shadow registers. Implement those per-CPU architecture diag instructions to fix those parts of the HP ODE testcases (L2DIAG and WDIAG, section 1) which test the shad

[PATCH v2 2/3] target/hppa: Move diag argument handling to decodetree

2024-03-26 Thread Richard Henderson
Split trans_diag into per-operation functions. Signed-off-by: Richard Henderson --- target/hppa/insns.decode | 8 +++- target/hppa/translate.c | 34 +- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/target/hppa/insns.decode b/target/hppa/in

[PATCH v2 0/3] target/hppa: Tidy and extend diag instructions

2024-03-26 Thread Richard Henderson
Don't do all the decode for diag in trans_diag; do it in decodetree instead. Add {get,put}shadowregs for ODE tests. r~ Richard Henderson (3): target/hppa: Generate getshadowregs inline target/hppa: Move diag argument handling to decodetree target/hppa: Fix diag instructions to set/restore

[RFC v3 0/5] ARM Nested Virt Support

2024-03-26 Thread Eric Auger
This series adds ARM Nested Virtualization support in KVM mode. This is a respin of previous contributions from Miguel [1] and Haibo [2]. This was tested with Marc's v11 [3] on Ampere HW with fedora L1 guest and L2 guests booted without EDK2. However it does not work yet with EDK2 but it looks unr

[RFC v3 4/5] target/arm: Enable feature ARM_FEATURE_EL2 if EL2 is supported

2024-03-26 Thread Eric Auger
From: Haibo Xu KVM_CAP_ARM_EL2 must be supported by the cpu to enable ARM_FEATURE_EL2. In case the host does support NV, expose the feature. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger --- v2 -> v3: - check pmu->has_el2 on kvm_arch_init_vcpu() when setting

[RFC v3 1/5] [Placeholder] headers: Partial headers update for NV2 enablement

2024-03-26 Thread Eric Auger
From: Haibo Xu For now let's only import the pieces needed to run NV on KVM. Later on this will be replaced by a standard and comprehensive linux header update using scripts/update-linux-headers.sh. For now the changes are taken from https://github.com/eauger/linux/tree/nv-6.8-rc1-sr-enforcement

[RFC v3 5/5] hw/arm/virt: Allow virt extensions with KVM

2024-03-26 Thread Eric Auger
From: Haibo Xu Up to now virt support on guest has been only supported with TCG. Now it becomes feasible to use it with KVM acceleration. Also check only in-kernel GICv3 is used along with KVM EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger --- v2 -> v3: -

[RFC v3 2/5] hw/arm: Allow setting KVM vGIC maintenance IRQ

2024-03-26 Thread Eric Auger
From: Haibo Xu Allow virt arm machine to set the interrupt ID for the KVM GIC maintenance interrupt. This setting must be done before the KVM_DEV_ARM_VGIC_CTRL_INIT hence the choice to perform the setting in the GICv3 realize instead of proceeding the same way as kvm_arm_pmu_set_irq(). Signed-o

[RFC v3 3/5] target/arm/kvm: Add helper to detect EL2 when using KVM

2024-03-26 Thread Eric Auger
From: Haibo Xu Introduce query support for KVM_CAP_ARM_EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 5 + target/arm/kvm_arm.h | 12 2 files c

[PATCH for-9.0] target/hppa: Clear psw_n for BE on use_nullify_skip path

2024-03-26 Thread Richard Henderson
Along this path we have already skipped the insn to be nullified, so the subsequent insn should be executed. Cc: qemu-sta...@nongnu.org Reported-by: Sven Schnelle Signed-off-by: Richard Henderson --- target/hppa/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/hppa/transla

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-26 Thread Eugenio Perez Martin
On Tue, Mar 26, 2024 at 5:49 PM Jonah Palmer wrote: > > > > On 3/25/24 4:33 PM, Eugenio Perez Martin wrote: > > On Mon, Mar 25, 2024 at 5:52 PM Jonah Palmer > > wrote: > >> > >> > >> > >> On 3/22/24 7:18 AM, Eugenio Perez Martin wrote: > >>> On Thu, Mar 21, 2024 at 4:57 PM Jonah Palmer > >>> w

Re: [PATCH v4 9/9] plugins: remove op from qemu_plugin_inline_cb

2024-03-26 Thread Richard Henderson
On 3/26/24 02:34, Pierrick Bouvier wrote: Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 - plugins/plugin.h | 4 +++- plugins/core.c| 13 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v4 6/9] tests/plugin/inline: add test for conditional callback

2024-03-26 Thread Richard Henderson
On 3/26/24 02:34, Pierrick Bouvier wrote: Count number of tb and insn executed using a conditional callback. We ensure the callback has been called expected number of time (per vcpu). Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 89 +-- 1

Re: [RFC 0/8] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-26 Thread Jonah Palmer
On 3/26/24 2:34 PM, Eugenio Perez Martin wrote: On Tue, Mar 26, 2024 at 5:49 PM Jonah Palmer wrote: On 3/25/24 4:33 PM, Eugenio Perez Martin wrote: On Mon, Mar 25, 2024 at 5:52 PM Jonah Palmer wrote: On 3/22/24 7:18 AM, Eugenio Perez Martin wrote: On Thu, Mar 21, 2024 at 4:57 PM Jo

Re: [RFC v3 4/5] target/arm: Enable feature ARM_FEATURE_EL2 if EL2 is supported

2024-03-26 Thread Richard Henderson
On 3/26/24 08:22, Eric Auger wrote: From: Haibo Xu KVM_CAP_ARM_EL2 must be supported by the cpu to enable ARM_FEATURE_EL2. In case the host does support NV, expose the feature. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-off-by: Eric Auger --- v2 -> v3: - check pmu->has_el2 on kv

Re: [RFC v3 5/5] hw/arm/virt: Allow virt extensions with KVM

2024-03-26 Thread Richard Henderson
On 3/26/24 08:22, Eric Auger wrote: From: Haibo Xu Up to now virt support on guest has been only supported with TCG. Now it becomes feasible to use it with KVM acceleration. Also check only in-kernel GICv3 is used along with KVM EL2. Signed-off-by: Haibo Xu Signed-off-by: Miguel Luis Signed-of

Re: [PATCH for-9.0] target/hppa: Clear psw_n for BE on use_nullify_skip path

2024-03-26 Thread Sven Schnelle
Richard Henderson writes: > Along this path we have already skipped the insn to be > nullified, so the subsequent insn should be executed. > > Cc: qemu-sta...@nongnu.org > Reported-by: Sven Schnelle > Signed-off-by: Richard Henderson > --- > target/hppa/translate.c | 1 + > 1 file changed, 1 i

[PATCH] tests/qtest: Standardize qtest function caller strings.

2024-03-26 Thread Het Gala
For --> migrate // //O:/... For --> validate ///O:/O:/ /O:/O:/... test-type:: migrate | validate migration-mode a. migrate --> :: precopy | postcopy | multifd b. validate -->:: (what to validate) methods :: preempt | recovery | reboot | suspend | simple

Re: [PULL 0/6] Block layer patches

2024-03-26 Thread Peter Maydell
On Tue, 26 Mar 2024 at 13:54, Kevin Wolf wrote: > > The following changes since commit 096ae430a7b5a704af4cd94dca7200d6cb069991: > > Merge tag 'pull-qapi-2024-03-26' of https://repo.or.cz/qemu/armbru into > staging (2024-03-26 09:50:21 +) > > are available in the Git repository at: > > ht

Re: [PULL 00/13] Misc HW patches for 2024-03-26

2024-03-26 Thread Peter Maydell
available in the Git repository at: > > https://github.com/philmd/qemu.git tags/hw-misc-20240326 > > for you to fetch changes up to ccebb9ae352eea63cb1491cb829e4cd0f7576f1c: > > ui/cocoa: Use NSTrackingInVisibleRect (2024-03-26 14:32:54 +0100) > > A pair of &

Re: [PATCH] tests/qtest: Standardize qtest function caller strings.

2024-03-26 Thread Het Gala
Hi Maintainers, this is my first attempt trying to standardise the grammar around migration qtests. I am not sure at multiple places on whether a particular string is placed at the right place with the right grammar. Please comment on the patch, if anything you feel can be improvised in the existi

Re: [PATCH for-9.0] target/hppa: Clear psw_n for BE on use_nullify_skip path

2024-03-26 Thread Philippe Mathieu-Daudé
On 26/3/24 19:35, Richard Henderson wrote: Along this path we have already skipped the insn to be nullified, so the subsequent insn should be executed. Cc: qemu-sta...@nongnu.org Reported-by: Sven Schnelle Signed-off-by: Richard Henderson --- target/hppa/translate.c | 1 + 1 file changed, 1

Re: [PATCH v2 1/3] target/hppa: Generate getshadowregs inline

2024-03-26 Thread Helge Deller
On 3/26/24 19:10, Richard Henderson wrote: This operation is trivial and does not require a helper. Signed-off-by: Richard Henderson Reviewed-by: Helge Deller Helge --- target/hppa/helper.h | 1 - target/hppa/sys_helper.c | 4 ++-- target/hppa/translate.c | 17 +

<    1   2   3   >