Re: [PATCH v5 20/31] target/tricore: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: No changes in the output from the following command. [gshan@gshan q]$ ./build/qemu-system-tricore -cpu ? Available CPUs: tc1796 tc1797 tc27x tc37x Signed-off-by: Gavin Shan --- target/tricore/cpu.h| 4 target/tricore/helper.c | 22 -

Re: [PATCH v5 19/31] target/sh4: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Before it's applied: [gshan@gshan q]$ ./build/qemu-system-sh4 -cpu ? sh7750r sh7751r sh7785 After it's applied: [gshan@gshan q]$ ./build/qemu-system-sh4 -cpu ? Available CPUs: sh7750r sh7751r sh7785 Signed-off-by: Gavin Shan --- target/sh4/cpu.

Re: [PATCH v5 18/31] target/rx: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Before it's applied: [gshan@gshan q]$ ./build/qemu-system-rx -cpu ? Available CPUs: rx62n-rx-cpu After it's applied: [gshan@gshan q]$ ./build/qemu-system-rx -cpu ? Available CPUs: rx62n Signed-off-by: Gavin Shan --- target/rx/cpu.c | 16 --

Re: [PATCH v5 15/31] target/mips: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Before it's applied: [gshan@gshan q]$ ./build/qemu-system-mips64 -cpu ? MIPS '4Kc' MIPS '4Km' MIPS '4KEcR1' MIPS 'XBurstR1' MIPS '4KEmR1' MIPS '4KEc' MIPS '4KEm' MIPS '24Kc' MIPS '24KEc' MIPS '24Kf' MIPS '34Kf' MIPS '74Kf' MIPS 'XBurstR2' MIPS 'M14K' MIPS 'M1

Re: [PATCH v5 12/31] target/hppa: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: No changes in the output from the following command. [gshan@gshan q]$ ./build/qemu-system-hppa -cpu ? Available CPUs: hppa hppa64 Signed-off-by: Gavin Shan --- target/hppa/cpu.c | 24 target/hppa/cpu.h | 3 --- 2 files ch

Re: [PATCH v5 11/31] target/hexagon: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: No changes in the output from the following command. [gshan@gshan q]$ ./build/qemu-hexagon -cpu ? Available CPUs: v67 v68 v69 v71 v73 Signed-off-by: Gavin Shan --- target/hexagon/cpu.c | 20 target/hexagon/cpu.h | 3 -

Re: [PATCH v5 10/31] target/cris: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Before it's applied: [gshan@gshan q]$ ./build/qemu-system-cris -cpu ? Available CPUs: crisv8 crisv9 crisv10 crisv11 crisv17 crisv32 After it's applied: [gshan@gshan q]$ ./build/qemu-system-cris -cpu ? Available CPUs: crisv10 crisv11

Re: [PATCH v5 09/31] target/avr: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Before it's applied: [gshan@gshan q]$ ./build/qemu-system-avr -cpu ? avr5-avr-cpu avr51-avr-cpu avr6-avr-cpu After it's applied: [gshan@gshan q]$ ./build/qemu-system-avr -cpu ? Available CPUs: avr5 avr51 avr6 Signed-off-by: Gavin Shan --- targe

Re: [PATCH v5 08/31] target/arm: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: No changes of the output from the following command before and after it's applied. [gshan@gshan q]$ ./build/qemu-system-aarch64 -cpu ? Available CPUs: a64fx arm1026 arm1136 arm1136-r2 arm1176 arm11mpcore arm926 arm946 cortex-a15

[PULL 09/27] hw/cxl: spelling fixes: limitaions, potentialy, intialized

2023-11-15 Thread Michael Tokarev
Fixes: 388d6b574e28 "hw/cxl: Use switch statements for read and write of cachemem registers" Fixes: 3314efd276ad "hw/cxl/mbox: Add Physical Switch Identify command." Fixes: 004e3a93b814 "hw/cxl: Add tunneled command support to mailbox for switch cci." Reviewed-by: Thomas Huth Signed-off-by: Mich

Re: [PATCH v5 06/31] cpu: Add generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 08:39, Philippe Mathieu-Daudé wrote: Hi Gavin, On 15/11/23 00:56, Gavin Shan wrote: Add generic cpu_list() to replace the individual target's implementation in the subsequent commits. Currently, there are 3 targets with no cpu_list() implementation: microblaze and nios2. With this

[PULL 26/27] util/filemonitor-inotify.c: spelling fix: kenel

2023-11-15 Thread Michael Tokarev
Fixes: 2e12dd405c66 "util/filemonitor-inotify: qemu_file_monitor_watch(): assert no overflow" Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Michael Tokarev --- util/filemonitor-inotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/filemonitor-inotify.c b/

[PULL 13/27] docs/system/arm/emulation.rst: spelling fix: Enhacements

