[PULL 08/26] fuzz: Correct invalid mentions of 'softmmu' by 'system'

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Bulekov Message-ID: <20231004090629.37473-5-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- softmmu/memory.c| 2 +- tests/qtest/fuzz/fuzz.c | 2 +- tests/qtest/fuzz/fuzz.h | 4 ++-- 3 files c

[PULL 20/26] audio: error hints need a trailing \n

2023-10-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- audio/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 730bf2498dc..98621576d95 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1833,7 +1833,7 @@ bool AUD_register_card (const char *name, QEMUSoundC

[PULL 10/26] accel: Rename accel_softmmu* -> accel_system*

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Rename accel.softmmu -> accel.system in file paths and the register_types() method. Rename sysemu_stubs_ss -> system_stubs_ss in meson following the pattern used on other source set names. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-7-ph

[PULL 14/26] hw/virtio/meson: Rename softmmu_virtio_ss -> system_virtio_ss

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé See commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss") for rationale. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-11-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- hw/virtio/meson.build | 22 +++--- 1 file

[PULL 12/26] semihosting: Rename softmmu_FOO_user() -> uaccess_FOO_user()

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Add a check in 'softmmu-uaccess.h' that the header is only include in system emulation, and rename it as 'uaccess.h'. Rename the API methods: - softmmu_[un]lock_user*() -> uaccess_[un]lock_user*() - softmmu_strlen_user() -> uaccess_strlen_user(). Update a pair

[PULL 06/26] travis-ci: Correct invalid mentions of 'softmmu' by 'system'

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-3-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b958eca5de1..76859d48da

[PULL 16/26] meson: Rename target_softmmu_arch -> target_system_arch

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Finish the convertion started with commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss"). If the $target_type is 'system', then use the target_system_arch[] source set :) Mechanical change doing: $ sed -i -e s/target_softmmu_arch/target_system_arch/g \

[PULL 26/26] audio, qtest: get rid of QEMU_AUDIO_DRV

2023-10-06 Thread Paolo Bonzini
Default audio devices can now be created with "-audio". Tests for soundcards were already using "-audiodev" if they want to specify a particular backend, for the others remove the last remnants of legacy audio configuration. Signed-off-by: Paolo Bonzini --- audio/audio.c | 12 -

[PULL 07/26] cpu: Correct invalid mentions of 'softmmu' by 'system-mode'

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-4-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- cpu.c| 2 +- hw/core/cpu-common.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu.c b/cpu.c in

[PULL 25/26] audio: reintroduce default audio backend for VNC

2023-10-06 Thread Paolo Bonzini
Make VNC use the default backend again if one is defined. The recently introduced support for disabling the VNC audio extension is still used, in case no default backend exists. Signed-off-by: Paolo Bonzini --- audio/audio.c | 28 ++-- audio/audio.h

[PULL 21/26] audio: disable default backends if -audio/-audiodev is used

2023-10-06 Thread Paolo Bonzini
Match what is done for other options, for example -monitor, and also the behavior of QEMU 8.1 (see the "legacy_config" variable). Require the user to specify a backend if one is specified on the command line. Signed-off-by: Paolo Bonzini --- audio/audio.c | 9 + audio/

[PULL 03/26] util/log: re-allow switching away from stderr log file

2023-10-06 Thread Paolo Bonzini
From: Fiona Ebner Commit 59bde21374 ("util/log: do not close and reopen log files when flags are turned off") prevented switching away from stderr on a subsequent invocation of qemu_set_log_internal(). This prevented switching away from stderr with the 'logfile' monitor command as well as an invo

[PULL 05/26] softmmu/trace-events: Fix a typo

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Commit 8af3f5c6d6 ("softmmu: add trace point when bdrv_flush_all fails") added calls to trace_vm_stop_flush_all() in 'cpus.c'. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-2-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- softmmu/tra

[PULL 13/26] target/i386: Rename i386_softmmu_kvm_ss -> i386_kvm_ss

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Software MMU is TCG specific. Here 'softmmu' is misused for system emulation. Anyhow, since KVM is system emulation specific, just rename as 'i386_kvm_ss'. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-10-phi...@linaro.org> Signed-off-by: P

[PULL 18/26] configure: change $softmmu to $system

2023-10-06 Thread Paolo Bonzini
"softmmu" is a deprecated moniker, do the easy change matching the variable to the command line option. Signed-off-by: Paolo Bonzini --- configure | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index e08127045d0..97a5e8de491 100755 --- a/conf

[PULL 17/26] system: Rename softmmu/ directory as system/

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The softmmu/ directory contains files specific to system emulation. Rename it as system/. Update meson rules, the MAINTAINERS file and all the documentation and comments. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-14-phi...@linaro.org> S

[PULL 24/26] audio: do not use first -audiodev as default audio device

2023-10-06 Thread Paolo Bonzini
It is now possible to specify the options for the default audio device using -audio, so there is no need anymore to use a fake -audiodev option. Remove the fall back to QTAILQ_FIRST(&audio_states), instead remember the AudioState that was created from default_audiodevs and use that one. Signed-of

[PULL 09/26] tcg: Correct invalid mentions of 'softmmu' by 'system-mode'

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-6-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- accel/tcg/user-exec.c | 2 +- docs/devel/testing.rst | 2 +- include/qemu/atomic128.h

[PULL 23/26] audio: extend -audio to allow creating a default backend

2023-10-06 Thread Paolo Bonzini
If "-audio BACKEND" is used without a model, the resulting backend will be used whenever the audiodev property is not specified. Signed-off-by: Paolo Bonzini --- audio/audio.c | 2 +- qemu-options.hx | 29 + system/vl.c | 27 +++ 3 files

[PULL 15/26] meson: Rename softmmu_mods -> system_mods

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé See commit de6cd7599b ("meson: Replace softmmu_ss -> system_ss") for rationale. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-12-phi...@linaro.org> Signed-off-by: Paolo Bonzini --- meson.build | 10 +- 1 file changed, 5 insertions

[PULL 11/26] gdbstub: Rename 'softmmu' -> 'system'

2023-10-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé We have gdbstub/user.c for user emulation code, use gdbstub/system.c for system emulation part. Rename s/softmmu/system/ in meson and few comments. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20231004090629.37473-8-phi...@linaro.org> Signed-off-by: Paolo Bon

Re: [PATCH] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow

2023-10-06 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 01:45:51PM +0300, Michael Tokarev wrote: > 06.10.2023 11:55, Markus Armbruster пишет: > > Michael Tokarev writes: > > > > > Applied to my trivial-patches tree, thanks! > > > > > > Marcus, you picked up previous patches of this theme, -- > > > you can continue this traditi

[PULL 26/32] target/ppc: Clean up local variable shadowing in kvm_arch_*_registers()

2023-10-06 Thread Markus Armbruster
From: Cédric Le Goater Remove extra 'i' variable to fix this warning : ../target/ppc/kvm.c: In function ‘kvm_arch_put_registers’: ../target/ppc/kvm.c:963:13: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 963 | int i; | ^ .

[PULL 00/32] -Wshadow=local patches patches for 2023-10-06

2023-10-06 Thread Markus Armbruster
The following changes since commit 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-10-05 09:01:01 -0400) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-shadow-2023

