Re: [PATCH v4 21/23] qapi/schema: add type hints

2024-03-15 Thread Markus Armbruster
John Snow writes: > 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

Re: [PATCH v3] blockcommit: Reopen base image as RO after abort

2024-03-15 Thread Vladimir Sementsov-Ogievskiy
On 15.03.24 12:55, Alexander Ivanov wrote: On 2/28/24 17:48, Vladimir Sementsov-Ogievskiy wrote: On 09.02.24 15:29, Alexander Ivanov wrote: Could you please review the patch? Sorry for long delay. Honestly, I don't like refcnt in block-driver. It violate incapsulation, refcnt is interal

Re: [PATCH v3 1/7] qga: guest-get-fsinfo: add optional 'total-bytes-root' field

2024-03-15 Thread Markus Armbruster
Andrey Drobyshev writes: > Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to > GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: > used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as > returned by statvfs(3). While on Windows guests that's

Re: [PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-15 Thread Vladimir Sementsov-Ogievskiy
On 15.03.24 15:51, Markus Armbruster wrote: Sorry for the late answer. Vladimir Sementsov-Ogievskiy writes: On 07.03.24 12:46, Markus Armbruster wrote: [...] I appreciate the attempt to curb the spread of DeviceNotFound errors. Two issues: * Copy-pasting find_device_state() with a false

[PATCH-for-9.1 07/21] target/mips: Make MIPS_CPU common to new MIPS32_CPU / MIPS64_CPU types

2024-03-15 Thread Philippe Mathieu-Daudé
"target/foo/cpu-qom.h" can not use any target specific definitions. Currently "target/mips/cpu-qom.h" defines TYPE_MIPS_CPU depending on the mips(32)/mips64 build type. This doesn't scale in a heterogeneous context where we need to access both types concurrently. In order to do that, introduce

[PATCH-for-9.1 03/21] target/ppc: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-15 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. In few commits we are going to add more types, so replace the type_register_static() to ease further reviews.

[PATCH-for-9.1 06/21] target/i386: Make X86_CPU common to new I386_CPU / X86_64_CPU types

2024-03-15 Thread Philippe Mathieu-Daudé
"target/foo/cpu-qom.h" can not use any target specific definitions. Currently "target/i386/cpu-qom.h" defines TYPE_X86_CPU depending on the i386/x86_64 build type. This doesn't scale in a heterogeneous context where we need to access both types concurrently. In order to do that, introduce the

[RFC PATCH-for-9.1 17/21] target/riscv: Use QMP generic_query_cpu_definitions()

2024-03-15 Thread Philippe Mathieu-Daudé
Expose riscv_cpu_add_definition() and use it as add_definition() handler, then use the QMP generic_query_cpu_definitions() method. Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu.h| 2 ++ target/riscv/cpu.c| 1 + target/riscv/riscv-qmp-cmds.c | 11

[PATCH-for-9.1 08/21] target/sparc: Make SPARC_CPU common to new SPARC32_CPU/SPARC64_CPU types

2024-03-15 Thread Philippe Mathieu-Daudé
"target/foo/cpu-qom.h" can not use any target specific definitions. Currently "target/sparc/cpu-qom.h" defines TYPE_SPARC_CPU depending on the sparc(32)/sparc64 build type. This doesn't scale in a heterogeneous context where we need to access both types concurrently. In order to do that,

[PATCH 07/12] tests/data/acpi/virt: Move ACPI tables under aarch64

2024-03-15 Thread Sunil V L
Since virt is a common machine name across architectures like ARM64 and RISC-V, move existing ARM64 ACPI tables under aarch64 folder so that RISC-V tables can be added under riscv64 folder in future. Signed-off-by: Sunil V L --- tests/data/acpi/virt/{ => aarch64}/APIC | Bin

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: > +static void qemu_savevm_wait_unplug(MigrationState *s, int state) One more trivial comment: I'd even consider dropping "state" altogether, as this should be the only state this function should be invoked. So we can perhaps

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

2024-03-15 Thread Philippe Mathieu-Daudé
Hi Alex, Markus, Markus mentioned QAPI problems with the heterogeneous emulation binary. My understanding is, while QAPI can use host-specific conditional (OS, library available, configure option), it shouldn't use target-specific ones. This series is an example on how to remove target specific

[PATCH-for-9.1 12/21] system: Introduce QemuArchBit enum

2024-03-15 Thread Philippe Mathieu-Daudé
Current QEMU_ARCH_foo definitions are used as masks. Extract the bit values, so we can easily iterate over. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/arch_init.h | 69 ++ 1 file changed, 47 insertions(+), 22 deletions(-) diff --git

[RFC PATCH-for-9.1 20/21] target/ppc: Use QMP generic_query_cpu_definitions()

2024-03-15 Thread Philippe Mathieu-Daudé
Register ppc_add_alias_definitions() as handler so we can use the QMP generic_query_cpu_definitions() method. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu_init.c | 1 + target/ppc/ppc-qmp-cmds.c | 26 ++ 2 files changed, 3 insertions(+), 24 deletions(-)

[PATCH 05/12] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them

2024-03-15 Thread Sunil V L
Existing AARCH64 virt test functions do not have AARCH64 in their name. To add RISC-V virt related test cases, better to rename existing functions to indicate they are ARM only. Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test.c | 35 ++ 1 file changed,

[PATCH-for-9.1 10/21] qapi: Make CpuModel* definitions target agnostic

2024-03-15 Thread Philippe Mathieu-Daudé
CpuModelInfo, CpuModelExpansionType and CpuModelCompareResult are not restricted to any particular target. Define them in machine.json to generate them once. Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine-target.json | 78 --- qapi/machine.json

[PATCH 10/12] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V

2024-03-15 Thread Sunil V L
Update the list of supported architectures to include RISC-V. Signed-off-by: Sunil V L --- tests/data/acpi/rebuild-expected-aml.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh index

[PATCH 09/12] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs

2024-03-15 Thread Sunil V L
Update list of images supported in unpack_edk2_blobs to enable RISC-V ACPI table testing. Signed-off-by: Sunil V L --- pc-bios/meson.build | 2 ++ tests/qtest/meson.build | 3 +++ 2 files changed, 5 insertions(+) diff --git a/pc-bios/meson.build b/pc-bios/meson.build index

[PATCH-for-9.1 13/21] system: Introduce cpu_typename_by_arch_bit()

2024-03-15 Thread Philippe Mathieu-Daudé
Introduce a helper to return the CPU type name given a QemuArchBit. The TYPE_PPC_CPU target have different 32/64-bit definitions so we can not include it yet. Signed-off-by: Philippe Mathieu-Daudé --- --- MAINTAINERS| 1 + include/sysemu/arch_init.h | 2 ++

[PATCH-for-9.1 19/21] target/ppc: Factor ppc_add_alias_definitions() out

2024-03-15 Thread Philippe Mathieu-Daudé
Factor ppc_add_alias_definitions() out of qmp_query_cpu_definitions() to clearly see the generic pattern used in all targets. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu-models.h | 4 target/ppc/ppc-qmp-cmds.c | 26 +++--- 2 files changed, 19

[RFC PATCH-for-9.1 16/21] target/loongarch: Use QMP generic_query_cpu_definitions()

2024-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/loongarch/loongarch-qmp-cmds.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/target/loongarch/loongarch-qmp-cmds.c b/target/loongarch/loongarch-qmp-cmds.c index 8721a5eb13..ef5aedc1cd 100644 ---

[PATCH-for-9.1 09/21] qapi: Merge machine-common.json with qapi/machine.json

2024-03-15 Thread Philippe Mathieu-Daudé
machine-common.json declares a single type, which isn't restricted to a particular target. Move this type in machine.json. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 - qapi/machine-common.json | 21 - qapi/machine-target.json | 2 +-

[RFC PATCH-for-9.1 18/21] target/i386: Use QMP generic_query_cpu_definitions()

2024-03-15 Thread Philippe Mathieu-Daudé
Register x86_cpu_definition_entry() and x86_cpu_list_compare() as handler so we can use the QMP generic_query_cpu_definitions() method. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/i386/cpu.c

[PATCH-for-9.1 11/21] qapi: Make CpuDefinitionInfo target agnostic

2024-03-15 Thread Philippe Mathieu-Daudé
Generate the CpuDefinitionInfo type once for all targets. In few commits @query-cpu-definitions will become generic and all target will return their CPUs list. Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine-target.json | 69 qapi/machine.json

[RFC PATCH-for-9.1 14/21] system: Introduce QMP generic_query_cpu_definitions()

2024-03-15 Thread Philippe Mathieu-Daudé
Each target use a common template for qmp_query_cpu_definitions(). Extract it as generic_query_cpu_definitions(), keeping the target-specific implementations as the following SysemuCPUOps handlers: - cpu_list_compare() - add_definition() - add_alias_definitions() Signed-off-by: Philippe

[PATCH 11/12] tests/data/acpi/virt/riscv64: Add expected ACPI tables for RISC-V

2024-03-15 Thread Sunil V L
Add expected ACPI tables for RISC-V so that bios-table-test can be enabled for RISC-V. Signed-off-by: Sunil V L --- tests/data/acpi/virt/riscv64/APIC | Bin 0 -> 116 bytes tests/data/acpi/virt/riscv64/BGRT | Bin 0 -> 56 bytes tests/data/acpi/virt/riscv64/DSDT | Bin 0 -> 3518 bytes

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

2024-03-15 Thread Philippe Mathieu-Daudé
All targets use the generic_query_cpu_definitions() method, which is not target-specific. Make the command target agnostic by moving it to machine.json. Rename generic_query_cpu_definitions as qmp_query_cpu_definitions. This is an introspection change for the target that were not implementing

[PATCH 06/12] tests/qtest/bios-tables-test.c: Add support for arch in path

2024-03-15 Thread Sunil V L
Since virt machine is common for multiple architectures, add "arch" in the path to search expected AML files. Since the AML files are still under old path, support both by searching with and without arch in the path. Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test.c | 32

[PATCH-for-9.1 05/21] cpus: Open code OBJECT_DECLARE_TYPE() in OBJECT_DECLARE_CPU_TYPE()

2024-03-15 Thread Philippe Mathieu-Daudé
Since the OBJECT_DECLARE_CPU_TYPE() macro uses the abstract ArchCPU type, when declaring multiple CPUs of the same ArchCPU type we get an error related to the indirect G_DEFINE_AUTOPTR_CLEANUP_FUNC() use within OBJECT_DECLARE_TYPE(): target/mips/cpu-qom.h:31:1: error: redefinition of

[PATCH 08/12] meson.build: Add RISC-V to the edk2-target list

2024-03-15 Thread Sunil V L
so that ACPI table test can be supported. Signed-off-by: Sunil V L --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b8ded80cbe..bf50688593 100644 --- a/meson.build +++ b/meson.build @@ -93,7 +93,7 @@ else iasl =

[PATCH-for-9.1 04/21] target/sparc: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-15 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. In few commits we are going to add more types, so replace the type_register_static() to ease further reviews.

[PATCH 03/12] uefi-test-tools: Add support for python based build script

2024-03-15 Thread Sunil V L
edk2-funcs.sh which is used in this Makefile, was removed in the commit c28a2891f3 ("edk2: update build script"). It is replaced with a python based script. So, update the Makefile and add the configuration file as required to support the python based build script. Signed-off-by: Sunil V L ---

[RFC PATCH-for-9.1 15/21] target/arm: Use QMP generic_query_cpu_definitions()

2024-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/arm/arm-qmp-cmds.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/target/arm/arm-qmp-cmds.c b/target/arm/arm-qmp-cmds.c index 3cc8cc738b..c5091e64ec 100644 --- a/target/arm/arm-qmp-cmds.c +++

[PATCH 12/12] tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V

2024-03-15 Thread Sunil V L
Add basic ACPI table testing for RISC-V. Signed-off-by: Sunil V L --- tests/qtest/bios-tables-test.c | 28 1 file changed, 28 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index c492438ced..033acc8958 100644 ---

[PATCH-for-9.1 02/21] target/mips: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-15 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. In few commits we are going to add more types, so replace the type_register_static() to ease further reviews.

[PATCH 04/12] tests/data/uefi-boot-images: Add RISC-V ISO image

2024-03-15 Thread Sunil V L
To test ACPI tables, edk2 needs to be booted with a disk image having EFI partition. This image is created using UefiTestToolsPkg. Signed-off-by: Sunil V L --- .../bios-tables-test.riscv64.iso.qcow2 | Bin 0 -> 16896 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode

[PATCH-for-9.1 01/21] target/i386: Declare CPU QOM types using DEFINE_TYPES() macro

2024-03-15 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. In few commits we are going to add more types, so replace the type_register_static() to ease further reviews.

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: > On 3/15/24 12:01, Peter Xu wrote: > > On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: > > > > migrate_set_state is also unintuitive because it ignores invalid state > > > > transitions and we've been using that

[PATCH 01/12] roms/edk2-build.py: Add --module support

2024-03-15 Thread Sunil V L
UefiTestToolsPkg which should use edk2-build.py needs --module parameter support. Add this optional parameter handling. Signed-off-by: Sunil V L --- roms/edk2-build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roms/edk2-build.py b/roms/edk2-build.py index e564765aaa..3bfe200929

[PATCH 00/12] Add support for RISC-V ACPI tests

2024-03-15 Thread Sunil V L
Currently, bios-table-test doesn't support RISC-V. This series enables the framework changes required and basic testing. Things like NUMA related test cases will be added later. This needs refactoring/renaming of ARM64 bios table tests. Importantly, the test cases now look for the expected AML

[PATCH 02/12] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support

2024-03-15 Thread Sunil V L
Enable building the test application for RISC-V with appropriate dependencies updated. Signed-off-by: Sunil V L --- tests/uefi-test-tools/UefiTestToolsPkg/UefiTestToolsPkg.dsc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v4 0/3] Adjust the output of x-query-virtio-status

