Re: [PATCH] target/arm: Fix CNTPCT_EL0 trapping from EL0 when HCR_EL2.E2H is 0

2023-09-28 Thread Michal Orzel
Hi, On 27/09/2023 17:49, Peter Maydell wrote: > > > On Fri, 22 Sept 2023 at 14:21, Michal Orzel wrote: >> >> On an attempt to access CNTPCT_EL0 from EL0 using a guest running on top >> of Xen, a trap from EL2 was observed which is something not reproducible >> on HW (also, Xen does not trap acc

[PATCH 11/13] vt82c686: Support machine-default audiodev with fallback

2023-09-28 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/isa/vt82c686.c | 2 ++ hw/mips/fuloong2e.c | 13 ++--- hw/ppc/pegasos2.c | 10 -- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 57bdfb4e78c..3ec8e43708a 100644 --- a/hw/isa/vt82c

[PATCH 04/13] audio: return Error ** from audio_state_by_name

2023-09-28 Thread Paolo Bonzini
Remove duplicate error formatting code. Signed-off-by: Paolo Bonzini --- audio/audio-hmp-cmds.c | 6 -- audio/audio.c| 3 ++- audio/audio.h| 2 +- hw/core/qdev-properties-system.c | 16 ui/dbus.c|

[PATCH 12/13] audio: forbid mixing default audiodev backend and -audiodev

2023-09-28 Thread Paolo Bonzini
Now that all callers support setting an audiodev, forbid using the default audiodev if any audiodev is defined on the command line. To make the detection easier make AUD_register_card() return false on error. Signed-off-by: Martin Kletzander Signed-off-by: Paolo Bonzini --- audio/audio.c

[PATCH 09/13] hw/arm: Support machine-default audiodev with fallback

2023-09-28 Thread Paolo Bonzini
From: Martin Kletzander Signed-off-by: Martin Kletzander Signed-off-by: Paolo Bonzini --- hw/arm/integratorcp.c | 11 ++- hw/arm/musicpal.c | 11 +-- hw/arm/nseries.c | 4 hw/arm/omap2.c| 5 + hw/arm/palm.c | 2 ++ hw/arm/realview.c | 12

[PATCH 01/13] ui/vnc: Require audiodev= to enable audio

2023-09-28 Thread Paolo Bonzini
If there is no audiodev do not send the audio ack in response to VNC_ENCODING_AUDIO, so that clients aren't told audio exists, and immediately drop the client if they try to send any audio control messages when audio is not advertised. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst

[PATCH 10/13] hw/ppc: Support machine-default audiodev with fallback

2023-09-28 Thread Paolo Bonzini
From: Martin Kletzander Signed-off-by: Martin Kletzander Signed-off-by: Paolo Bonzini --- hw/ppc/prep.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index f6fd35fcb9e..137276bcb92 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -45,6 +45,7 @@ #inc

[PATCH 07/13] audio: remove QEMU_AUDIO_* and -audio-help support

2023-09-28 Thread Paolo Bonzini
These have been deprecated for a long time, and the introduction of -audio in 7.1.0 has cemented the new way of specifying an audio backend's parameters. However, there is still a need for simple configuration of the audio backend in the desktop case; therefore, if no audiodev is passed to audio_i

[PATCH 03/13] audio: allow returning an error from the driver init

2023-09-28 Thread Paolo Bonzini
An error is already printed by audio_driver_init, but we can make it more precise if the driver can return an Error *. Signed-off-by: Paolo Bonzini --- audio/alsaaudio.c | 2 +- audio/audio.c | 11 +-- audio/audio_int.h | 2 +- audio/coreaudio.m | 2 +- audio/dbusaudio.c

[PATCH v2 00/13] Cleanup deprecated audio features, take 2

2023-09-28 Thread Paolo Bonzini
In this version the QEMU_AUDIO_* options go away, but it is still possible to pick a default audio backend from the list provided to --audio-drv-list. The code is still simplified a lot compared to having all the legacy parsing code and the -audio-help function. I had to keep QEMU_AUDIO_DRV=none b

[PATCH 02/13] audio: Require AudioState in AUD_add_capture

2023-09-28 Thread Paolo Bonzini
From: Martin Kletzander Since all callers require a valid audiodev this function can now safely abort in case of missing AudioState. Signed-off-by: Martin Kletzander Message-ID: Signed-off-by: Paolo Bonzini --- audio/audio.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff

[PATCH 08/13] Introduce machine property "audiodev"

2023-09-28 Thread Paolo Bonzini
From: Martin Kletzander Many machine types have default audio devices with no way to set the underlying audiodev. Instead of adding an option for each and every one of them, this new property can be used as a default during machine initialisation when creating such devices. Signed-off-by: Marti

[PATCH 06/13] audio: simplify flow in audio_init

2023-09-28 Thread Paolo Bonzini
Merge two ifs into one. Signed-off-by: Paolo Bonzini --- audio/audio.c | 76 +-- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index e1456ad55d2..2e2e7fa72f7 100644 --- a/audio/audio.c +++ b/audio/aud

[PATCH 13/13] audio: forbid default audiodev backend with -nodefaults

2023-09-28 Thread Paolo Bonzini
Now that all callers support setting an audiodev, forbid using the default audiodev if -nodefaults is provided on the command line. Signed-off-by: Paolo Bonzini --- audio/audio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index bc837

[PATCH 05/13] audio: commonize voice initialization

2023-09-28 Thread Paolo Bonzini
Move some mostly irrelevant code out of audio_init. Signed-off-by: Paolo Bonzini --- audio/audio.c | 19 ++- audio/audio_template.h | 9 - 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index 0a1dba21340..e1456ad55

[PATCH] crypto: only include tls-cipher-suites in emulators

2023-09-28 Thread Paolo Bonzini
tls-cipher-suites is an object that is used to inject TLS configuration into the guest (via fw_cfg). It is never used for host-side TLS operation, and therefore it need not be available in the tools. Signed-off-by: Paolo Bonzini --- crypto/meson.build | 3 ++- hw/nvram/meson.build | 6 +-

[PATCH] meson: clean up static_library keyword arguments

2023-09-28 Thread Paolo Bonzini
These are either built because they are dependencies of other targets, or not needed at all because they are used via extract_objects(). Mark them as "build_by_default: false"; if applicable, mark them as "fa" so that -Wl,--whole-archive does not interact with the linker script used for fuzzing. (

[PATCH] Makefile: build plugins before running TCG tests

2023-09-28 Thread Paolo Bonzini
Add back test-plugins and, since it is always defined, do so unconditionally. Reported-by: Alex Bennée Fixes: 2c13c574418 ("configure, meson: move --enable-plugins to meson", 2023-09-07) Signed-off-by: Paolo Bonzini --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: deadlock when using iothread during backup_clean()

2023-09-28 Thread Fiona Ebner
Am 05.09.23 um 13:42 schrieb Paolo Bonzini: > On 9/5/23 12:01, Fiona Ebner wrote: >> Can we assume block_job_remove_all_bdrv() to always hold the job's >> AioContext? > > I think so, see job_unref_locked(), job_prepare_locked() and > job_finalize_single_locked().  These call the callbacks that ult

Re: [PATCH v3 0/6] python/machine: use socketpair() for console socket

2023-09-28 Thread Daniel P . Berrangé
On Thu, Sep 28, 2023 at 12:49:37AM -0400, John Snow wrote: > Like we did for the QMP socket, use socketpair() for the console socket > so that hopefully there isn't a race condition during early boot where > data might get dropped on the floor. > > May or may not help with various race conditions

Re: [PATCH] crypto: only include tls-cipher-suites in emulators

2023-09-28 Thread Daniel P . Berrangé
On Thu, Sep 28, 2023 at 09:49:18AM +0200, Paolo Bonzini wrote: > tls-cipher-suites is an object that is used to inject TLS configuration > into the guest (via fw_cfg). It is never used for host-side TLS > operation, and therefore it need not be available in the tools. > > Signed-off-by: Paolo Bon

Re: [PATCH 01/13] ui/vnc: Require audiodev= to enable audio

2023-09-28 Thread Daniel P . Berrangé
On Thu, Sep 28, 2023 at 09:36:45AM +0200, Paolo Bonzini wrote: > If there is no audiodev do not send the audio ack in response to > VNC_ENCODING_AUDIO, so that clients aren't told audio exists, and > immediately drop the client if they try to send any audio control messages > when audio is not adve

Re: [PATCH 03/13] audio: allow returning an error from the driver init

2023-09-28 Thread Daniel P . Berrangé
On Thu, Sep 28, 2023 at 09:36:47AM +0200, Paolo Bonzini wrote: > An error is already printed by audio_driver_init, but we can make > it more precise if the driver can return an Error *. > > Signed-off-by: Paolo Bonzini > --- > audio/alsaaudio.c | 2 +- > audio/audio.c | 11 +-- >

[PULL v2 03/21] target/tricore: Correctly handle FPU RM from PSW

2023-09-28 Thread Bastian Koppelmann
when we reconstructed PSW using psw_read(), we were trying to clear the cached USB bits out of env->PSW. The mask was wrong and we would clear PSW.RM as well. when we write the PSW using psw_write() we update the rounding modes in env->fp_status for softfloat. The order of bits used by TriCore is

[PULL v2 09/21] target/tricore: Swap src and dst reg for RCRR_INSERT

2023-09-28 Thread Bastian Koppelmann
Acked-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-10-kbast...@mail.uni-paderborn.de> --- target/tricore/translate.c | 8 tests/tcg/tricore/asm/macros.h | 9 + tests/tcg/tricore/asm/test_insert.S | 5 + 3 files chan

[PULL v2 11/21] target/tricore: Fix FTOUZ being ISA v1.3.1 up

2023-09-28 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-12-kbast...@mail.uni-paderborn.de> --- target/tricore/translate.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c i

[PULL v2 13/21] hw/tricore: Log failing test in testdevice

2023-09-28 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-3-kbast...@mail.uni-paderborn.de> --- hw/tricore/tricore_testdevice.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c index a1563aa568..d0f8db9089 100644 -

[PULL v2 08/21] target/tricore: Fix RCPW/RRPW_INSERT insns for width = 0

2023-09-28 Thread Bastian Koppelmann
we would crash if width was 0 for these insns, as tcg_gen_deposit() is undefined for that case. For TriCore, width = 0 is a mov from the src reg to the dst reg, so we special case this here. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Mes

[PULL v2 01/21] tests/tcg/tricore: Bump cpu to tc37x

2023-09-28 Thread Bastian Koppelmann
we don't want to exclude ISA v1.6.2 insns from our tests. Acked-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-Id: <20230828112651.522058-2-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PULL v2 21/21] target/tricore: Change effective address (ea) to target_ulong

2023-09-28 Thread Bastian Koppelmann
as this is an effective address and those cannot be signed, it should not be a signed integer. Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-11-kbast...@mail.uni-paderborn.de> --- target/tricore/op_helper.c | 16 1 file changed, 8 insertions(+), 8 deletions

[PULL v2 02/21] target/tricore: Implement CRCN insn

2023-09-28 Thread Bastian Koppelmann
reported in https://gitlab.com/qemu-project/qemu/-/issues/1667 Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-3-kbast...@mail.uni-paderborn.de> --- target/tricore/helper.h | 1 + target/tricore/op_helper.c|

[PULL v2 19/21] tests/tcg/tricore: Add test from 'shuffle' to 'xor.t'

2023-09-28 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-9-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/test_arith.S | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/tcg/tricore/asm/test_arith.S b/tests/tcg/tricore/asm/test_arith.S

[PULL v2 17/21] tests/tcg/tricore: Add test from 'dextr' to 'lt'

2023-09-28 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-7-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/macros.h | 51 ++-- tests/tcg/tricore/asm/test_arith.S | 53 ++ 2 files changed, 102 insertions(+), 2 deletions(-

[PULL v2 06/21] target/tricore: Implement ftohp insn

2023-09-28 Thread Bastian Koppelmann
reported in https://gitlab.com/qemu-project/qemu/-/issues/1667 Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-7-kbast...@mail.uni-paderborn.de> --- target/tricore/fpu_helper.c | 38 +++ target/tricore/helper.

[PULL v2 04/21] target/tricore: Implement FTOU insn

2023-09-28 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-5-kbast...@mail.uni-paderborn.de> --- target/tricore/fpu_helper.c | 32 +++ target/tricore/helper.h | 1 + target/tricore/translate.c

[PULL v2 15/21] tests/tcg/tricore: Add test for all arith insns up to addx

2023-09-28 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-5-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 3 +- tests/tcg/tricore/asm/macros.h| 50 +++ tests/tcg/tricore/asm/test_arith.S| 41 +++

[PULL v2 07/21] target/tricore: Implement hptof insn

2023-09-28 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1667 Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-8-kbast...@mail.uni-paderborn.de> --- target/tricore/fpu_helper.c | 36 +++ target/tricore/helper.h

[PULL v2 10/21] target/tricore: Replace cpu_*_code with translator_*

2023-09-28 Thread Bastian Koppelmann
Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-11-kbast...@mail.uni-paderborn.de> --- target/tricore/translate.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c

[PULL v2 16/21] tests/tcg/tricore: Add test from 'and' to 'csub'

2023-09-28 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-6-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/macros.h | 11 +++ tests/tcg/tricore/asm/test_arith.S | 47 ++ 2 files changed, 58 insertions(+) diff --git a/tests/tcg/tricore/asm/

[PULL v2 18/21] tests/tcg/tricore: Add test from 'max' to 'shas'

2023-09-28 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-8-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/macros.h | 13 tests/tcg/tricore/asm/test_arith.S | 105 + 2 files changed, 118 insertions(+) diff --git a/tests/tcg/tricore/asm/m

[PULL v2 12/21] tests/tcg/tricore: Extended and non-extened regs now match

2023-09-28 Thread Bastian Koppelmann
RSx for d regs and e regs now use the same numbering. This makes sure that mixing d and e registers in an insn test will not overwrite data between registers. Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-2-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/macros.h

[PULL v2 14/21] tests/tcg: Reset result register after each test

2023-09-28 Thread Bastian Koppelmann
some insns use the result register implicitly as an input. Thus, we could end up with data from the previous insn spilling over. Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-4-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/macros.h | 3 ++- 1 file changed, 2 ins

[PULL v2 20/21] target/tricore: Remove CSFRs from cpu.h

2023-09-28 Thread Bastian Koppelmann
these are already defined in 'csfr.h.inc'. We don't need to duplicate these registers. Signed-off-by: Bastian Koppelmann Message-ID: <20230913105326.40832-10-kbast...@mail.uni-paderborn.de> --- target/tricore/cpu.h | 143 +++ 1 file changed, 9 insertions(+

[PULL v2 05/21] target/tricore: Clarify special case for FTOUZ insn

2023-09-28 Thread Bastian Koppelmann
this is not something other ISAs do, so clarify it with a comment. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Message-ID: <20230828112651.522058-6-kbast...@mail.uni-paderborn.de> --- target/tricore/fpu_helper.c | 5 + 1 file changed, 5 insertions(+) diff --git a/targe

[PULL v2 00/21] tricore queue

2023-09-28 Thread Bastian Koppelmann
The following changes since commit 36e9aab3c569d4c9ad780473596e18479838d1aa: migration: Move return path cleanup to main migration thread (2023-09-27 13:58:02 -0400) are available in the Git repository at: https://github.com/bkoppelmann/qemu.git tags/pull-tricore-20230928 for you to fetch

Re: [PATCH v7 01/12] nbd/server: Support a request payload

2023-09-28 Thread Vladimir Sementsov-Ogievskiy
On 27.09.23 18:59, Eric Blake wrote: We could also try to be a bit more complicated by peeking at the next few bytes: if they look like a magic number of the next request, assume the client set the bit accidentally but didn't send a payload after all; for anything else, assume the client did pass

[PATCH v2] target/arm: Fix CNTPCT_EL0 trapping from EL0 when HCR_EL2.E2H is 0

2023-09-28 Thread Michal Orzel
On an attempt to access CNTPCT_EL0 from EL0 using a guest running on top of Xen, a trap from EL2 was observed which is something not reproducible on HW (also, Xen does not trap accesses to physical counter). This is because gt_counter_access() checks for an incorrect bit (1 instead of 0) of CNTHCT

Re: [PATCH 0/3] vhost: clean up device reset

2023-09-28 Thread Eugenio Perez Martin
On Wed, Sep 27, 2023 at 9:27 PM Stefan Hajnoczi wrote: > > Stateful vhost devices may need to free resources or clear device state upon > device reset. The vhost-user protocol has a VHOST_USER_RESET_DEVICE message > for > this and vDPA has SET_STATUS 0, but only QEMU's vhost-user-scsi device > a

Re: [PATCH v2] target/arm: Fix CNTPCT_EL0 trapping from EL0 when HCR_EL2.E2H is 0

2023-09-28 Thread Oleksandr Tyshchenko
On 28.09.23 12:44, Michal Orzel wrote: Hello Michal > On an attempt to access CNTPCT_EL0 from EL0 using a guest running on top > of Xen, a trap from EL2 was observed which is something not reproducible > on HW (also, Xen does not trap accesses to physical counter). > > This is because gt_count

Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors

2023-09-28 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> qemu_rdma_accept() returns 0 in some cases even when it didn't >> complete its job due to errors. Impact is not obvious. I figure the >> caller will soon fail again with a misleading error message. >> >> Fix it t

Re: [PATCH 00/52] migration/rdma: Error handling fixes

2023-09-28 Thread Markus Armbruster
Thank you for reviewing! Especially Li Zhijian, who went through pretty much all the patches. Big chunk of work, much appreciated. Will send v2 shortly.

Re: [PATCH] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected

2023-09-28 Thread Daniel P . Berrangé
On Wed, Aug 16, 2023 at 11:07:43PM +0200, Thomas Huth wrote: > When starting a guest via libvirt with "virsh start --console ...", > the first second of the console output is missing. This is especially > annoying on s390x that only has a text console by default and no graphical > output - if the b

Re: [PATCH 1/1] hw/ide/core: terminate in-flight DMA on IDE bus reset

2023-09-28 Thread Fiona Ebner
Am 26.09.23 um 16:45 schrieb John Snow: > > > On Tue, Sep 26, 2023, 3:11 AM Fiona Ebner > wrote: > > Am 25.09.23 um 21:53 schrieb John Snow: > > On Thu, Sep 21, 2023 at 12:07 PM Simon Rowe > mailto:simon.r...@nutanix.com>> wrote: > >> > >> When an

Re: [PATCH v24 02/21] CPU topology: extend with s390 specifics

2023-09-28 Thread Thomas Huth
On 26/09/2023 14.15, Nina Schoetterl-Glausch wrote: From: Pierre Morel S390 adds two new SMP levels, drawers and books to the CPU topology. S390 CPUs have specific topology features like dedication and entitlement. These indicate to the guest information on host vCPU scheduling and help the gue

Re: [PATCH 08/13] Introduce machine property "audiodev"

2023-09-28 Thread BALATON Zoltan
On Thu, 28 Sep 2023, Paolo Bonzini wrote: From: Martin Kletzander Many machine types have default audio devices with no way to set the underlying audiodev. Instead of adding an option for each and every one of them, this new property can be used as a default during machine initialisation when

Re: [PATCH 02/13] audio: Require AudioState in AUD_add_capture

2023-09-28 Thread BALATON Zoltan
On Sat, 23 Sep 2023, BALATON Zoltan wrote: On Sat, 23 Sep 2023, Paolo Bonzini wrote: From: Martin Kletzander Since all callers require a valid audiodev this function can now safely abort in case of missing AudioState. Signed-off-by: Martin Kletzander Message-ID: Signed-off-by: Paolo Bonzi

Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-09-28 Thread Jonathan Cameron via
On Wed, 27 Sep 2023 19:13:35 + Fan Ni wrote: > On Mon, Sep 25, 2023 at 04:22:58PM +0100, Jonathan Cameron wrote: > > > Rename the version not burried in the macro to cap_h. > The change looks good to me. Just one minor thing. why "version" get > involved here? > Used in the sense of two c

[PATCH v2 05/16] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 core count test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 1 - 3. List the ACPI tables that will be added to test the type 4 core count field. Signed-off-by: Zhao Liu --- tests/data/acpi/q35/APIC.core-count | 0 tests/data/acpi/q35/DSDT.core-count

[PATCH v2 06/16] tests: bios-tables-test: Add test for smbios type4 core count

2023-09-28 Thread Zhao Liu
From: Zhao Liu This tests the commit 196ea60a734c3 ("hw/smbios: Fix core count in type4"). In smbios_build_type_4_table() (hw/smbios/smbios.c), if the number of cores in the socket is not more than 255, then smbios type4 table encodes cores per socket into the core count field. So for the topol

[PATCH v2 04/16] tests: bios-tables-test: Add ACPI table binaries for smbios type4 count test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 5 and 6. Changes in the tables: FACP: +/* + * Intel ACPI Component Architecture + * AML/ASL+ Disassembler version 20200925 (64-bit version) + * Copyright (c) 2000 - 2020 Intel Corporation + * + * Disassembly

[PATCH v2 11/16] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 thread count test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 1 - 3. List the ACPI tables that will be added to test the thread count field of smbios type4 table. Signed-off-by: Zhao Liu --- tests/data/acpi/q35/APIC.thread-count | 0 tests/data/acpi/q35/DSDT.th

[PATCH v2 03/16] tests: bios-tables-test: Add test for smbios type4 count

2023-09-28 Thread Zhao Liu
From: Zhao Liu This tests the commit d79a284a44bb7 ("hw/smbios: Fix smbios_smp_sockets calculation"). In smbios_get_tables() (hw/smbios/smbios.c), smbios type4 table is built for each socket, so the count of type4 tables should be equal to the number of sockets. Thus for the topology in this ca

[PATCH v2 15/16] tests: bios-tables-test: Add test for smbios type4 thread count2

2023-09-28 Thread Zhao Liu
From: Zhao Liu This tests the commit 7298fd7de5551 ("hw/smbios: Fix thread count in type4"). In smbios_build_type_4_table() (hw/smbios/smbios.c), if the number of threads in the socket is more than 255, then smbios type4 table encodes threads per socket into the thread count2 field. So for the

[PATCH v2 13/16] tests: bios-tables-test: Add ACPI table binaries for smbios type4 thread count test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 5 and 6. Changes in the tables: FACP: +/* + * Intel ACPI Component Architecture + * AML/ASL+ Disassembler version 20200925 (64-bit version) + * Copyright (c) 2000 - 2020 Intel Corporation + * + * Disassembly

[PATCH v2 12/16] tests: bios-tables-test: Add test for smbios type4 thread count

2023-09-28 Thread Zhao Liu
From: Zhao Liu This tests the commit 7298fd7de5551 ("hw/smbios: Fix thread count in type4"). In smbios_build_type_4_table() (hw/smbios/smbios.c), if the number of threads in the socket is not more than 255, then smbios type4 table encodes threads per socket into the thread count field. So for t

[PATCH v2 07/16] tests: bios-tables-test: Add ACPI table binaries for smbios type4 core count test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 5 and 6. Changes in the tables: FACP: +/* + * Intel ACPI Component Architecture + * AML/ASL+ Disassembler version 20200925 (64-bit version) + * Copyright (c) 2000 - 2020 Intel Corporation + * + * Disassembly

[PATCH v2 08/16] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 core count2 test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 1 - 3. List the ACPI tables that will be changed about the type 4 core count2 test case. Signed-off-by: Zhao Liu --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) dif

[PATCH v2 01/16] tests: test-smp-parse: Add the test for cores/threads per socket helpers

2023-09-28 Thread Zhao Liu
From: Zhao Liu Use the different ways to calculate cores/threads per socket, so that the new CPU topology levels won't be missed in these 2 helpes: * machine_topo_get_cores_per_socket() * machine_topo_get_threads_per_socket() Test the commit a1d027be95bc3 ("machine: Add helpers to get cores/ th

[PATCH v2 16/16] tests: bios-tables-test: Add ACPI table binaries for smbios type4 thread count2 test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 5 and 6. Changes in the tables: FACP: +/* + * Intel ACPI Component Architecture + * AML/ASL+ Disassembler version 20200925 (64-bit version) + * Copyright (c) 2000 - 2020 Intel Corporation + * + * Disassembly

[PATCH v2 14/16] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 thread count2 test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 1 - 3. List the ACPI tables that will be added to test the thread count2 field of smbios type4 table. Signed-off-by: Zhao Liu --- tests/data/acpi/q35/APIC.thread-count2 | 0 tests/data/acpi/q35/DSDT.t

[PATCH v2 00/16] tests: Add CPU topology related smbios test cases

2023-09-28 Thread Zhao Liu
From: Zhao Liu Hi all, This patchset is the v2 which adds more description about the topology selection under Igor's comments. In this patchset, add these test cases: 1. Add the case to test 2 newly added topology helpers (patch 1): * machine_topo_get_cores_per_socket() * machine_topo_ge

[PATCH v2 09/16] tests: bios-tables-test: Extend smbios core count2 test to cover general topology

2023-09-28 Thread Zhao Liu
From: Zhao Liu The commit 196ea60a734c3 ("hw/smbios: Fix core count in type4") fixed the miscalculation of cores per socket. The original core count2 test (with the topology configured by "-smp 275") didn't recognize that topology-related but because it just created a special topology with only

[PATCH v2 02/16] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 count test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Following the guidelines in tests/qtest/bios-tables-test.c, this is step 1 - 3. List the ACPI tables that will be added to test the type 4 count. Signed-off-by: Zhao Liu --- tests/data/acpi/q35/APIC.type4-count| 0 tests/data/acpi/q35/DSDT.type4-count| 0 tests/

[PATCH v2 10/16] tests: bios-tables-test: Update ACPI table binaries for smbios core count2 test

2023-09-28 Thread Zhao Liu
From: Zhao Liu Change the core count2 from 275 to 260. Following the guidelines in tests/qtest/bios-tables-test.c, this is step 5 and 6. Changes in the tables: APIC: /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20200925 (64-bit version) * Copyright (c) 2000 - 2

[PATCH] Fix compilation when UFFDIO_REGISTER is not set.

2023-09-28 Thread Pierre Labatut
Signed-off-by: Pierre Labatut --- subprojects/libvhost-user/libvhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 0469a50101..d4a2eab883 100644 --- a/subprojects/libvhost-use

Re: [PATCH 02/13] audio: Require AudioState in AUD_add_capture

2023-09-28 Thread Markus Armbruster
BALATON Zoltan writes: > On Sat, 23 Sep 2023, Paolo Bonzini wrote: >> From: Martin Kletzander >> >> Since all callers require a valid audiodev this function can now safely >> abort in case of missing AudioState. >> >> Signed-off-by: Martin Kletzander >> Message-ID: >> >> Signed-off-by: Paolo

Re: [PATCH v24 04/21] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-09-28 Thread Thomas Huth
On 26/09/2023 14.15, Nina Schoetterl-Glausch wrote: From: Pierre Morel On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Co-developed-by: Nina Schoetter

[PATCH v2 08/53] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage

2023-09-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian --- migration/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index faca0ed998..0e991175f9 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -

[PATCH v2 12/53] migration/rdma: Drop rdma_add_block() error handling

2023-09-28 Thread Markus Armbruster
rdma_add_block() can't fail. Return void, and drop the unreachable error handling. Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian --- migration/rdma.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/migra

[PATCH v2 17/53] migration/rdma: Ditch useless numeric error codes in error messages

2023-09-28 Thread Markus Armbruster
Several error messages include numeric error codes returned by failed functions: * ibv_poll_cq() returns an unspecified negative value. Useless. * rdma_accept and rdma_get_cm_event() return -1. Useless. * qemu_rdma_poll() returns either -1 or an unspecified negative value. Useless. * qemu_

[PATCH v2 07/53] migration/rdma: Clean up two more harmless signed vs. unsigned issues

2023-09-28 Thread Markus Armbruster
qemu_rdma_exchange_get_response() compares int parameter @expecting with uint32_t head->type. Actual arguments are non-negative enumeration constants, RDMAControlHeader uint32_t member type, or qemu_rdma_exchange_recv() int parameter expecting. Actual arguments for the latter are non-negative enu

[PATCH v2 38/53] migration/rdma: Convert qemu_rdma_reg_whole_ram_blocks() to Error

2023-09-28 Thread Markus Armbruster
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is b

[PATCH v2 34/53] migration/rdma: Drop "@errp is clear" guards around error_setg()

2023-09-28 Thread Markus Armbruster
These guards are all redundant now. Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian --- migration/rdma.c | 164 +++ 1 file changed, 51 insertions(+), 113 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 4fec6dbf86..45e5517

[PATCH v2 21/53] migration/rdma: Fix qemu_get_cm_event_timeout() to always set error

2023-09-28 Thread Markus Armbruster
qemu_get_cm_event_timeout() neglects to set an error when it fails because rdma_get_cm_event() fails. Harmless, as its caller qemu_rdma_connect() substitutes a generic error then. Fix it anyway. qemu_rdma_connect() also sets the generic error when its own call of rdma_get_cm_event() fails. Make

[PATCH v2 18/53] migration/rdma: Fix io_writev(), io_readv() methods to obey contract

2023-09-28 Thread Markus Armbruster
QIOChannelClass methods qio_channel_rdma_readv() and qio_channel_rdma_writev() violate their method contract when rdma->error_state is non-zero: 1. They return whatever is in rdma->error_state then. Only -1 will be fine. -2 will be misinterpreted as "would block". Anything less than -2 is

[PATCH v2 01/53] migration/rdma: Clean up qemu_rdma_poll()'s return type

2023-09-28 Thread Markus Armbruster
qemu_rdma_poll()'s return type is uint64_t, even though it returns 0, -1, or @ret, which is int. Its callers assign the return value to int variables, then check whether it's negative. Unclean. Return int instead. Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhi

[PATCH v2 46/53] migration/rdma: Silence qemu_rdma_connect()

2023-09-28 Thread Markus Armbruster
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is b

[PATCH v2 11/53] migration/rdma: Eliminate error_propagate()

2023-09-28 Thread Markus Armbruster
When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian --- migration/rdma.c | 19 +++ 1 file changed, 7

[PATCH v2 33/53] migration/rdma: Fix error handling around rdma_getaddrinfo()

2023-09-28 Thread Markus Armbruster
qemu_rdma_resolve_host() and qemu_rdma_dest_init() iterate over addresses to find one that works, holding onto the first Error from qemu_rdma_broken_ipv6_kernel() for use when no address works. Issues: 1. If @errp was &error_abort or &error_fatal, we'd terminate instead of trying the next addr

[PATCH v2 04/53] migration/rdma: Drop fragile wr_id formatting

2023-09-28 Thread Markus Armbruster
wrid_desc[] uses 4001 pointers to map four integer values to strings. print_wrid() accesses wrid_desc[] out of bounds when passed a negative argument. It returns null for values 2..1999 and 2001..3999. qemu_rdma_poll() and qemu_rdma_block_for_wrid() print wrid_desc[wr_id] and passes print_wrid(w

[PATCH v2 39/53] migration/rdma: Convert qemu_rdma_write_flush() to Error

2023-09-28 Thread Markus Armbruster
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is b

[PATCH v2 05/53] migration/rdma: Consistently use uint64_t for work request IDs

2023-09-28 Thread Markus Armbruster
We use int instead of uint64_t in a few places. Change them to uint64_t. This cleans up a comparison of signed qemu_rdma_block_for_wrid() parameter @wrid_requested with unsigned @wr_id. Harmless, because the actual arguments are non-negative enumeration constants. Signed-off-by: Markus Armbrust

[PATCH v2 44/53] migration/rdma: Convert qemu_rdma_alloc_pd_cq() to Error

2023-09-28 Thread Markus Armbruster
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is b

[PATCH v2 50/53] migration/rdma: Silence qemu_rdma_register_and_get_keys()

2023-09-28 Thread Markus Armbruster
Functions that use an Error **errp parameter to return errors should not also report them to the user, because reporting is the caller's job. When the caller does, the error is reported twice. When it doesn't (because it recovered from the error), there is no error to report, i.e. the report is b

[PATCH v2 43/53] migration/rdma: Convert qemu_rdma_post_recv_control() to Error

2023-09-28 Thread Markus Armbruster
Just for symmetry with qemu_rdma_post_send_control(). Error messages lose detail I consider of no use to users. Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian --- migration/rdma.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/migration/r

[PATCH v2 52/53] migration/rdma: Use error_report() & friends instead of stderr

2023-09-28 Thread Markus Armbruster
error_report() obeys -msg, reports the current error location if any, and reports to the current monitor if any. Reporting to stderr directly with fprintf() or perror() is wrong, because it loses all this. Fix the offenders. Bonus: resolves a FIXME about problematic use of errno. Signed-off-by:

[PATCH v2 02/53] migration/rdma: Clean up qemu_rdma_data_init()'s return type

2023-09-28 Thread Markus Armbruster
qemu_rdma_data_init() return type is void *. It actually returns RDMAContext *, and all its callers assign the value to an RDMAContext *. Unclean. Return RDMAContext * instead. Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian --- migration/rdma.c | 2 +- 1

[PATCH v2 32/53] migration/rdma: Retire macro ERROR()

2023-09-28 Thread Markus Armbruster
ERROR() has become "error_setg() unless an error has been set already". Hiding the conditional in the macro is in the way of further work. Replace the macro uses by their expansion, and delete the macro. Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian --- migration/rdma.c | 168 +

[PATCH v2 24/53] migration/rdma: Fix rdma_getaddrinfo() error checking

2023-09-28 Thread Markus Armbruster
rdma_getaddrinfo() returns 0 on success. On error, it returns one of the EAI_ error codes like getaddrinfo() does, or -1 with errno set. This is broken by design: POSIX implicitly specifies the EAI_ error codes to be non-zero, no more. They could clash with -1. Nothing we can do about this desig

[PATCH v2 19/53] migration/rdma: Replace dangerous macro CHECK_ERROR_STATE()

2023-09-28 Thread Markus Armbruster
Hiding return statements in macros is a bad idea. Use a function instead, and open code the return part. Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian --- migration/rdma.c | 43 +++ 1 file changed, 27 insertions(+),

  1   2   3   >