[PULL 32/32] linux-user/syscall.c: clean up local variable shadowing in xattr syscalls

2023-10-06 Thread Markus Armbruster
From: Laurent Vivier p is a generic variable in syscall() and can be used by any syscall case, so this patch removes the useless local variable declaration for the following syscalls: TARGET_NR_llistxattr, TARGET_NR_listxattr, TARGET_NR_setxattr, TARGET_NR_lsetxattr, TARGET_NR_getxattr, TARGET_NR

[PULL 16/32] qemu-io: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: qemu-io.c:478:36: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void add_user_command(char *optarg) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/getopt.h:77:1

[PULL 06/32] hw/net/vhost_net: Silence compiler warning when compiling with -Wshadow

2023-10-06 Thread Markus Armbruster
From: Thomas Huth Rename the innermost local variables to avoid compiler warnings with "-Wshadow". Signed-off-by: Thomas Huth Message-ID: <20231004084939.96349-1-th...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Markus Armbruster --- hw/net/vhost_net.c | 8 1 file cha

[PULL 24/32] sysemu/tpm: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: softmmu/tpm.c:178:59: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] int tpm_config_parse(QemuOptsList *opts_list, const char *optarg) ^ /Library/Developer/CommandL

[PULL 19/32] ui/cocoa: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: ui/cocoa.m:346:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QemuCocoaView *cocoaView = userInfo; ^ ui/cocoa.m:342:16: note: previous declaration is here QemuCocoaView *cocoaView;