2024-03-15 Thread Yong Huang
On Fri, Mar 15, 2024 at 3:51 PM Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Mar 13, 2024 at 10:40:21AM +0100, Markus Armbruster wrote: > >> I could be awkward for the use case described in PATCH 1's commit > >> message: > >> > >> However, we sometimes want to

Re: [PATCH v7 3/8] tests/qtest/migration: Replace migrate_get_connect_uri inplace of migrate_get_socket_address

2024-03-15 Thread Fabiano Rosas
Het Gala writes: > Refactor migrate_get_socket_address to internally utilize 'socket-address' > parameter, reducing redundancy in the function definition. > > migrate_get_socket_address implicitly converts SocketAddress into str. > Move migrate_get_socket_address inside migrate_get_connect_uri

Re: [PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-15 Thread Markus Armbruster
Sorry for the late answer. Vladimir Sementsov-Ogievskiy writes: > On 07.03.24 12:46, Markus Armbruster wrote: [...] >> I appreciate the attempt to curb the spread of DeviceNotFound errors. >> Two issues: >> >> * Copy-pasting find_device_state() with a false argument is an easy >> error to

[PATCH v3 5/7] qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper

2024-03-15 Thread Andrey Drobyshev
There's no need to check for the existence of the hook executable, as the exec() call will do that for us. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 35 +++ 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/qga/commands-posix.c

[PATCH v3 7/7] qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper

2024-03-15 Thread Andrey Drobyshev
There's no need to check for the existence of the "chpasswd", "pw" executables, as the exec() call will do that for us. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 96 ++-- 1 file changed, 13 insertions(+), 83 deletions(-) diff --git

[PATCH v3 3/7] qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper

2024-03-15 Thread Andrey Drobyshev
Also remove the G_GNUC_UNUSED attribute added in the previous commit from the helper. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 39 ++- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c

[PATCH v3 4/7] qga/commands-posix: qmp_guest_set_time: use ga_run_command helper

2024-03-15 Thread Andrey Drobyshev
There's no need to check for the existence of "/sbin/hwclock", the exec() call will do that for us. Signed-off-by: Andrey Drobyshev --- qga/commands-posix.c | 43 +++ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/qga/commands-posix.c

[PATCH v3 2/7] qga: introduce ga_run_command() helper for guest cmd execution

2024-03-15 Thread Andrey Drobyshev
When executing guest commands in *nix environment, we repeat the same fork/exec pattern multiple times. Let's just separate it into a single helper which would also be able to feed input data into the launched process' stdin. This way we can avoid code duplication. To keep the history more

[PATCH v3 6/7] qga/commands-posix: don't do fork()/exec() when suspending via sysfs

2024-03-15 Thread Andrey Drobyshev
Since commit 246d76eba ("qga: guest_suspend: decoupling pm-utils and sys logic") pm-utils logic is running in a separate child from the sysfs logic. Now when suspending via sysfs we don't really need to do that in a separate process as we only need to perform one write to /sys/power/state. Let's

[PATCH v3 0/7] qga/commands-posix: replace code duplicating commands with a helper

2024-03-15 Thread Andrey Drobyshev
v2 -> v3: * Patch 2/7: - ga_pipe_read_str() helper now returns -errno in case of an error during read from pipe, so that the caller may use it to set error_setg_errno(); - ga_pipe_read_str() allocates +1 additional byte to make the string read from pipe null-terminated

[PATCH v3 1/7] qga: guest-get-fsinfo: add optional 'total-bytes-root' field

2024-03-15 Thread Andrey Drobyshev
Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as returned by statvfs(3). While on Windows guests that's all we can get with

Re: Any interest in the QEMU community attending DVCon Europe October 2024?

2024-03-15 Thread ff
> Le 5 mars 2024 à 16:50, Alex Bennée a écrit : > >  > Hi, > > Over recent years there has been a push to make QEMU more flexible for > EDA type applications. As long time developers know there are a number > of downstream forks of QEMU which have their own solutions for modelling >

Re: [PATCH] target/s390x: improve cpu compatibility check error message

2024-03-15 Thread Christian Borntraeger
Am 14.03.24 um 20:00 schrieb Claudio Fontana: some users were confused by this message showing under TCG: Selected CPU generation is too new. Maximum supported model in the configuration: 'xyz' Try to clarify that the maximum can depend on the accel by adding also the current accelerator to

Re: Another CXL/MMIO tcg tlb corner case

2024-03-15 Thread Alex Bennée
Jørgen Hansen writes: > Hi, > > While doing some testing using numactl-based interleaving of application > memory > across regular memory and CXL-based memory using QEMU with tcg, I ran into an > issue similar to what we saw a while back - link to old issue: >

Re: [PATCH 17/18] target/mips: Make MIPS_CPU common to new MIPS32_CPU / MIPS64_CPU types

2024-03-15 Thread Philippe Mathieu-Daudé
On 13/10/23 06:34, Richard Henderson wrote: On 10/10/23 02:28, Philippe Mathieu-Daudé wrote: "target/foo/cpu-qom.h" can not use any target specific definitions. Currently "target/mips/cpu-qom.h" defines TYPE_MIPS_CPU depending on the mips(32)/mips64 build type. This doesn't scale in a

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because it ignores invalid state transitions and we've been using that property to deal with special states such as POSTCOPY_PAUSED and FAILED: - After the

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-15 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Fri, Mar 15, 2024 at 12:20:40AM -0300, Fabiano Rosas wrote: >> The fd: URI has supported migration to a file or socket since before >> QEMU 8.2. In 8.2 we added the file: URI that supported migration to a >> file. So now we have two ways (three if you count

Re: [PATCH v2 6/7] qga/commands-posix: use ga_run_command helper when suspending via sysfs

2024-03-15 Thread Andrey Drobyshev
On 3/5/24 20:34, Daniel P. Berrangé wrote: > [Вы нечасто получаете письма от berra...@redhat.com. Узнайте, почему это > важно, по адресу https://aka.ms/LearnAboutSenderIdentification ] > > On Fri, Mar 01, 2024 at 07:28:57PM +0200, Andrey Drobyshev wrote: >> We replace the direct call to open()

Re: [PATCH v3 2/3] migration/multifd: Duplicate the fd for the outgoing_args

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 12:20:39AM -0300, Fabiano Rosas wrote: > We currently store the file descriptor used during the main outgoing > channel creation to use it again when creating the multifd > channels. > > Since this fd is used for the first iochannel, there's risk that the > QIOChannel gets

Re: [PATCH v3 1/3] migration/multifd: Ensure we're not given a socket for file migration

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 12:20:38AM -0300, Fabiano Rosas wrote: > When doing migration using the fd: URI, QEMU will fetch the file > descriptor passed in via the monitor at > fd_start_outgoing|incoming_migration(), which means the checks at > migration_channels_and_transport_compatible() happen too

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-15 Thread Peter Xu
On Wed, Mar 06, 2024 at 02:34:29PM +0100, Cédric Le Goater wrote: > Now that the log_global*() handlers take an Error** parameter and > return a bool, do the same for memory_global_dirty_log_start() and > memory_global_dirty_log_stop(). The error is reported in the callers > for now and it will be

Re: Intention to work on GSoC project

2024-03-15 Thread Eugenio Perez Martin
On Fri, Mar 15, 2024 at 8:15 AM Sahil wrote: > > Hi, > > Thank you for your email. > > On Thursday, March 14, 2024 8:39:45 PM IST Eugenio Perez Martin wrote: > > Hi Sahil, > > > > It's being hard to find a good self-contained small task related to > > the project to be honest. As it would be out

Re: [PATCH for 9.0 v15 05/10] target/riscv: always clear vstart for ldst_whole insns

2024-03-15 Thread Max Chou
Reviewed-by: Max Chou On 2024/3/15 1:56 AM, Daniel Henrique Barboza wrote: Commit 8ff8ac6329 added a conditional to guard the vext_ldst_whole() helper if vstart >= evl. But by skipping the helper we're also not setting vstart = 0 at the end of the insns, which is incorrect. We'll move the

Re: [PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-15 Thread Peter Xu
On Wed, Mar 06, 2024 at 02:34:28PM +0100, Cédric Le Goater wrote: > diff --git a/system/memory.c b/system/memory.c > index > a229a79988fce2aa3cb77e3a130db4c694e8cd49..3600e716149407c10a1f6bf8f0a81c2611cf15ba > 100644 > --- a/system/memory.c > +++ b/system/memory.c > @@ -2914,9 +2914,27 @@ static

[PATCH 0/9] tests/qemu-iotests: Fix running with "check -ssh -qcow2"

2024-03-15 Thread Thomas Huth
I recently wanted to check for some changes that I did to the URI handling in the block layer code, but I had to discover that a lot of iotests only work with the raw file format when using a protocol that is not "file", i.e. "./check -ssh -qcow2" shows a lot of failures. While some tests could be

[PATCH 7/9] tests/qemu-iotests: Restrict tests that use --image-opts to the 'file' protocol

2024-03-15 Thread Thomas Huth
These tests 188, 189 and 198 use qemu-io with --image-opts with additional hard-coded parameters for the file protocol, so they cannot work for other protocols. Thus we have to limit these tests to the file protocol only. Signed-off-by: Thomas Huth --- tests/qemu-iotests/188 | 2 +-

Re: [PATCH v2 2/7] qga: introduce ga_run_command() helper for guest cmd execution

2024-03-15 Thread Andrey Drobyshev
On 3/5/24 19:58, Daniel P. Berrangé wrote: > On Fri, Mar 01, 2024 at 07:28:53PM +0200, Andrey Drobyshev wrote: >> When executing guest commands in *nix environment, we repeat the same >> fork/exec pattern multiple times. Let's just separate it into a single >> helper which would also be able to

[PATCH 2/9] tests/qemu-iotests: Restrict test 066 to the 'file' protocol

2024-03-15 Thread Thomas Huth
The hand-crafted json statement in this test only works if the test is run with the "file" protocol, so mark this test accordingly. Signed-off-by: Thomas Huth --- tests/qemu-iotests/066 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/066

Re: [PATCH v2 7/7] qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper

2024-03-15 Thread Andrey Drobyshev
On 3/5/24 20:38, Daniel P. Berrangé wrote: > On Fri, Mar 01, 2024 at 07:28:58PM +0200, Andrey Drobyshev wrote: >> There's no need to check for the existence of the "chpasswd", "pw" >> executables, as the exec() call will do that for us. >> >> Signed-off-by: Andrey Drobyshev >> --- >>

[PATCH 6/9] tests/qemu-iotests: Restrict test 156 to the 'file' protocol

2024-03-15 Thread Thomas Huth
The test fails completely when you try to use it with a different protocol, e.g. with "./check -ssh -qcow2 156". The test uses some hand-crafted JSON statements which cannot work with other protocols, thus let's change this test to only support the 'file' protocol. Signed-off-by: Thomas Huth ---

[PATCH 3/9] tests/qemu-iotests: Restrict test 114 to the 'file' protocol

2024-03-15 Thread Thomas Huth
iotest 114 uses "truncate" and the qcow2.py script on the destination file, which both cannot deal with URIs. Thus this test needs the "file" protocol, otherwise it fails with an error message like this: truncate: cannot open

[PATCH 1/9] tests/qemu-iotests: Fix test 033 for running with non-file protocols

2024-03-15 Thread Thomas Huth
When running iotest 033 with the ssh protocol, it fails with: 033 fail [14:48:31] [14:48:41] 10.2soutput mismatch --- /.../tests/qemu-iotests/033.out +++ /.../tests/qemu-iotests/scratch/qcow2-ssh-033/033.out.bad @@ -174,6 +174,7 @@ 512 bytes, X ops; XX:XX:XX.X (XXX

[PATCH 4/9] tests/qemu-iotests: Restrict test 130 to the 'file' protocol

2024-03-15 Thread Thomas Huth
Using "-drive ...,backing.file.filename=..." only works with the file protocol, but not with URIs, so mark this test accordingly. Signed-off-by: Thomas Huth --- tests/qemu-iotests/130 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/130

[PATCH 8/9] tests/qemu-iotests: Fix some tests that use --image-opts for other protocols

2024-03-15 Thread Thomas Huth
Tests 263, 284 and detect-zeroes-registered-buf use qemu-io with --image-opts so we have to enforce IMGOPTSSYNTAX=true here to get $TEST_IMG in shape for other protocols than "file". Signed-off-by: Thomas Huth --- tests/qemu-iotests/263| 6 --

[PATCH 5/9] tests/qemu-iotests: Restrict test 134 and 158 to the 'file' protocol

2024-03-15 Thread Thomas Huth
Commit b25b387fa592 updated the iotests 134 and 158 to use the --image-opts parameter for qemu-io with file protocol related options, but forgot to update the _supported_proto line accordingly. So let's do that now. Fixes: b25b387fa5 ("qcow2: convert QCow2 to use QCryptoBlock for encryption")

[PATCH 9/9] tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol

2024-03-15 Thread Thomas Huth
Tests that use "--blockdev" with the "file" driver cannot work with other protocols, so we should mark them accordingly. Signed-off-by: Thomas Huth --- tests/qemu-iotests/tests/qcow2-internal-snapshots | 2 +- tests/qemu-iotests/tests/qsd-jobs | 2 +- 2 files changed, 2

Re: Any interest in the QEMU community attending DVCon Europe October 2024?

2024-03-15 Thread Alex Bennée
Alex Bennée writes: > Hi, > > Over recent years there has been a push to make QEMU more flexible for > EDA type applications. As long time developers know there are a number > of downstream forks of QEMU which have their own solutions for modelling > heterogeneous systems and integrating with

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: > > migrate_set_state is also unintuitive because it ignores invalid state > > transitions and we've been using that property to deal with special > > states such as POSTCOPY_PAUSED and FAILED: > > > > - After the migration goes

[PATCH 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-15 Thread Yuquan Wang
The dev_dbg info for Clear Event Records mailbox command would report the handle of the next record to clear not the current one. This was because the index 'i' had incremented before printing the current handle value. This fix also adjusts the index variable name from 'i' to 'clear_cnt' which

[PATCH 0/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-15 Thread Yuquan Wang
This is a simple fix for the index of 'Clear Event Record' Handle. The print content of dev_dbg from Clear Event Records mailbox command would report the handle of the next record to clear not the current one. The problem was found when I was doing the debug of CXL Event Error on Qemu. I injected

Re: [PATCH v2 2/2] hmat acpi: Fix out of bounds access due to missing use of indirection

2024-03-15 Thread Jonathan Cameron via
On Wed, 13 Mar 2024 21:24:06 +0300 Michael Tokarev wrote: > 07.03.2024 19:03, Jonathan Cameron via wrote: > > With a numa set up such as > > > > -numa nodeid=0,cpus=0 \ > > -numa nodeid=1,memdev=mem \ > > -numa nodeid=2,cpus=1 > > > > and appropriate hmat_lb entries the initiator list is

Re: [PATCH v9 0/7] QEMU CXL Provide mock CXL events and irq support

2024-03-15 Thread Jonathan Cameron via
On Fri, 15 Mar 2024 09:52:28 +0800 Yuquan Wang wrote: > Hello, Jonathan > > When during the test of qmps of CXL events like > "cxl-inject-general-media-event", > I am confuesd about the argument "flags". According to "qapi/cxl.json" in > qemu, > this argument represents "Event Record Flags"

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/12/24 19:28, Fabiano Rosas wrote: Peter Xu writes: On Tue, Mar 12, 2024 at 11:24:39AM -0300, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/12/24 14:34, Cédric Le Goater wrote: On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater

Re: [PATCH v3] blockcommit: Reopen base image as RO after abort

2024-03-15 Thread Alexander Ivanov
On 2/28/24 17:48, Vladimir Sementsov-Ogievskiy wrote: On 09.02.24 15:29, Alexander Ivanov wrote: Could you please review the patch? Sorry for long delay. Honestly, I don't like refcnt in block-driver. It violate incapsulation, refcnt is interal thing of common block layer. And actually,

Another CXL/MMIO tcg tlb corner case

2024-03-15 Thread Jørgen Hansen
Hi, While doing some testing using numactl-based interleaving of application memory across regular memory and CXL-based memory using QEMU with tcg, I ran into an issue similar to what we saw a while back - link to old issue:

RE: [PATCH 2/2] qom/object_interfaces: Remove local_err in user_creatable_add_type

2024-03-15 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Zhao1 >Subject: Re: [PATCH 2/2] qom/object_interfaces: Remove local_err in >user_creatable_add_type > >On Thu, Feb 29, 2024 at 11:37:39AM +0800, Zhenzhong Duan wrote: >> Date: Thu, 29 Feb 2024 11:37:39 +0800 >> From: Zhenzhong Duan >> Subject: [PATCH

RE: [PATCH 1/2] qom/object_interfaces: Remove unnecessary local_err check

2024-03-15 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Zhao1 >Subject: Re: [PATCH 1/2] qom/object_interfaces: Remove unnecessary >local_err check > >On Thu, Feb 29, 2024 at 11:37:38AM +0800, Zhenzhong Duan wrote: >> Date: Thu, 29 Feb 2024 11:37:38 +0800 >> From: Zhenzhong Duan >> Subject: [PATCH 1/2]

Re: [PATCH v2 1/6] virtio/virtio-pci: Handle extra notification data

2024-03-15 Thread Eugenio Perez Martin
On Thu, Mar 14, 2024 at 9:24 PM Jonah Palmer wrote: > > > > On 3/14/24 3:05 PM, Eugenio Perez Martin wrote: > > On Thu, Mar 14, 2024 at 5:06 PM Jonah Palmer > > wrote: > >> > >> > >> > >> On 3/14/24 10:55 AM, Eugenio Perez Martin wrote: > >>> On Thu, Mar 14, 2024 at 1:16 PM Jonah Palmer > >>>

Re: [PATCH v3] block: Use LVM tools for LV block device truncation

2024-03-15 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 09:58:38AM +0100, Alexander Ivanov wrote: > If a block device is an LVM logical volume we can resize it using > standard LVM tools. > > Add a helper to detect if a device is a DM device. In raw_co_truncate() > check if the block device is DM and resize it executing

Re: [PATCH V4 1/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-15 Thread lixianglai
Hi Richard : On 3/14/24 20:22, lixianglai wrote: Hi Richard: On 3/13/24 15:33, Xianglai Li wrote: +    if (unlikely((level == 0) || (level > 4))) { +    return base; +    } ... Perhaps it would be worthwhile to add another for the level==0 or > 4 case above? A normal level 4 page

[PATCH v3] block: Use LVM tools for LV block device truncation

2024-03-15 Thread Alexander Ivanov
If a block device is an LVM logical volume we can resize it using standard LVM tools. Add a helper to detect if a device is a DM device. In raw_co_truncate() check if the block device is DM and resize it executing lvresize. Signed-off-by: Alexander Ivanov --- block/file-posix.c | 61

Re: [RFC PATCH v3 3/3] migration: Add fd to FileMigrationArgs

2024-03-15 Thread Daniel P . Berrangé
On Fri, Mar 15, 2024 at 12:20:40AM -0300, Fabiano Rosas wrote: > The fd: URI has supported migration to a file or socket since before > QEMU 8.2. In 8.2 we added the file: URI that supported migration to a > file. So now we have two ways (three if you count exec:>cat) to > migrate to a file. Fine.

Re: [PATCH v5 49/65] i386/tdx: handle TDG.VP.VMCALL

2024-03-15 Thread Xiaoyao Li
On 3/13/2024 11:31 PM, Daniel P. Berrangé wrote: On Tue, Mar 12, 2024 at 03:44:32PM +0800, Xiaoyao Li wrote: On 3/11/2024 5:27 PM, Daniel P. Berrangé wrote: On Thu, Feb 29, 2024 at 01:37:10AM -0500, Xiaoyao Li wrote: From: Isaku Yamahata Add property "quote-generation-socket" to tdx-guest,

Re: [PATCH] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value

2024-03-15 Thread Stefano Garzarella
On Thu, Mar 14, 2024 at 11:17:01AM +0800, Jason Wang wrote: On Wed, Feb 7, 2024 at 5:27 PM Stefano Garzarella wrote: vhost_vdpa_set_vring_ready() could already fail, but if Linux's patch [1] will be merged, it may fail with more chance if userspace does not activate virtqueues before

Re: [PATCH 2/2] qom/object_interfaces: Remove local_err in user_creatable_add_type

2024-03-15 Thread Zhao Liu
On Thu, Feb 29, 2024 at 11:37:39AM +0800, Zhenzhong Duan wrote: > Date: Thu, 29 Feb 2024 11:37:39 +0800 > From: Zhenzhong Duan > Subject: [PATCH 2/2] qom/object_interfaces: Remove local_err in > user_creatable_add_type > X-Mailer: git-send-email 2.34.1 > > In user_creatable_add_type, there is

Re: [PATCH 1/2] qom/object_interfaces: Remove unnecessary local_err check

2024-03-15 Thread Zhao Liu
On Thu, Feb 29, 2024 at 11:37:38AM +0800, Zhenzhong Duan wrote: > Date: Thu, 29 Feb 2024 11:37:38 +0800 > From: Zhenzhong Duan > Subject: [PATCH 1/2] qom/object_interfaces: Remove unnecessary local_err > check > X-Mailer: git-send-email 2.34.1 > > In the error return path, local_err is always

Re: [PATCH v4 0/3] Adjust the output of x-query-virtio-status

2024-03-15 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Mar 13, 2024 at 10:40:21AM +0100, Markus Armbruster wrote: >> I could be awkward for the use case described in PATCH 1's commit >> message: >> >> However, we sometimes want to compare features and status bits without >> caring for their exact

Re: [PATCH V4 1/1] target/loongarch: Fixed tlb huge page loading issue

2024-03-15 Thread Richard Henderson
On 3/14/24 20:22, lixianglai wrote: Hi Richard: On 3/13/24 15:33, Xianglai Li wrote: +    if (unlikely((level == 0) || (level > 4))) { +    return base; +    } ... Perhaps it would be worthwhile to add another for the level==0 or > 4 case above? A normal level 4 page table should not

Re: [PATCH for 9.0 v15 04/10] target/riscv: always clear vstart in whole vec move insns

2024-03-15 Thread Richard Henderson
On 3/14/24 07:56, Daniel Henrique Barboza wrote: These insns have 2 paths: we'll either have vstart already cleared if vstart_eq_zero or we'll do a brcond to check if vstart >= maxsz to call the 'vmvr_v' helper. The helper will clear vstart if it executes until the end, or if vstart >= vl. For

<    1   2   3   >