2023-11-15 Thread Michael Tokarev
Fixes: c7c807f6dd6d "target/arm: Implement FEAT_Pauth2" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- docs/system/arm/emulation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 47fd648035..0b

[PULL 00/27] Trivial patches for 2023-11-16

2023-11-15 Thread Michael Tokarev
The following changes since commit 9c673a41eefc50f1cb2fe3c083e7de842c7d276a: Update version for v8.2.0-rc0 release (2023-11-14 12:35:47 -0500) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches for you to fetch changes up to f779357882b475855

Re: [PATCH v5 07/31] target/alpha: Use generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Before it's applied: [gshan@gshan q]$ ./build/qemu-system-alpha -cpu ? Available CPUs: ev4-alpha-cpu ev5-alpha-cpu ev56-alpha-cpu ev6-alpha-cpu ev67-alpha-cpu ev68-alpha-cpu pca56-alpha-cpu After it's applied: [gshan@gshan q]$ ./build/q

[PULL 25/27] tests/qtest/ufs-test.c: spelling fix: tranfer

2023-11-15 Thread Michael Tokarev
Fixes: 631c872614ac "tests/qtest: Introduce tests for UFS" Reviewed-by: Jeuk Kim Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- tests/qtest/ufs-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/ufs-test.c b/tests/qtest/ufs-test.c index 5daf8c9c4

[PULL 23/27] target/riscv/cpu.h: spelling fix: separatly

2023-11-15 Thread Michael Tokarev
Fixes: 40336d5b1d4c "target/riscv: Add HS-mode virtual interrupt and IRQ filtering support." Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- target/riscv/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index bf58b

[PULL 16/27] migration/rdma.c: spelling fix: asume

2023-11-15 Thread Michael Tokarev
Fixes: 67c31c9c1af1 "migration: Don't abuse qemu_file transferred for RDMA" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- migration/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index 6a29e53daf..04debab5d9 100644 ---

[PULL 15/27] target/hppa: spelling fixes: Indicies, Truely

2023-11-15 Thread Michael Tokarev
Fixes: bb67ec32a0bb "target/hppa: Include PSW_P in tb flags and mmu index" Fixes: d7553f3591bb "target/hppa: Populate an interval tree with valid tlb entries" Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- target/hppa/cpu.h | 2 +- target/hppa/machine.c | 2 +- 2 files ch

[PULL 21/27] include/hw/hyperv/dynmem-proto.h: spelling fix: nunber, atleast

2023-11-15 Thread Michael Tokarev
Fixes: 4f80cd2f033e "Add Hyper-V Dynamic Memory Protocol definitions" Acked-by: Maciej S. Szmigiero Signed-off-by: Michael Tokarev --- include/hw/hyperv/dynmem-proto.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/hyperv/dynmem-proto.h b/include/hw/hyperv/d

RE: [PATCH 1/4] vfio/pci: Move VFIODevice initializations in vfio_instance_init

2023-11-15 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, November 16, 2023 3:29 PM >To: Duan, Zhenzhong ; qemu-devel@nongnu.org >Cc: alex.william...@redhat.com; j...@nvidia.com; nicol...@nvidia.com; >joao.m.mart...@oracle.com; eric.au...@redhat.com; pet...@redhat.com; >jasow...@redha

[PULL 11/27] docs/about/deprecated.rst: spelling fix: becase

2023-11-15 Thread Michael Tokarev
Fixes: 864128df465a "migration: Deprecate old compression method" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- docs/about/deprecated.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 78550c07bf..6c84

[PULL 24/27] tests/qtest/migration-test.c: spelling fix: bandwith

2023-11-15 Thread Michael Tokarev
Fixes: 17257b90be4f "tests: Add migration dirty-limit capability test" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- tests/qtest/migration-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 57

[PULL 20/27] include/block/ufs.h: spelling fix: setted

2023-11-15 Thread Michael Tokarev
Fixes: bc4e68d362ec "hw/ufs: Initial commit for emulated Universal-Flash-Storage" Reviewed-by: Jeuk Kim Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- include/block/ufs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/ufs.h b/include/block/ufs.h

[PULL 12/27] docs/devel/migration.rst: spelling fixes: doen't, diferent, responsability, recomend

2023-11-15 Thread Michael Tokarev
Fixes: 593c28c02c81 "migration/doc: How to migrate when hosts have different features" Fixes: 1aefe2ca1423 "migration/doc: Add documentation for backwards compatiblity" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- docs/devel/migration.rst | 10 +- 1 file changed, 5 inser

[PULL 27/27] util/range.c: spelling fix: inbetween

2023-11-15 Thread Michael Tokarev
Fixes: b439595a08d7 "range: Introduce range_inverse_array()" Reviewed-by: Eric Auger Reviewed-by: Cédric Le Goater Signed-off-by: Michael Tokarev --- util/range.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/range.c b/util/range.c index 9605ccfcbe..f3f40098d5 100644