Re: [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow

2023-10-06 Thread Markus Armbruster
Queued. Thanks!

[PULL 12/32] net/net: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: net/net.c:1680:35: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool netdev_is_modern(const char *optarg) ^ net/net.c:1714:38: error: declaration shadows a variable in the global scope [

[PULL 10/32] hw/audio/soundhw: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: hw/audio/soundhw.c:86:33: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] void select_soundhw(const char *optarg, const char *audiodev) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/u

[PULL 20/32] util/cutils: Clean up global variable shadowing in get_relocated_path()

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: util/cutils.c:1147:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const char *exec_dir = qemu_get_exec_dir(); ^ util/cutils.c:1035:20: note: previous declaration is here static const char *exec_dir

[PULL 29/32] linux-user/mmap.c: clean up local variable shadowing

2023-10-06 Thread Markus Armbruster
From: Laurent Vivier Fix following warnings: .../linux-user/mmap.c: In function 'target_mremap': .../linux-user/mmap.c:913:13: warning: declaration of 'prot' shadows a previous local [-Wshadow=compatible-local] 913 | int prot = 0; | ^~~~ ../../../Projects/qemu/linux-

Re: [PATCH v2] pc-bios/meson.build: Silent unuseful DTC warnings

2023-10-06 Thread BALATON Zoltan
On Fri, 6 Oct 2023, Philippe Mathieu-Daudé wrote: On 6/10/23 10:32, Cédric Le Goater wrote: On 10/6/23 10:18, Philippe Mathieu-Daudé wrote: On 6/10/23 10:13, Cédric Le Goater wrote: On 10/6/23 08:47, Philippe Mathieu-Daudé wrote: QEMU consumes some device tree blobs, so these have been commit

[PULL 18/32] semihosting: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: semihosting/config.c:134:49: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] int qemu_semihosting_config_options(const char *optarg) ^ /Library/Developer/CommandLineTools/SDKs

Re: [PATCH] target/riscv: pmp: Clear pmp/smepmp bits on reset

2023-10-06 Thread Vladimir Isaev
Hi Mayuresh, 25.09.2023 14:09, Mayuresh Chitale wrote: > As per the Priv and Smepmp specifications, certain bits such as the 'L' > bit of pmp entries and mseccfg.MML can only be cleared upon reset and it > is necessary to do so to allow 'M' mode firmware to correctly reinitialize > the pmp/smpemp

Re: [PATCH v2] pc-bios/meson.build: Silent unuseful DTC warnings

2023-10-06 Thread BALATON Zoltan
On Fri, 6 Oct 2023, Philippe Mathieu-Daudé wrote: QEMU consumes some device tree blobs, so these have been committed to the tree in as firmware, along with the device tree source used to generate them. We know the blobs are "good enough" to have QEMU boot a system, so we don't really maintain and

[PULL 21/32] util/guest-random: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: util/guest-random.c:90:45: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] int qemu_guest_random_seed_main(const char *optarg, Error **errp) ^ /Library/Developer/CommandLineTools/

[PULL 05/32] audio/ossaudio: Fix compiler warning with -Wshadow

2023-10-06 Thread Markus Armbruster
From: Thomas Huth The "err" variable is only used twice in this code, in a very local fashion of first assigning it and then checking it in the next line. So there is no need to declare this variable a second time in the innermost block, we can re-use the variable that is declared at the beginnin

[PULL 03/32] target/ppc: Rename variables to avoid local variable shadowing in VUPKPX

2023-10-06 Thread Markus Armbruster
From: Cédric Le Goater and fix such warnings : ../target/ppc/int_helper.c: In function ‘helper_vupklpx’: ../target/ppc/int_helper.c:2025:21: warning: declaration of ‘r’ shadows a parameter [-Wshadow=local] 2025 | uint8_t r = (e >> 10) & 0x1f; \

[PULL 01/32] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-10-06 Thread Markus Armbruster
From: Jonathan Cameron Rename the version not burried in the macro to cap_h. Signed-off-by: Jonathan Cameron Message-ID: <20230925152258.5444-1-jonathan.came...@huawei.com> Reviewed-by: Michael S. Tsirkin Reviewed-by: Fan Ni Signed-off-by: Markus Armbruster --- hw/cxl/cxl-device-utils.c | 8

Re: [PATCH 4/5] migration: Provide QMP access to downtime stats

2023-10-06 Thread Joao Martins
On 04/10/2023 18:10, Peter Xu wrote: > Hi, Joao, > > On Tue, Sep 26, 2023 at 05:18:40PM +0100, Joao Martins wrote: >> Deliver the downtime breakdown also via `query-migrate` >> to allow users to understand what their downtime value >> represents. > > I agree downtime is an area we definitely need

[PULL 07/32] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow

2023-10-06 Thread Markus Armbruster
From: Thomas Huth "len" is used as parameter of the functions virtio_write_config() and virtio_read_config(), and additionally as a local variable, so this causes a compiler warning when compiling with "-Wshadow" and can be confusing for the reader. Rename the local variables to "caplen" to avoid

[PULL 02/32] target/loongarch: Clean up local variable shadowing

2023-10-06 Thread Markus Armbruster
From: Song Gao Fix: [1839/2601] Compiling C object libqemu-loongarch64-softmmu.fa.p/hw_loongarch_virt.c.o ../hw/loongarch/virt.c: In function 'loongarch_irq_init': ../hw/loongarch/virt.c:665:14: warning: declaration of 'i' shadows a previous local [-Wshadow=compatible-local] for (

[PULL 14/32] plugins/loader: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: include/qemu/plugin.h:245:54: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static inline void qemu_plugin_opt_parse(const char *optarg, ^ /Library/Developer/CommandLin

[PULL 09/32] dump: Silence compiler warning in dump code when compiling with -Wshadow

2023-10-06 Thread Markus Armbruster
From: Thomas Huth Rename a variable to make this code compilable with -Wshadow. Signed-off-by: Thomas Huth Message-ID: <20231004131338.215081-1-th...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-By: Michael Tokarev Signed-off-by: Markus Armbruster --- dump/dump.c | 8 1

[PULL 31/32] linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu

2023-10-06 Thread Markus Armbruster
From: Laurent Vivier Fix following warnings: .../linux-user/syscall.c: In function 'do_syscall1': .../linux-user/syscall.c:11180:22: warning: declaration of 'cpu' shadows a previous local [-Wshadow=local] 11180 | unsigned cpu, node; | ^~~ .../linux-user/sy

[PULL 17/32] qom/object_interfaces: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: qom/object_interfaces.c:262:53: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] ObjectOptions *user_creatable_parse_str(const char *optarg, Error **errp) ^ qom/object_inter

[PULL 23/32] softmmu/vl: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: softmmu/vl.c:1069:44: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void parse_display_qapi(const char *optarg) ^ softmmu/vl.c:1224:39: error: declaration shadows a variabl

[PULL 22/32] semihosting/arm-compat: Clean up local variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: semihosting/arm-compat-semi.c: In function ‘do_common_semihosting’: semihosting/arm-compat-semi.c:379:13: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=local] 379 | int ret, err = 0; | ^~~ semihosting/arm

[PULL 08/32] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow

2023-10-06 Thread Markus Armbruster
From: Thomas Huth Rename a variable in vhost_dev_sync_region() and remove a superfluous declaration in vhost_commit() to make this code compilable with "-Wshadow". Signed-off-by: Thomas Huth Message-ID: <20231004114809.105672-1-th...@redhat.com> Reviewed-by: Michael S. Tsirkin Reviewed-By: Mic

Re: [Virtio-fs] (no subject)

2023-10-06 Thread Hanna Czenczek
On 06.10.23 12:34, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 11:47:55AM +0200, Hanna Czenczek wrote: On 06.10.23 11:26, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 11:15:55AM +0200, Hanna Czenczek wrote: On 06.10.23 10:45, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 09:48:

[PULL 15/32] qemu-img: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: qemu-img.c:247:46: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static bool is_valid_option_list(const char *optarg) ^ qemu-img.c:265:53: error: declaration shadows a variable

[PULL 04/32] hw/i386: changes towards enabling -Wshadow=local for x86 machines

2023-10-06 Thread Markus Armbruster
From: Ani Sinha Code changes that addresses all compiler complaints coming from enabling -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing other local variables or parameters. These makes the code confusing and/or adds bugs that are difficult to catch. See also Sub