[PULL 07/27] bsd-user: spelling fixes: necesary, agrument, undocummented

2023-11-15 Thread Michael Tokarev
Fixes: a99d74034754 "bsd-user: Implement do_obreak function" Fixes: 8632729060bf "bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve." Fixes: bf14f13d8be8 "bsd-user: Implement stat related syscalls" Reviewed-by: Warner Losh Signed-off-by: Michael Tokarev --- bsd-user/b

Re: [PATCH v5 05/31] cpu: Add helper cpu_model_from_type()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:56, Gavin Shan wrote: Add helper cpu_model_from_type() to extract the CPU model name from the CPU type name in two circumstances: (1) The CPU type name is the combination of the CPU model name and suffix. (2) The CPU type name is same to the CPU model name. The helper will be used

[PULL 18/27] hw/mem/memory-device.c: spelling fix: ontaining

2023-11-15 Thread Michael Tokarev
Fixes: 6c1b28e9e405 "memory-device: Support empty memory devices" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- hw/mem/memory-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index e0704b8dc3..a1b1af26bc 10

[PULL 22/27] include/hw/virtio/vhost.h: spelling fix: sate

2023-11-15 Thread Michael Tokarev
Fixes: 4a00d5d7f4b6 "vhost: Add high-level state save/load functions" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- include/hw/virtio/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 05d7204a08..

[PULL 10/27] gdbstub: spelling fix: respectivelly

2023-11-15 Thread Michael Tokarev
Fixes: 761e3c10881b "gdbstub: fixes cases where wrong threads were reported to GDB on SIGINT" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- gdbstub/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index ebb912da1b.

[PULL 14/27] target/arm/tcg: spelling fixes: alse, addreses

2023-11-15 Thread Michael Tokarev
Fixes: 179e9a3baccc "target/arm: Define new TB flag for ATA0" Fixes: 5d7b37b5f675 "target/arm: Implement the CPY* instructions" Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- target/arm/tcg/helper-a64.c | 2 +- target/arm/tcg/hflags.c | 2 +- 2 files changed, 2 insertions(

[PULL 03/27] tests/data/qobject/qdict.txt: Avoid non-inclusive words

2023-11-15 Thread Michael Tokarev
From: Thomas Huth qdict.txt only consists of more or less random test data. We can simply drop the lines with the problematic words here. Signed-off-by: Thomas Huth Signed-off-by: Michael Tokarev --- tests/data/qobject/qdict.txt | 4 1 file changed, 4 deletions(-) diff --git a/tests/dat

[PULL 19/27] hw/net/cadence_gem.c: spelling fixes: Octects

2023-11-15 Thread Michael Tokarev
Fixes: c755c943aa2e "hw/net/cadence_gem: use REG32 macro for register definitions" Reviewed-by: Thomas Huth Reviewed-by: Luc Michel Signed-off-by: Michael Tokarev --- hw/net/cadence_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/

[PULL 08/27] linux-user: spelling fixes: othe, necesary

2023-11-15 Thread Michael Tokarev
Fixes: e34136d93059 "linux-user/ppc: Add vdso" Fixes: 86f04735ac20 "linux-user: Fix brk() to release pages" Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- linux-user/ppc/vdso.S | 2 +- linux-user/syscall.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux

[PULL 17/27] contrib/vhost-user-gpu/virgl.c: spelling fix: mesage

2023-11-15 Thread Michael Tokarev
Fixes: e3c82fe04f31 "contrib/vhost-user-gpu: add support for sending dmabuf modifiers" Reviewed-by: Marc-André Lureau Signed-off-by: Michael Tokarev --- contrib/vhost-user-gpu/virgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vh

[PULL 05/27] hw/audio/virtio-snd.c: spelling: initalize

2023-11-15 Thread Michael Tokarev
Fixes: eb9ad377bb94 "virtio-sound: handle control messages and streams" Signed-off-by: Michael Tokarev Reviewed-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé --- hw/audio/virtio-snd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virt

[PULL 01/27] hw/watchdog/wdt_aspeed: Remove unused 'hw/misc/aspeed_scu.h' header

2023-11-15 Thread Michael Tokarev
From: Philippe Mathieu-Daudé Aspeed watchdog doesn't use anything from the System Control Unit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Signed-off-by: Michael Tokarev --- hw/watchdog/wdt_aspeed.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/watchdog/wdt_a

[PULL 02/27] MAINTAINERS: Add tests/decode/ to the "Overall TCG CPUs" section

2023-11-15 Thread Michael Tokarev
From: Thomas Huth The tests/decode/ folder belongs to scripts/decodetree.py, so it should be listed in the same section as the script. Signed-off-by: Thomas Huth Signed-off-by: Michael Tokarev --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PULL 04/27] qapi/pragma.json: Improve the comment about the lists of QAPI rule exceptions