[PULL 25/32] trace/control: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: trace/control.c:288:34: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] void trace_opt_parse(const char *optarg) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/getopt.h:77

[PULL 28/32] linux-user/flatload: clean up local variable shadowing

2023-10-06 Thread Markus Armbruster
From: Laurent Vivier Fix following warnings: .../linux-user/flatload.c: In function 'load_flt_binary': .../linux-user/flatload.c:758:23: warning: declaration of 'p' shadows a previous local [-Wshadow=compatible-local] 758 | abi_ulong p; | ^ ../../../Pro

Re: [PATCH] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow

2023-10-06 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Fri, Oct 06, 2023 at 01:45:51PM +0300, Michael Tokarev wrote: >> 06.10.2023 11:55, Markus Armbruster пишет: >> > Michael Tokarev writes: >> > >> > > Applied to my trivial-patches tree, thanks! >> > > >> > > Marcus, you picked up previous patches of this theme,

[PULL 27/32] hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow

2023-10-06 Thread Markus Armbruster
From: Thomas Huth Rename variables or remove nested definitions where it makes sense, so that we can finally compile the USB code with "-Wshadow", too. Signed-off-by: Thomas Huth Message-ID: <20231004130822.113343-1-th...@redhat.com> Reviewed-by: Michael Tokarev Signed-off-by: Markus Armbruste

Re: [PULL 00/21] vfio queue

2023-10-06 Thread Eric Auger
rt/kvm/mst/qemu into staging >> (2023-10-05 09:01:01 -0400) >> >> are available in the Git repository at: >> >>    https://github.com/legoater/qemu/ tags/pull-vfio-20231006 >> >> for you to fetch changes up to 6e86aaef9ac57066aa923211a164df95b7b3cdf7: >>

Re: [PATCH 0/5] migration: Downtime observability improvements

2023-10-06 Thread Joao Martins
On 04/10/2023 18:19, Peter Xu wrote: > On Tue, Sep 26, 2023 at 05:18:36PM +0100, Joao Martins wrote: >> For now, mainly precopy data, and here I added both tracepoints and >> QMP stats via query-migrate. Postcopy is still missing. > > IIUC many of those will cover postcopy too, but not all? > > I

[PULL 30/32] linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm()

2023-10-06 Thread Markus Armbruster
From: Laurent Vivier Fix following warnings: .../linux-user/syscall.c: In function 'do_ioctl_dm': .../linux-user/syscall.c:5053:23: warning: declaration of 'arg_type' shadows a previous local [-Wshadow=local] 5053 | const argtype arg_type[] = { MK_STRUCT(STRUCT_dm_target_spec) };

[PULL 11/32] hw/ide/ahci: Clean up local variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: hw/ide/ahci.c:1577:23: error: declaration shadows a local variable [-Werror,-Wshadow] IDEState *s = &ad->port.ifs[j]; ^ hw/ide/ahci.c:1569:29: note: previous declaration is here void ahci_uninit(AHCIState *s)

[PULL 13/32] os-posix: Clean up global variable shadowing

2023-10-06 Thread Markus Armbruster
From: Philippe Mathieu-Daudé Fix: os-posix.c:103:31: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool os_set_runas(const char *optarg) ^ os-posix.c:176:32: error: declaration shadows a variable in the global scope [-Werror,

Re: [PATCH 5/5] migration: Print expected-downtime on completion

2023-10-06 Thread Joao Martins
On 04/10/2023 20:33, Peter Xu wrote: > On Tue, Sep 26, 2023 at 05:18:41PM +0100, Joao Martins wrote: >> Right now, migration statistics either print downtime or expected >> downtime depending on migration completing of in progress. Also in the >> beginning of migration by printing the downtime l

Re: [PULL 00/21] vfio queue

2023-10-06 Thread Eric Auger
t;>>    Merge tag 'for_upstream' of >>> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging >>> (2023-10-05 09:01:01 -0400) >>> >>> are available in the Git repository at: >>> >>>    https://github.com/legoater/qemu/ tags/pull-vf

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-06 Thread Shunsuke Mie
On 2023/10/05 16:02, Mattias Nissler wrote: On Thu, Oct 5, 2023 at 3:31 AM Shunsuke Mie wrote: Hi Jiri, Mattias and all. 2023年10月4日(水) 16:36 Mattias Nissler : hi shunsuke, all, what about vfio-user + qemu? Thank you for the suggestion. FWIW, I have had some good success using VFIO-user t

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-06 Thread Mattias Nissler
On Fri, Oct 6, 2023 at 1:51 PM Shunsuke Mie wrote: > > > On 2023/10/05 16:02, Mattias Nissler wrote: > > On Thu, Oct 5, 2023 at 3:31 AM Shunsuke Mie wrote: > >> Hi Jiri, Mattias and all. > >> > >> 2023年10月4日(水) 16:36 Mattias Nissler : > hi shunsuke, all, > what about vfio-user + qemu? >

RE: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-06 Thread Thanos Makatos
> -Original Message- > From: Shunsuke Mie > Sent: Friday, October 6, 2023 12:51 PM > To: Mattias Nissler > Cc: cz172...@gmail.com; bhelg...@google.com; Jagannathan Raman > ; kis...@kernel.org; kvija...@amd.com; > k...@linux.com; le...@movementarian.org; linux-ker...@vger.kernel.org; linux

[PATCH] libvduse: Fix compiler warning with -Wshadow=local

2023-10-06 Thread Thomas Huth
No need to declare a new variable with the same name here, we can simple re-use the one from the top of the function. With this change, the file now compiles fine with -Wshadow=local. Signed-off-by: Thomas Huth --- subprojects/libvduse/libvduse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device

2023-10-06 Thread Jonathan Cameron via
On Thu, 5 Oct 2023 12:32:11 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 05, 2023 at 09:11:15AM -0700, Dave Jiang wrote: > > > > > > On 10/4/23 20:36, Michael S. Tsirkin wrote: > > > > > > On Wed, Oct 04, 2023 at 04:09:07PM -0700, Dave Jiang wrote: > > >> Add a simple _DSM call support

[PATCH] libvhost-user: Fix compiler warning with -Wshadow=local

2023-10-06 Thread Thomas Huth
Rename shadowing variables to make this code compilable with -Wshadow=local. Signed-off-by: Thomas Huth --- subprojects/libvhost-user/libvhost-user.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost

Re: deadlock when using iothread during backup_clean()

2023-10-06 Thread Fiona Ebner
Am 04.10.23 um 19:08 schrieb Vladimir Sementsov-Ogievskiy: > On 28.09.23 11:06, Fiona Ebner wrote: >> For fixing the backup cancel deadlock, I tried the following: >> >>> diff --git a/blockjob.c b/blockjob.c >>> index 58c5d64539..fd6132ebfe 100644 >>> --- a/blockjob.c >>> +++ b/blockjob.c >>> @@ -1

Re: [PULL 00/21] vfio queue

2023-10-06 Thread Eric Auger
it >>>> 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d: >>>> >>>>    Merge tag 'for_upstream' of >>>> https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging >>>> (2023-10-05 09:01:01 -0400) >>>> >>>> are av

[PATCH v2 0/9] tests/migration-test: Allow testing older machine types

2023-10-06 Thread Fabiano Rosas
This adds support for running migration-test with two different QEMU versions to test migration compatibility. The tests automatically choose the latest machine type supported by both QEMU versions. changes: - introduce *_with_env variants of the relevant functions [Daniel, Juan] - keep the requ

[PATCH v2 2/9] tests/qtest: Introduce qtest_init_with_env

2023-10-06 Thread Fabiano Rosas
Add a version of qtest_init() that takes an environment variable containing the path of the QEMU binary. This allows tests to use more than one QEMU binary. If no variable is provided or the environment variable does not exist, that is not an error. Fallback to using QTEST_QEMU_BINARY. Signed-off

[PATCH v2 7/9] tests/qtest/migration: Define a machine for all architectures

2023-10-06 Thread Fabiano Rosas
Stop relying on defaults and select a machine explicitly for every architecture. This is a prerequisite for being able to select machine types for migration using different QEMU binaries for source and destination. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 11 ++-

[PATCH v2 1/9] tests/qtest: Allow qtest_qemu_binary to use a custom environment variable

2023-10-06 Thread Fabiano Rosas
We're adding support for testing migration using two different QEMU binaries. We'll provide the second binary in a new environment variable. Allow qtest_qemu_binary() to receive the name of the new variable. If the new environment variable is not set, that's not an error, we use QTEST_QEMU_BINARY

[PATCH v2 3/9] tests/qtest: Allow qtest_get_machines to use an alternate QEMU binary

2023-10-06 Thread Fabiano Rosas
We're adding support for using more than one QEMU binary in tests. Modify qtest_get_machines() to take an environment variable that contains the QEMU binary path. Since the function keeps a cache of the machines list in the form of a static variable, refresh it any time the environment variable ch

[PATCH v2 9/9] tests/qtest: Don't print messages from query instances

2023-10-06 Thread Fabiano Rosas
Now that we can query more than one binary, the "starting QEMU..." message can get a little noisy. Mute those messages unless we're running with --verbose. Only affects qtest_init() calls from within libqtest. The tests continue to output as usual. Signed-off-by: Fabiano Rosas --- tests/qtest/l

[PATCH v2 4/9] tests/qtest: Introduce qtest_has_machine_with_env

2023-10-06 Thread Fabiano Rosas
Add a variant of qtest_has_machine() that receives an environment variable containing an alternate QEMU binary path. Signed-off-by: Fabiano Rosas --- tests/qtest/libqtest.c | 9 +++-- tests/qtest/libqtest.h | 9 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/

[PATCH v2 5/9] tests/qtest: Introduce qtest_resolve_machine_alias

2023-10-06 Thread Fabiano Rosas
The migration tests are being enhanced to test migration between different QEMU versions. A requirement of migration is that the machine type between source and destination matches, including the version. We cannot hardcode machine types in the tests because those change with each release. QEMU pr

[PATCH v2 8/9] tests/qtest/migration: Support more than one QEMU binary

2023-10-06 Thread Fabiano Rosas
We have strict rules around migration compatibility between different QEMU versions but no test to validate the migration state between different binaries. Add infrastructure to allow running the migration tests with two different QEMU binaries as migration source and destination. The code now re

[PATCH v2 6/9] tests/qtest/migration: Introduce find_common_machine_version

2023-10-06 Thread Fabiano Rosas
When using two different QEMU binaries for migration testing, we'll need to find what is the machine version that will work with both binaries. Add a helper for that. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 24 tests/qtest/migration-helpers.h |

Re: [PATCH v4 05/15] memory/iommu: Add IOMMU_ATTR_DMA_TRANSLATION attribute

2023-10-06 Thread Eric Auger
Hi Joao, On 6/22/23 23:48, Joao Martins wrote: > Add a new IOMMU attribute IOMMU_ATTR_DMA_TRANSLATION which indicates > whether the IOMMU supports DMA Translation. doesn't it return whether the DMA translation is enabled instead? > > This attribute will be used by VFIO device dirty page tracking

Re: [PATCH v4 07/15] vfio/common: Track whether DMA Translation is enabled on the vIOMMU

2023-10-06 Thread Eric Auger
Hi Joao, On 6/22/23 23:48, Joao Martins wrote: > vfio_get_group() allocates and fills the group/container/space on > success which will store the AddressSpace inside the VFIOSpace struct. VFIOAddressSpace > Use the newly added pci_device_iommu_get_attr() to see if DMA > translation is enabled or n

[PATCH v2 01/10] target/riscv/cpu.c: add zicntr extension flag

2023-10-06 Thread Daniel Henrique Barboza
zicntr is the Base Counters and Timers extension described in chapter 12 of the unprivileged spec. It describes support for RDCYCLE, RDTIME and RDINSTRET. QEMU already implements it way before it was a discrete extension. zicntr is part of the RVA22 profile, so let's add it to QEMU to make the fut

[PATCH v2 10/10] target/riscv/tcg: add hash table insert helpers

2023-10-06 Thread Daniel Henrique Barboza
Latest patches added several g_hash_table_insert() patterns. Add two helpers, one for each user hash, to make the code cleaner. Signed-off-by: Daniel Henrique Barboza --- target/riscv/tcg/tcg-cpu.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git

[PATCH v2 06/10] target/riscv/tcg: commit profiles during realize()

2023-10-06 Thread Daniel Henrique Barboza
To 'commit' a profile means enabling/disabling all its mandatory extensions after taking into account individual user choice w.r.t MISA and multi-letter extensions. We'll handle multi-letter extennsions now - MISA extensions needs additional steps that we'll take care later. riscv_cpu_manage_profi

[PATCH v2 03/10] target/riscv: add rva22u64 profile definition

2023-10-06 Thread Daniel Henrique Barboza
The rva22U64 profile, described in: https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc#rva22-profiles Contains a set of CPU extensions aimed for 64-bit userspace applications. Enabling this set to be enabled via a single user flag makes it convenient to enable a predictable set of fe

[PATCH v2 00/10] riscv: RVA22U64 profile support

2023-10-06 Thread Daniel Henrique Barboza
Hi, Several design changes were made in this version after the reviews and feedback in the v1 [1]. The high-level summary is: - we'll no longer allow users to set profile flags for vendor CPUs. If we're to adhere to the current policy of not allowing users to enable extensions for vendor CPUs

[PATCH v2 08/10] target/riscv/tcg: add riscv_cpu_write_misa_bit()

2023-10-06 Thread Daniel Henrique Barboza
We have two instances of the setting/clearing a MISA bit from env->misa_ext and env->misa_ext_mask pattern. And the next patch will end up adding one more. Create a helper to avoid code repetition. Signed-off-by: Daniel Henrique Barboza --- target/riscv/tcg/tcg-cpu.c | 44 --

[PATCH v2 02/10] target/riscv/cpu.c: add zihpm extension flag

2023-10-06 Thread Daniel Henrique Barboza
zihpm is the Hardware Performance Counters extension described in chapter 12 of the unprivileged spec. It describes support for 29 unprivileged performance counters, hpmcounter3-hpmcounter21. As with zicntr, QEMU already implements zihpm before it was even an extension. zihpm is also part of the R

[PATCH v2 05/10] target/riscv/tcg: add user flag for profile support

2023-10-06 Thread Daniel Henrique Barboza
The TCG emulation implements all the extensions described in the RVA22U64 profile, both mandatory and optional. The mandatory extensions will be enabled via the profile flag. We'll leave the optional extensions to be enabled by hand. Given that this is the first profile we're implementing in TCG w

[PATCH v2 04/10] target/riscv/kvm: add 'rva22u64' flag as unavailable

2023-10-06 Thread Daniel Henrique Barboza
KVM does not have the means to support enabling the rva22u64 profile. The main reasons are: - we're missing support for some mandatory rva22u64 extensions in the KVM module; - we can't make promises about enabling a profile since it all depends on host support in the end. We'll revisit this

[PATCH v2 09/10] target/riscv/tcg: handle MISA bits on profile commit

2023-10-06 Thread Daniel Henrique Barboza
The profile support is handling multi-letter extensions only. Let's add support for MISA bits as well. We'll go through every known MISA bit. If the user set the bit, doesn't matter if to 'true' or 'false', ignore it. If the profile doesn't declare the bit as mandatory, ignore it. Otherwise, set o

[PATCH v2 07/10] target/riscv/tcg: add MISA user options hash

2023-10-06 Thread Daniel Henrique Barboza
We already track user choice for multi-letter extensions because we needed to honor user choice when enabling/disabling extensions during realize(). We refrained from adding the same mechanism for MISA extensions since we didn't need it. Profile support requires tne need to check for user choice f

Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc

2023-10-06 Thread Hanna Czenczek
On 06.10.23 10:49, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 09:53:53AM +0200, Hanna Czenczek wrote: On 05.10.23 19:38, Stefan Hajnoczi wrote: On Wed, Oct 04, 2023 at 02:58:58PM +0200, Hanna Czenczek wrote: GET_VRING_BASE does not mention that it stops the respective ring. Fix that.

Re: [Virtio-fs] [PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc

2023-10-06 Thread Hanna Czenczek
On 06.10.23 15:55, Hanna Czenczek wrote: On 06.10.23 10:49, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 09:53:53AM +0200, Hanna Czenczek wrote: On 05.10.23 19:38, Stefan Hajnoczi wrote: On Wed, Oct 04, 2023 at 02:58:58PM +0200, Hanna Czenczek wrote: [...]    ``VHOST_USER_GET_VRING_BA

Re: [PATCH 4/5] migration: Provide QMP access to downtime stats

2023-10-06 Thread Peter Xu
On Fri, Oct 06, 2023 at 12:37:15PM +0100, Joao Martins wrote: > I added the statistics mainly for observability (e.g. you would grep in the > libvirt logs for a non developer and they can understand how downtime is > explained). I wasn't specifically thinking about management app using this, > jus

<    1   2   3   >