2023-11-15 Thread Michael Tokarev
From: Thomas Huth Let's use more inclusive language here. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- qapi/pragma.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/pragma.json b/qapi/pragma.json index 7f810b0e97..0aa4e

[PULL 06/27] qapi/migration.json: spelling: transfering

2023-11-15 Thread Michael Tokarev
Fixes: 074dbce5fcce "migration: New migrate and migrate-incoming argument 'channels'" Signed-off-by: Michael Tokarev --- qapi/migration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/migration.json b/qapi/migration.json index 975761eebd..eb2f883513 100644 --- a/qap

RE: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-15 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, November 16, 2023 3:25 PM >Subject: Re: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing >a >file handle > Please add bare documentation:   /* Returns 0 on success, or a negative errno. */ >>>

Re: virtio-sound segmentation fault

2023-11-15 Thread Manos Pitsidianakis
On Wed, 15 Nov 2023 22:27, Volker Rümelin wrote: Cc: qemu-devel Hi Manos, it's easy to trigger a segmentation fault with the virtio-sound device. The basic problem is that in function virtio_snd_realize() there is no code in the errror paths to undo the previous steps. Thank you for the repo

Re: [PATCH v5 06/31] cpu: Add generic cpu_list()

2023-11-15 Thread Philippe Mathieu-Daudé
Hi Gavin, On 15/11/23 00:56, Gavin Shan wrote: Add generic cpu_list() to replace the individual target's implementation in the subsequent commits. Currently, there are 3 targets with no cpu_list() implementation: microblaze and nios2. With this applied, those two targets switch to the generic cp

Re: [PATCH-for-8.2] virtio-sound: add realize() error cleanup path

2023-11-15 Thread Manos Pitsidianakis
On Thu, 16 Nov 2023 09:32, Philippe Mathieu-Daudé wrote: --- Notes: Requires patch <20231109162034.2108018-1-manos.pitsidiana...@linaro.org> This is the 'Based-on: ' tag I guess. There is prerequisite-patch-id: 484ec9f7f6109c10d4be0484fe8e3c2550c415f4 At the end of the patch, added

Re: [PATCH-for-8.2] virtio-sound: add realize() error cleanup path

2023-11-15 Thread Philippe Mathieu-Daudé
Hi Manos, On 16/11/23 08:20, Manos Pitsidianakis wrote: QEMU crashes on exit when a virtio-sound device has failed to realise. Its vmstate field was not cleaned up properly with qemu_del_vm_change_state_handler(). This patch changes the realize() order as 1. Validate the given configuration va

Re: [PATCH 1/4] vfio/pci: Move VFIODevice initializations in vfio_instance_init

2023-11-15 Thread Cédric Le Goater
On 11/16/23 03:16, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Wednesday, November 15, 2023 9:12 PM Subject: Re: [PATCH 1/4] vfio/pci: Move VFIODevice initializations in vfio_instance_init On 11/15/23 09:32, Zhenzhong Duan wrote: Some of the VFIODevice ini

Re: [PATCH] tests/avocado/mem-addr-space-check: Replace assertEquals() for Python 3.12

2023-11-15 Thread Ani Sinha
> On 16-Nov-2023, at 11:49 AM, Thomas Huth wrote: > > assertEquals() has been removed in Python 3.12 and should be replaced by > assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 > > Signed-off-by: Thomas Huth Acked-by: Ani Sinha mailto:anisi...@redhat.com>> > --- > N

Re: [PATCH-for-8.2? 3/6] hw/arm/stm32f100: Report error when incorrect CPU is used

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 00:21, Philippe Mathieu-Daudé wrote: The 'stm32vldiscovery' machine ignores the CPU type requested by the command line. This might confuse users, since the following will create a machine with a Cortex-M3 CPU: $ qemu-system-aarch64 -M stm32vldiscovery -cpu neoverse-n1 Set the Mac

Re: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-15 Thread Cédric Le Goater
Please add bare documentation:   /* Returns 0 on success, or a negative errno. */ +int vfio_device_get_name(VFIODevice *vbasedev, Error **errp); Will do, I'd like to wait a few days to collect more suggested changes and RB, Then send all these updates to Cédric in once before he pushes this

Re: [PATCH-for-8.2? 1/6] hw/arm/stm32f405: Report error when incorrect CPU is used

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 00:21, Philippe Mathieu-Daudé wrote: Both 'netduinoplus2' and 'olimex-stm32-h405' machines ignore the CPU type requested by the command line. This might confuse users, since the following will create a machine with a Cortex-M4 CPU: $ qemu-system-aarch64 -M netduinoplus2 -cpu corte

[PATCH-for-8.2] virtio-sound: add realize() error cleanup path

2023-11-15 Thread Manos Pitsidianakis
QEMU crashes on exit when a virtio-sound device has failed to realise. Its vmstate field was not cleaned up properly with qemu_del_vm_change_state_handler(). This patch changes the realize() order as 1. Validate the given configuration values (no resources allocated by us either on success or

Re: [PATCH] tests/avocado/reverse_debugging: Disable the ppc64 tests by default

2023-11-15 Thread Nicholas Piggin
On Thu Nov 16, 2023 at 1:55 PM AEST, Ani Sinha wrote: > > > > On 16-Nov-2023, at 6:45 AM, Nicholas Piggin wrote: > > > > On Thu Nov 16, 2023 at 3:22 AM AEST, Daniel P. Berrangé wrote: > >> On Wed, Nov 15, 2023 at 01:14:53PM +, Daniel P. Berrangé wrote: > >>> On Wed, Nov 15, 2023 at 07:23:01AM

Re: [PATCH] tests/avocado/reverse_debugging: Disable the ppc64 tests by default

2023-11-15 Thread Thomas Huth
On 16/11/2023 02.15, Nicholas Piggin wrote: On Thu Nov 16, 2023 at 3:22 AM AEST, Daniel P. Berrangé wrote: On Wed, Nov 15, 2023 at 01:14:53PM +, Daniel P. Berrangé wrote: ... The Machine class doesn't know if anything will ever use the console, so as is the change is unsafe. The original

Re: [PATCH v5 02/31] target/hppa: Remove object_class_is_abstract()

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 00:55, Gavin Shan wrote: No need to check if @oc is abstract because it has been covered by cpu_class_by_name(). Since commit 3a9d0d7b64 ("hw/cpu: Call object_class_is_abstract() once in cpu_class_by_name()") ... Signed-off-by: Gavin Shan --- target/hppa/cpu.c | 1 - 1 file

Re: [PATCH 09/19] qapi/schema: assert info is present when necessary

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 02:43, John Snow wrote: QAPISchemaInfo is sometimes defined as an Optional field because built-in definitions don't *have* a source definition. As a consequence, there are a few places where we need to assert that it's present because the root entity definition only suggests it's "Opt

Re: [PATCH 06/19] qapi/schema: adjust type narrowing for mypy's benefit

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 02:43, John Snow wrote: We already take care to perform some type narrowing for arg_type and ret_type, but not in a way where mypy can utilize the result. A simple change to use a temporary variable helps the medicine go down. Signed-off-by: John Snow --- scripts/qapi/schema.py |

Re: [PATCH 05/19] qapi/schema: make c_type() and json_type() abstract methods

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 02:43, John Snow wrote: These methods should always return a str, it's only the default abstract implementation that doesn't. They can be marked "abstract" by raising NotImplementedError(), which requires subclasses to override the method with the proper return type. Signed-off-by: J

Re: [PATCH 01/19] qapi/schema: fix QAPISchemaEntity.__repr__()

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 02:43, John Snow wrote: This needs parentheses to work how you want it to: "%s-%s-%s" % 'a', 'b', 'c' Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string "%s-%s-%s" % ('a', 'b', 'c') 'a-b-c' Signed-off-by: John Snow ---

Re: [PATCH] tests/avocado/mem-addr-space-check: Replace assertEquals() for Python 3.12

2023-11-15 Thread Philippe Mathieu-Daudé
On 16/11/23 07:19, Thomas Huth wrote: assertEquals() has been removed in Python 3.12 and should be replaced by assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 Signed-off-by: Thomas Huth --- Note: The test has just been merged, that's why I missed this file in my earl

Re: [PATCH v5 01/31] target/alpha: Remove 'ev67' CPU class

2023-11-15 Thread Philippe Mathieu-Daudé
On 15/11/23 01:22, Richard Henderson wrote: On 11/14/23 15:55, Gavin Shan wrote: 'ev67' CPU class will be returned to match everything, which makes no sense as mentioned in the comments. Remove the logic to fall back to 'ev67' CPU class to match everything. Signed-off-by: Gavin Shan ---   targ

[PATCH v2] migration: free 'saddr' since be no longer used

2023-11-15 Thread Zongmin Zhou
Since socket_parse() will allocate memory for 'saddr',and its value will pass to 'addr' that allocated by migrate_uri_parse(), then 'saddr' will no longer used,need to free. But due to 'saddr->u' is shallow copying the contents of the union, the members of this union containing allocated strings,an

Re: [PATCH v3 14/70] target/i386: Implement mc->kvm_type() to get VM type

2023-11-15 Thread Xiaoyao Li
On 11/15/2023 6:49 PM, Daniel P. Berrangé wrote: On Wed, Nov 15, 2023 at 02:14:23AM -0500, Xiaoyao Li wrote: Implement mc->kvm_type() for i386 machines. It provides a way for user to create SW_PROTECTE_VM. Small typo there missing final 'D' in 'PROTECTED' Thanks for catching it. I find the

[PATCH] tests/avocado/mem-addr-space-check: Replace assertEquals() for Python 3.12

2023-11-15 Thread Thomas Huth
assertEquals() has been removed in Python 3.12 and should be replaced by assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 Signed-off-by: Thomas Huth --- Note: The test has just been merged, that's why I missed this file in my earlier patch that replaces the assertEquals()

Re: [PATCH-for-8.2? v2] tests/avocado: Make fetch_asset() unconditionally require a crypto hash

2023-11-15 Thread Thomas Huth
On 15/11/2023 21.51, Philippe Mathieu-Daudé wrote: In a perfect world we'd have reproducible tests, but then we'd be sure we run the same binaries. If a binary artifact isn't hashed, we have no idea what we are running. Therefore enforce hashing for all our artifacts. With this change, unhashed

Re: [PATCH v2] tests/acpi/bios-tables-test: do not write new blobs unless there are changes

2023-11-15 Thread Ani Sinha
> On 07-Nov-2023, at 10:19 AM, Ani Sinha wrote: > > When dumping table blobs using rebuild-expected-aml.sh, table blobs from all > test variants are dumped regardless of whether there are any actual changes to > the tables or not. This creates lot of new files for various test variants > that

Re: [PATCH v3 10/70] kvm: handle KVM_EXIT_MEMORY_FAULT

2023-11-15 Thread Xiaoyao Li
On 11/15/2023 6:42 PM, Daniel P. Berrangé wrote: On Wed, Nov 15, 2023 at 02:14:19AM -0500, Xiaoyao Li wrote: From: Chao Peng Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in flags is valid when KVM_EXIT_MEMORY_FAULT happens. It indicates userspace needs to do the memory conversion on the RAMBloc

Re: [PATCH v6 11/21] virtio-net: Return an error when vhost cannot enable RSS

2023-11-15 Thread Jason Wang
On Wed, Nov 15, 2023 at 2:09 PM Akihiko Odaki wrote: > > > > On 2023/11/15 7:09, Yuri Benditovich wrote: > > > > > > On Tue, Nov 14, 2023 at 9:03 AM Akihiko Odaki > > wrote: > > > > On 2023/11/14 2:26, Yuri Benditovich wrote: > > > > > > > > > O

RE: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-15 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Wednesday, November 15, 2023 8:53 PM >Subject: Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object > >Hi Zhenzhong, > >On 11/14/23 11:09, Zhenzhong Duan wrote: >> From: Eric Auger >> >> Introduce an iommufd object whic

Re: [PATCH] tests/avocado/reverse_debugging: Disable the ppc64 tests by default

2023-11-15 Thread Ani Sinha
> On 16-Nov-2023, at 6:45 AM, Nicholas Piggin wrote: > > On Thu Nov 16, 2023 at 3:22 AM AEST, Daniel P. Berrangé wrote: >> On Wed, Nov 15, 2023 at 01:14:53PM +, Daniel P. Berrangé wrote: >>> On Wed, Nov 15, 2023 at 07:23:01AM +0100, Thomas Huth wrote: On 15/11/2023 02.15, Nicholas Pig

Re: [PATCH] tests/avocado/reverse_debugging: Disable the ppc64 tests by default

2023-11-15 Thread Ani Sinha
> On 15-Nov-2023, at 10:52 PM, Daniel P. Berrangé wrote: > > On Wed, Nov 15, 2023 at 01:14:53PM +, Daniel P. Berrangé wrote: >> On Wed, Nov 15, 2023 at 07:23:01AM +0100, Thomas Huth wrote: >>> On 15/11/2023 02.15, Nicholas Piggin wrote: On Wed Nov 15, 2023 at 4:29 AM AEST, Thomas Huth

Re: [PATCH v3 06/70] kvm: Introduce support for memory_attributes

2023-11-15 Thread Xiaoyao Li
On 11/15/2023 6:38 PM, Daniel P. Berrangé wrote: On Wed, Nov 15, 2023 at 02:14:15AM -0500, Xiaoyao Li wrote: Introduce the helper functions to set the attributes of a range of memory to private or shared. This is necessary to notify KVM the private/shared attribute of each gpa range. KVM needs

Re: [PATCH v3 02/70] RAMBlock: Add support of KVM private guest memfd

2023-11-15 Thread Xiaoyao Li
On 11/15/2023 6:20 PM, Daniel P. Berrangé wrote: On Wed, Nov 15, 2023 at 02:14:11AM -0500, Xiaoyao Li wrote: Add KVM guest_memfd support to RAMBlock so both normal hva based memory and kvm guest memfd based private memory can be associated in one RAMBlock. Introduce new flag RAM_GUEST_MEMFD. Wh

Re: [PATCH v3 07/70] physmem: Relax the alignment check of host_startaddr in ram_block_discard_range()

2023-11-15 Thread Xiaoyao Li
On 11/16/2023 2:20 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Commit d3a5038c461 ("exec: ram_block_discard_range") introduced ram_block_discard_range() which grabs some code from ram_discard_range(). However, during code movement, it changed alignment check of host_startad

Re: [PATCH v3 04/70] HostMem: Add mechanism to opt in kvm guest memfd via MachineState

2023-11-15 Thread Xiaoyao Li
On 11/16/2023 2:14 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Add a new member "require_guest_memfd" to memory backends. When it's set to true, it enables RAM_GUEST_MEMFD in ram_flags, thus private kvm guest_memfd will be allocated during RAMBlock allocation. Memory backe

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-15 Thread Xiaoyao Li
On 11/16/2023 2:10 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: KVM allows KVM_GUEST_MEMFD_ALLOW_HUGEPAGE for guest memfd. When the flag is set, KVM tries to allocate memory with transparent hugeapge at first and falls back to non-hugepage on failure. However, KVM defines o

Re: [PATCH v3 02/70] RAMBlock: Add support of KVM private guest memfd

2023-11-15 Thread Xiaoyao Li
On 11/16/2023 1:54 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Add KVM guest_memfd support to RAMBlock so both normal hva based memory and kvm guest memfd based private memory can be associated in one RAMBlock. Introduce new flag RAM_GUEST_MEMFD. When it's set, it calls

RE: [PATCH 1/4] vfio/pci: Move VFIODevice initializations in vfio_instance_init

2023-11-15 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Wednesday, November 15, 2023 9:12 PM >Subject: Re: [PATCH 1/4] vfio/pci: Move VFIODevice initializations in >vfio_instance_init > >On 11/15/23 09:32, Zhenzhong Duan wrote: >> Some of the VFIODevice initializations is in vfio_realize, >>

RE: [PATCH] tests/qtest: remove unused variables

2023-11-15 Thread Zhang, Chen
> -Original Message- > From: qemu-devel-bounces+chen.zhang=intel@nongnu.org devel-bounces+chen.zhang=intel@nongnu.org> On Behalf Of zhujun2 > Sent: Wednesday, November 15, 2023 4:00 PM > To: th...@redhat.com > Cc: lviv...@redhat.com; pbonz...@redhat.com; qemu-devel@nongnu.org; >

RE: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing a file handle

2023-11-15 Thread Duan, Zhenzhong
Hi Philippe, >-Original Message- >From: Cédric Le Goater >Sent: Wednesday, November 15, 2023 9:05 PM >Subject: Re: [PATCH v6 11/21] vfio/pci: Make vfio cdev pre-openable by passing >a >file handle > >On 11/15/23 13:09, Philippe Mathieu-Daudé wrote: >> Hi Zhenzhong, >> >> On 14/11/23 11:0

[PATCH 09/19] qapi/schema: assert info is present when necessary

2023-11-15 Thread John Snow
QAPISchemaInfo is sometimes defined as an Optional field because built-in definitions don't *have* a source definition. As a consequence, there are a few places where we need to assert that it's present because the root entity definition only suggests it's "Optional". Signed-off-by: John Snow ---

[PATCH 10/19] qapi/schema: make QAPISchemaArrayType.element_type non-Optional

2023-11-15 Thread John Snow
This field should always be present and defined. Change this to be a runtime @property that can emit an error if it's called prior to check(). This helps simplify typing by avoiding the need to interrogate the value for None at multiple callsites. RFC: Yes, this is a slightly different technique

[PATCH 05/19] qapi/schema: make c_type() and json_type() abstract methods

2023-11-15 Thread John Snow
These methods should always return a str, it's only the default abstract implementation that doesn't. They can be marked "abstract" by raising NotImplementedError(), which requires subclasses to override the method with the proper return type. Signed-off-by: John Snow --- scripts/qapi/schema.py

[PATCH 16/19] qapi/schema: add type hints

2023-11-15 Thread John Snow
This patch only adds type hints, which aren't utilized at runtime and don't change the behavior of this module in any way. In a scant few locations, type hints are removed where no longer necessary due to inference power from typing all of the rest of creation; and any type hints that no longer ne

[PATCH 06/19] qapi/schema: adjust type narrowing for mypy's benefit

2023-11-15 Thread John Snow
We already take care to perform some type narrowing for arg_type and ret_type, but not in a way where mypy can utilize the result. A simple change to use a temporary variable helps the medicine go down. Signed-off-by: John Snow --- scripts/qapi/schema.py | 17 + 1 file changed, 9

[PATCH 14/19] qapi/schema: assert QAPISchemaVariants are QAPISchemaObjectType

2023-11-15 Thread John Snow
I'm actually not too sure about this one, it seems to hold up at runtime but instead of lying and coming up with an elaborate ruse as a commit message I'm just going to admit I just cribbed my own notes from the last time I typed schema.py and I no longer remember why or if this is correct. Cool!

[PATCH 08/19] qapi/schema: add static typing and assertions to lookup_type()

2023-11-15 Thread John Snow
This function is a bit hard to type as-is; mypy needs some assertions to assist with the type narrowing. Signed-off-by: John Snow --- scripts/qapi/schema.py | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index a10942838

[PATCH 04/19] qapi/schema: declare type for QAPISchemaObjectTypeMember.type

2023-11-15 Thread John Snow
declare, but don't initialize the type of "type" to be QAPISchemaType - and allow the value to be initialized during check(). This avoids the need for several "assert type is not None" statements littered throughout the code by asserting it "will always be set." It's a little hokey, but it works

[PATCH 07/19] qapi/introspect: assert schema.lookup_type did not fail

2023-11-15 Thread John Snow
lookup_type() is capable of returning None, but introspect.py isn't prepared for that. (And rightly so, if these built-in types are absent, something has gone hugely wrong.) RFC: This is slightly cumbersome as-is, but a patch at the end of this series tries to address it with some slightly slicker

[PATCH 01/19] qapi/schema: fix QAPISchemaEntity.__repr__()

2023-11-15 Thread John Snow
This needs parentheses to work how you want it to: >>> "%s-%s-%s" % 'a', 'b', 'c' Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string >>> "%s-%s-%s" % ('a', 'b', 'c') 'a-b-c' Signed-off-by: John Snow --- scripts/qapi/schema.py | 2 +- 1 f

[PATCH 11/19] qapi/schema: fix QAPISchemaArrayType.check's call to resolve_type

2023-11-15 Thread John Snow
There's more conditionals in here than we can reasonably pack into a terse little statement, so break it apart into something more explicit. (When would a built-in array ever cause a QAPISemError? I don't know, maybe never - but the type system wasn't happy all the same.) Signed-off-by: John Snow

[PATCH 13/19] qapi/schema: fix typing for QAPISchemaVariants.tag_member

2023-11-15 Thread John Snow
There are two related changes here: (1) We need to perform type narrowing for resolving the type of tag_member during check(), and (2) tag_member is a delayed initialization field, but we can hide it behind a property that raises an Exception if it's called too early. This simplifies

[PATCH 15/19] qapi/parser: demote QAPIExpression to Dict[str, Any]

2023-11-15 Thread John Snow
Dict[str, object] is a stricter type, but with the way that code is currently arranged, it is infeasible to enforce this strictness. In particular, although expr.py's entire raison d'être is normalization and type-checking of QAPI Expressions, that type information is not "remembered" in any meani

[PATCH 02/19] qapi/schema: add pylint suppressions

2023-11-15 Thread John Snow
With this, pylint is happy with the file, so enable it in the configuration. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 5 - scripts/qapi/schema.py | 4 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index 90546df5

[PATCH 00/19] qapi: statically type schema.py

2023-11-15 Thread John Snow
Hi! This branch has some comical name like python-qapi-cleanup-pt6-v2 but, simply, it finishes what I started and statically types all of the QAPI generator code. GitLab CI: https://gitlab.com/jsnow/qemu/-/pipelines/1074124051 Patch 1 is an actual fix, Patch 2 is a minor patch for pylint with no

[PATCH 19/19] qapi/schema: refactor entity lookup helpers

2023-11-15 Thread John Snow
This is not a clear win, but I was confused and I couldn't help myself. Before: lookup_entity(self, name: str, typ: Optional[type] = None ) -> Optional[QAPISchemaEntity]: ... lookup_type(self, name: str) -> Optional[QAPISchemaType]: ... resolve_type(self, name: str, info: Optional

[PATCH 17/19] qapi/schema: turn on mypy strictness

2023-11-15 Thread John Snow
This patch can be rolled in with the previous one once the series is ready for merge, but for work-in-progress' sake, it's separate here. Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index

[PATCH 18/19] qapi/schema: remove unnecessary asserts

2023-11-15 Thread John Snow
With strict typing enabled, these runtime statements aren't necessary anymore. Signed-off-by: John Snow --- scripts/qapi/schema.py | 23 --- 1 file changed, 23 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index 5d19b59def0..b5f377e68b8 100644 ---

[PATCH 03/19] qapi/schema: name QAPISchemaInclude entities

2023-11-15 Thread John Snow
It simplifies typing to mandate that entities will always have a name; to achieve this we can occasionally assign an internal name. This alleviates errors such as: qapi/schema.py:287: error: Argument 1 to "__init__" of "QAPISchemaEntity" has incompatible type "None"; expected "str" [arg-type] Try

[PATCH 12/19] qapi/schema: split "checked" field into "checking" and "checked"

2023-11-15 Thread John Snow
Differentiate between "actively in the process of checking" and "checking has completed". This allows us to clean up the types of some internal fields such as QAPISchemaObjectType's members field which currently uses "None" as a canary for determining if check has completed. This simplifies the ty

  1   2   3   >