Re: [PATCH-for-10.0 v2 02/14] tests/functional: Add a decorator for skipping tests on particular OS

2025-04-03 Thread Thomas Huth
On 03/04/2025 17.18, Philippe Mathieu-Daudé wrote: Since tests might be failing on some operating systems, introduce the skipIfOperatingSystem() decorator. Signed-off-by: Philippe Mathieu-Daudé --- tests/functional/qemu_test/__init__.py | 2 +- tests/functional/qemu_test/decorators.py | 1

Re: [PATCH-for-10.1 00/13] arm: Spring header cleanups

2025-04-03 Thread Philippe Mathieu-Daudé
On 3/4/25 20:22, Pierrick Bouvier wrote: On 4/2/25 15:23, Philippe Mathieu-Daudé wrote: This series is more useful for heterogeneous emulation preparation than single binary, because it allows non-ARM hw/ code to configure ARM cores, so not using target-specific APIs. I figured some patches coul

Re: [PATCH] smbios: Fix buffer overrun when using path= option

2025-04-03 Thread Daan De Meyer
Hi, Unless I'm missing something, I don't think the patch has been merged yet. Any chance it might have been missed? Cheers, Daan On Sun, 23 Mar 2025 at 22:36, Daan De Meyer wrote: > > We have to make sure the array of bytes read from the path= file > is null-terminated, otherwise we run into

[PATCH] target/i386/emulate: remove flags_mask

2025-04-03 Thread Paolo Bonzini
The field is written but never read. Cc: Wei Liu Signed-off-by: Paolo Bonzini --- target/i386/emulate/x86_decode.h | 2 - target/i386/emulate/x86_decode.c | 864 +++ 2 files changed, 424 insertions(+), 442 deletions(-) diff --git a/target/i386/emulate/x86_decode.h

Re: [RFC PATCH-for-10.0] hw/vmapple: Allow running QTest framework on macOS

2025-04-03 Thread Philippe Mathieu-Daudé
On 1/4/25 15:20, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: First, the VMapple machine only works with the ARM 'host' CPU type, which isn't accepted for QTest: $ qemu-system-aarch64 -M vmapple -accel qtest qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HV

Re: [PULL -rce 0/1] NBD patches for 2025-04-03

2025-04-03 Thread Eric Blake
Sorry for the typo in the subject line; that should be -rc3 (and not rce - this is not an exploit). On Thu, Apr 03, 2025 at 05:19:26PM -0500, Eric Blake wrote: > The following changes since commit 0adf626718bc0ca9c46550249a76047f8e45da15: > > Update version for v10.0.0-rc2 release (2025-04-01 1

Re: [PATCH] target/i386/emulate: remove flags_mask

2025-04-03 Thread Richard Henderson
On 4/3/25 12:48, Paolo Bonzini wrote: The field is written but never read. Cc: Wei Liu Signed-off-by: Paolo Bonzini --- target/i386/emulate/x86_decode.h | 2 - target/i386/emulate/x86_decode.c | 864 +++ 2 files changed, 424 insertions(+), 442 deletions(-) Rev

[PATCH-for-10.1 v3 16/19] tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h'

2025-04-03 Thread Philippe Mathieu-Daudé
qemu_tcg_mttcg_enabled() is specific to 1/ TCG and 2/ system emulation. Move the prototype declaration to "system/tcg.h", reducing 'mttcg_enabled' variable scope. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/hw/core/cpu.h |

Re: [PATCH-for-10.0] hw/core/machine.c: Fix -machine dumpdtb=file.dtb

2025-04-03 Thread Alistair Francis
On Tue, Apr 1, 2025 at 2:16 PM Joel Stanley wrote: > > In commit 8fd2518ef2f8 ("hw: Centralize handling of -machine dumpdtb > option") the call to dump was moved with respect to the init of the > machine. This resulted in the device tree missing parts of the machine > description, depending on ho

Re: [PATCH v2 1/2] target/riscv: Restrict mideleg/medeleg/medelegh access to S-mode harts

2025-04-03 Thread Alistair Francis
On Tue, Apr 1, 2025 at 8:35 PM Jay Chang wrote: > > RISC-V Privileged Spec states: > "In harts with S-mode, the medeleg and mideleg registers must exist, and > setting a bit in medeleg or mideleg will delegate the corresponding trap > , when occurring in S-mode or U-mode, to the S-mode trap handle

Re: [PATCH v2 2/2] target/riscv: Restrict midelegh access to S-mode harts

2025-04-03 Thread Alistair Francis
On Tue, Apr 1, 2025 at 8:35 PM Jay Chang wrote: > > RISC-V AIA Spec states: > "For a machine-level environment, extension Smaia encompasses all added > CSRs and all modifications to interrupt response behavior that the AIA > specifies for a hart, over all privilege levels. For a supervisor-level >

[RFC PATCH-for-10.1 00/19] qemu: Introduce TargetInfo API (for single binary)

2025-04-03 Thread Philippe Mathieu-Daudé
Hi, At this point this series is mostly a draft for Pierrick. It implement his idea of a per-binary structure containing all target-specific information, exposing them via a target-agnostic API. Commits are barely commented, since I'd rather get feedback before pursuing further. Available here, b

[RFC PATCH-for-10.1 03/19] qemu: Factor target_system_arch() out

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/target_info-impl.h | 4 include/qemu/target_info.h | 4 hw/core/machine-qmp-cmds.c | 6 ++ target_info-stub.c | 1 + target_info.c | 12 5 files changed, 23 insertions(+)

[RFC PATCH-for-10.1 08/19] target/riscv: Replace TARGET_LONG_BITS -> target_long_bits()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/riscv-iommu.c | 3 ++- hw/riscv/riscv_hart.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index 65411b3e4c0..37563b2102f 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/risc

[RFC PATCH-for-10.1 17/19] accel: Move target-agnostic code from accel-target.c -> accel-common.c

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/accel-common.c | 142 +++ accel/accel-target.c | 129 --- accel/meson.build| 1 + 3 files changed, 143 insertions(+), 129 deletions(-) create mode 100644 accel/accel-

[RFC PATCH-for-10.1 10/19] cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- cpu-target.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 761c2d28645..01b0064b91f 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qemu/erro

[RFC PATCH-for-10.1 12/19] cpus: Move target-agnostic methods out of cpu-target.c

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- cpu-target.c | 78 +--- hw/core/cpu-common.c | 74 + 2 files changed, 75 insertions(+), 77 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 01b0064b91f..20

[RFC PATCH-for-10.1 16/19] accel: Make AccelCPUClass structure target-agnostic

2025-04-03 Thread Philippe Mathieu-Daudé
Include missing "hw/core/cpu.h" header in "accel/accel-cpu.h" to avoid: include/accel/accel-cpu-target.h:39:28: error: unknown type name 'CPUClass' 39 | void (*cpu_class_init)(CPUClass *cc); |^ Signed-off-by: Philippe Mathieu-Daudé --- include/accel/acce

[RFC PATCH-for-10.1 11/19] accel/tcg: Replace CPU_RESOLVING_TYPE -> target_cpu_type()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index bf27c5c0fb3..a13cb39644f 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -35,6 +35,7 @@ #include "qa

[RFC PATCH-for-10.1 18/19] qemu: Prepare per-binary QOM filter via TYPE_BINARY_PREFIX

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- meson.build| 1 + include/hw/boards.h| 1 + include/qemu/target_info-qom.h | 14 ++ target_info-qom.c | 15 +++ 4 files changed, 31 insertions(+) create mode 100644 include/qemu/targe

[RFC PATCH-for-10.1 05/19] qemu: Introduce target_long_bits()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/target_info-impl.h | 3 +++ include/qemu/target_info.h | 2 ++ target_info-stub.c | 1 + target_info.c | 5 + 4 files changed, 11 insertions(+) diff --git a/include/qemu/target_info-impl.h b/include/qe

[RFC PATCH-for-10.1 01/19] qemu: Introduce TargetInfo API in 'target_info.h'

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 9 + include/exec/poison.h | 1 + include/qemu/target_info-impl.h | 21 + include/qemu/target_info.h | 18 ++ target_info-stub.c | 23 +

[RFC PATCH-for-10.1 09/19] qemu: Introduce target_cpu_type()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/target_info-impl.h | 3 +++ include/qemu/target_info.h | 2 ++ target_info-stub.c | 2 ++ target_info.c | 5 + 4 files changed, 12 insertions(+) diff --git a/include/qemu/target_info-impl.h b/include/q

[RFC PATCH-for-10.1 02/39] target/arm: Register TYPE_BINARY_QEMU_SYSTEM_ARM/AARCH64 interfaces

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/target_info-qom.h | 20 target_info-qom.c | 8 2 files changed, 28 insertions(+) diff --git a/include/qemu/target_info-qom.h b/include/qemu/target_info-qom.h index c87d47acf66..880b34e699e 100644 -

[RFC PATCH-for-10.1 00/39] single-binary: Make hw/arm/ common

2025-04-03 Thread Philippe Mathieu-Daudé
Hi, At this point this series is mostly a draft for Pierrick. After introducing the generic TargetInfo API [*], we implement the ARM variants, then use the API to remove target-specific code, allowing to eventually remove the target-specific arm_ss[] source set in meson.build, having all objects

[RFC PATCH-for-10.1 09/39] target/arm/cpregs: Include missing 'target/arm/cpu.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
CPReadFn type definitions use the CPUARMState type, itself declared in "cpu.h". Include this file in order to avoid when refactoring headers: ../target/arm/cpregs.h:241:27: error: unknown type name 'CPUARMState' typedef uint64_t CPReadFn(CPUARMState *env, const ARMCPRegInfo *opaque);

[RFC PATCH-for-10.1 26/39] system/hvf: Avoid including 'cpu.h'

2025-04-03 Thread Philippe Mathieu-Daudé
"system/hvf.h" doesn't need to include a full "cpu.h", only "exec/vaddr.h" and "qemu/queue.h" are required. Signed-off-by: Philippe Mathieu-Daudé --- include/system/hvf.h | 3 ++- include/system/hvf_int.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/system/hv

Re: [PATCH-for-10.0 1/5] qtest/bios-tables-test: Add test for -M virt,its=off

2025-04-03 Thread Gustavo Romero
Hi Phil, On 4/3/25 09:47, Philippe Mathieu-Daudé wrote: On 3/4/25 08:25, Gustavo Romero wrote: Hi Phil, On 4/2/25 07:30, Philippe Mathieu-Daudé wrote: On 2/4/25 08:41, Gustavo Romero wrote: Hi Phil, On 3/31/25 19:12, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé Pl

[RFC PATCH-for-10.1 21/39] target/arm: Extract feature definitions to 'cpu_has_feature.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- target/arm/cpu.h | 54 +- target/arm/cpu_has_feature.h | 65 2 files changed, 66 insertions(+), 53 deletions(-) create mode 100644 target/arm/cpu_

[RFC PATCH-for-10.1 19/39] hw/arm: Include missing 'target/arm/gtimer.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- hw/arm/aspeed_ast27x0.c| 1 + hw/arm/bcm2838.c | 1 + hw/arm/exynos4210.c| 1 + hw/arm/fsl-imx8mp.c| 1 + hw/arm/mps3r.c | 1 + hw/arm/npcm8xx.c | 1 + hw/vmapple/vmapple.c

[RFC PATCH-for-10.1 20/39] target/arm: Extract PSCI definitions to 'psci.h'

2025-04-03 Thread Philippe Mathieu-Daudé
Extract PSCI definitions (which are not target specific) to the new "target/arm/psci.h", so code from hw/arm/ can use them without having to include the target specific "cpu.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- include/hw/arm/boot.h | 3 ++- t

[RFC PATCH-for-10.1 18/39] target/arm: Move some definitions from 'cpu.h' to 'multiprocessing.h'

2025-04-03 Thread Philippe Mathieu-Daudé
arm_build_mp_affinity() and affinity mask definitionss are related to multiprocessing. Move them to "multiprocessing.h", including this header when necessary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- target/arm/cpu.h | 17 - target/arm/

[RFC PATCH-for-10.1 13/39] target/arm/qmp: Include missing 'cpu.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
arm-qmp-cmds.c uses ARM_MAX_VQ, which is defined in "cpu.h". Include the latter to avoid when refactoring unrelated headers: target/arm/arm-qmp-cmds.c:83:19: error: use of undeclared identifier 'ARM_MAX_VQ' 83 | QEMU_BUILD_BUG_ON(ARM_MAX_VQ > 16); | ^ Signed-off-

[RFC PATCH-for-10.1 17/39] target/arm: Restrict inclusion of 'multiprocessing.h'

2025-04-03 Thread Philippe Mathieu-Daudé
Only cpu.c requires "multiprocessing.h" definitions so far. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- target/arm/cpu.h | 1 - target/arm/cpu.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 3705b34285b.

[RFC PATCH-for-10.1 34/39] hw/arm/virt: Register valid CPU types dynamically

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 35 --- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index fe2dec9500f..e241e71e1c3 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3129,32 +3129,30 @@ sta

[RFC PATCH-for-10.1 23/39] hw/arm/realview: Replace arm_feature() -> arm_cpu_has_feature()

2025-04-03 Thread Philippe Mathieu-Daudé
By using arm_cpu_has_feature() instead of arm_feature() we don't need to include "cpu.h" anymore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- hw/arm/realview.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/r

[RFC PATCH-for-10.1 22/39] target/arm: Add arm_cpu_has_feature() helper

2025-04-03 Thread Philippe Mathieu-Daudé
arm_cpu_has_feature() is equivalent of arm_feature(), however while the latter uses CPUARMState so is target-specific, the former doesn't and can be called by target-agnostic code in hw/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- target/arm/cpu_has_feature.h | 2 ++

[RFC PATCH-for-10.1 14/19] accel: Implement accel_init_ops_interfaces() for both system/user mode

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/{accel-system.h => accel-internal.h} | 8 accel/accel-system.c | 4 ++-- accel/accel-target.c | 10 ++ accel/accel-user.c | 6 ++ 4 files changed, 14 inserti

[RFC PATCH-for-10.1 15/19] accel: Include missing 'qemu/accel.h' header in accel-internal.h

2025-04-03 Thread Philippe Mathieu-Daudé
In file included from ../../accel/accel-target.c:29: ../../accel/accel-internal.h:13:32: error: unknown type name 'AccelClass' 13 | void accel_init_ops_interfaces(AccelClass *ac); |^ Signed-off-by: Philippe Mathieu-Daudé --- accel/accel-internal.h | 2 ++

[RFC PATCH-for-10.1 02/19] qemu: Convert target_name() to TargetInfo API

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 2 -- include/qemu/target_info-impl.h | 3 +++ include/qemu/target_info.h | 2 ++ cpu-target.c| 5 - hw/core/machine-qmp-cmds.c | 1 + plugins/loader.c| 2 +- system/vl.c

[RFC PATCH-for-10.1 25/39] hw/arm: Build virt-acpi-build.c once

2025-04-03 Thread Philippe Mathieu-Daudé
Previous commits removed the target-specificities, we can now move virt-acpi-build.c to arm_common_ss[]. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index f52034ff6a2..536

[RFC PATCH-for-10.1 07/19] target/hppa: Replace TARGET_LONG_BITS -> target_long_bits()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/mem_helper.c | 3 ++- target/hppa/translate.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 554d7bf4d14..03cd103f284 100644 --- a/target/hppa/mem_helper.c +++

Re: [PATCH 1/2] accel/tcg: add get_virtual_clock for TCG

2025-04-03 Thread Pierrick Bouvier
On 4/3/25 04:38, Alex Bennée wrote: Rather than allowing cpus_get_virtual_clock() to fall through to cpu_get_clock() introduce a TCG handler so it can make a decision about what time it is. Initially this just calls cpu_get_clock() as before but this will change in later commits. Signed-off-by:

[RFC PATCH-for-10.1 39/39] hw/arm/meson: Remove arm_ss[] source set

2025-04-03 Thread Philippe Mathieu-Daudé
All units are now built as common objects. Signed-off-by: Philippe Mathieu-Daudé --- Yay! --- hw/arm/meson.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 61f145f901f..476e6048939 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@

[RFC PATCH-for-10.1 05/39] hw/arm/aspeed: Filter machine types for binary

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/aspeed.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 82f42582fa3..245f961a868 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -179,13 +179,11 @@ s

[RFC PATCH-for-10.1 10/39] hw/arm/boot: Include missing 'system/memory.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
default_reset_secondary() uses address_space_stl_notdirty(), itself declared in "system/memory.h". Include this header in order to avoid when refactoring headers: ../hw/arm/boot.c:281:5: error: implicit declaration of function 'address_space_stl_notdirty' is invalid in C99 [-Werror,-Wimplicit-

[RFC PATCH-for-10.1 11/39] hw/arm: Use full "target/arm/cpu.h" path to include target's "cpu.h"

2025-04-03 Thread Philippe Mathieu-Daudé
We would like to get rid of '-I target/$ARCH/' in the CPPFLAGS. Use the full path to "cpu.h": "target/arm/cpu.h". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/arm/digic.h | 2 +- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +-

[RFC PATCH-for-10.1 15/39] target/arm/hvf: Include missing 'cpu-qom.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
ARMCPU typedef is declared in "cpu-qom.h". Include it in order to avoid when refactoring unrelated headers: target/arm/hvf_arm.h:23:41: error: unknown type name 'ARMCPU' 23 | void hvf_arm_set_cpu_features_from_host(ARMCPU *cpu); | ^ Signed-of

[RFC PATCH-for-10.1 14/39] target/arm/kvm: Include missing 'cpu-qom.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
ARMCPU typedef is declared in "cpu-qom.h". Include it in order to avoid when refactoring unrelated headers: target/arm/kvm_arm.h:54:29: error: unknown type name 'ARMCPU' 54 | bool write_list_to_kvmstate(ARMCPU *cpu, int level); | ^ Signed-off-by: Philipp

[RFC PATCH-for-10.1 06/39] hw/arm/aspeed: Build objects once

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 09b1cfe5b57..f76e7fb229f 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -39,15 +39,15 @@ arm_common_ss.ad

[RFC PATCH-for-10.1 08/39] hw/arm/raspi: Build objects once

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/meson.build | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index f76e7fb229f..f52034ff6a2 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -27,8 +27,12 @@ arm_common_ss

[RFC PATCH-for-10.1 31/39] target/arm: Replace target_ulong -> uint64_t for HWBreakpoint

2025-04-03 Thread Philippe Mathieu-Daudé
CPUARMState::pc is of type uint64_t. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 6 +++--- target/arm/hyp_gdbstub.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index d6ac00be0f2..ce60aee41d8 1

[RFC PATCH-for-10.1 19/19] system/vl: Filter machine list for binary using machine_binary_filter()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- system/vl.c | 24 1 file changed, 24 insertions(+) diff --git a/system/vl.c b/system/vl.c index d8a0fe713c9..554f5f2a467 100644 --- a/system/vl.c +++ b/system/vl.c @@ -27,6 +27,8 @@ #include "qemu/datadir.h" #include "qemu/unit

[RFC PATCH-for-10.1 27/39] system/hvf: Expose hvf_enabled() to common code

2025-04-03 Thread Philippe Mathieu-Daudé
Currently hvf_enabled() is restricted to target-specific code. By defining CONFIG_HVF_IS_POSSIBLE we allow its use anywhere. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + include/system/hvf.h| 14 +- accel/stubs/hvf-stub.c | 12 accel/stu

[RFC PATCH-for-10.1 38/39] hw/arm: Move xen files to arm_common_ss[]

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- XXX untested --- hw/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index c46e5036722..61f145f901f 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -63,7 +63,7 @@ arm_c

[RFC PATCH-for-10.1 36/39] target/arm: Expose Aarch64 helpers indistinctly

2025-04-03 Thread Philippe Mathieu-Daudé
At worst, for 32-bit arm binary, using these methods will now produce a link time error, instead of a compile time one. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 8657

[RFC PATCH-for-10.1 32/39] target/arm: Replace target_ulong -> vaddr for CPUWatchpoint

2025-04-03 Thread Philippe Mathieu-Daudé
CPUWatchpoint::vaddr/len are of type vaddr. Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 9 + target/arm/hyp_gdbstub.c | 8 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index ce60aee41d8..8

[RFC PATCH-for-10.1 30/39] target/arm: Replace target_ulong -> hwaddr in ARMMMUFaultInfo

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 01408e40a34..d6ac00be0f2 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -25,6 +25,7

[RFC PATCH-for-10.1 37/39] hw/arm: Build virt.c once

2025-04-03 Thread Philippe Mathieu-Daudé
Previous commits removed the TARGET_AARCH64 uses in virt.c, we can now move it to arm_common_ss[] and build it once. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 7eb4

[RFC PATCH-for-10.1 29/39] hw/arm: Build sbsa-ref.c once

2025-04-03 Thread Philippe Mathieu-Daudé
Since previous commit allowed the use of accelerator definitions in common code, we can now move sbsa-ref.c to arm_common_ss[]. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build

[RFC PATCH-for-10.1 35/39] hw/arm/virt: Replace TARGET_AARCH64 -> target_long_bits()

2025-04-03 Thread Philippe Mathieu-Daudé
Replace the target-specific TARGET_AARCH64 definition by a call to the generic target_long_bits() helper. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c i

Re: [PATCH v6 41/60] hw/i386: add option to forcibly report edge trigger in acpi tables

2025-04-03 Thread witalihaschyts
Sent from my iPhone

[PATCH] hw/ipmi: Allow multiple BMC instances

2025-04-03 Thread Corey Minyard
Allow a system to have multiple BMC connections to the same BMC and multiple different BMCs. This can happen on real systems, and is useful for testing the IPMI driver on Linux. Signed-off-by: Corey Minyard --- I'm working on a fairly extensive test suite for IPMI, the Linux driver and qemu, and

Re: [PATCH v2 1/5] target/riscv: pmp: don't allow RLB to bypass rule privileges

2025-04-03 Thread Alistair Francis
On Fri, Mar 14, 2025 at 5:32 AM Loïc Lefort wrote: > > When Smepmp is supported, mseccfg.RLB allows bypassing locks when writing CSRs > but should not affect interpretation of actual PMP rules. > > This is not the case with the current implementation where pmp_hart_has_privs > calls pmp_is_locked

Re: [PATCH v2 2/5] target/riscv: pmp: move Smepmp operation conversion into a function

2025-04-03 Thread Alistair Francis
On Fri, Mar 14, 2025 at 5:33 AM Loïc Lefort wrote: > > Signed-off-by: Loïc Lefort > Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > target/riscv/pmp.c | 22 -- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/target

[PULL 0/6] tcg patch queue for 10.0-rc3

2025-04-03 Thread Richard Henderson
The following changes since commit 0adf626718bc0ca9c46550249a76047f8e45da15: Update version for v10.0.0-rc2 release (2025-04-01 13:15:45 -0400) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20250403 for you to fetch changes up to

[PULL 5/6] tests/qtest: Skip Aarch64 VMapple machine

2025-04-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé First, the VMapple machine only works with the ARM 'host' CPU type, which isn't accepted for QTest: $ qemu-system-aarch64 -M vmapple -accel qtest qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF Second, the QTest framework expects machin

Re: [PATCH v2 4/5] target/riscv: pmp: exit csr writes early if value was not changed

2025-04-03 Thread Alistair Francis
On Fri, Mar 14, 2025 at 5:33 AM Loïc Lefort wrote: > > Signed-off-by: Loïc Lefort > Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > target/riscv/pmp.c | 22 +++--- > 1 file changed, 15 insertions(+), 7 deletions(-) > > diff --git a/target/

[PULL 6/6] hw/arm: Do not build VMapple machine by default

2025-04-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Unfortunately as of v10.0.0-rc2 the VMapple machine is unusable: $ qemu-system-aarch64 -M vmapple [...] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PGIOSurfaceHostDeviceDescriptor setMapMemory:]: unrecognized sele

[PULL 3/6] tests/functional: Add a decorator for skipping tests on particular OS

2025-04-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Since tests might be failing on some operating systems, introduce the skipIfOperatingSystem() decorator. Acked-by: Michael S. Tsirkin Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-ID: <20250403203241

[PULL 4/6] tests/functional: Skip aarch64_replay test on macOS

2025-04-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé As of v10.0.0-rc2 this test is still failing on macos: $ make check-functional-aarch64 V=1 ... ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked()) Bail out! ERROR:../../replay/replay-internal.c:235:replay_m

[RFC PATCH-for-10.1 13/19] accel: Replace CPU_RESOLVING_TYPE -> target_cpu_type()

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/accel-target.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accel/accel-target.c b/accel/accel-target.c index 33a539b4cbb..9e9e70be876 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -25,6 +25,7 @@ #in

Re: [PATCH v2 5/5] target/riscv: pmp: remove redundant check in pmp_is_locked

2025-04-03 Thread Alistair Francis
On Fri, Mar 14, 2025 at 5:35 AM Loïc Lefort wrote: > > Remove useless check in pmp_is_locked, the function will return 0 in either > case. > > Signed-off-by: Loïc Lefort > Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > target/riscv/pmp.c | 5 - > 1 f

[PATCH-for-10.0 v3 4/5] tests/qtest: Skip Aarch64 VMapple machine

2025-04-03 Thread Philippe Mathieu-Daudé
First, the VMapple machine only works with the ARM 'host' CPU type, which isn't accepted for QTest: $ qemu-system-aarch64 -M vmapple -accel qtest qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF Second, the QTest framework expects machines to be createable without spe

Re: [PATCH v2 0/5] target/riscv: Smepmp fixes to match specification

2025-04-03 Thread Alistair Francis
On Fri, Mar 14, 2025 at 5:33 AM Loïc Lefort wrote: > > These patches fix Smepmp implementation to make it compliant with the spec. > > First patch limits RLB to CSR changes since RLB should not affect privilege > evaluation. Patch 2 extracts some common code into a function (to be used in > patch

Re: [PATCH-for-10.1 00/24] cpus: Restrict SoftMMU mmu_index() to TCG

2025-04-03 Thread Richard Henderson
On 4/1/25 01:09, Philippe Mathieu-Daudé wrote: mmu_index() is specific to TCG SoftMMU, moveCPUClass::mmu_index() toTCGCPUOps::mmu_index(). Philippe Mathieu-Daudé (24): hw/core/cpu: UpdateCPUClass::mmu_index docstring accel/tcg: IntroduceTCGCPUOps::mmu_index() callback target/alpha: Rest

[PULL 2/6] tests/functional/test_aarch64_rme_virt: fix sporadic failure

2025-04-03 Thread Richard Henderson
From: Pierrick Bouvier This test was randomly failing on our CI, and on dev machines, especially with QEMU debug builds. >From the information collected, it's related to an implementation choice in edk2 QEMU virt support. The workaround is to disable KASLR, to avoid accessing protected memory. N

Re: [PATCH 0/1 v2] [RISCV/RVV] Generate strided vector loads/stores with tcg nodes.

2025-04-03 Thread Alistair Francis
On Thu, Mar 13, 2025 at 1:57 AM Paolo Savini wrote: > > Previous version: > > - PATCH v1: > https://lore.kernel.org/all/20250211182056.412867-1-paolo.sav...@embecosm.com/ > > Follwing the suggestion in the following review by Daniel Barboza: > > https://lore.kernel.org/all/9be2ecc4-fed3-4774-a921

Re: [PATCH v3 1/6] hw/misc: Add MPFS system reset support

2025-04-03 Thread Alistair Francis
On Wed, Mar 19, 2025 at 4:13 PM Sebastian Huber wrote: > > Signed-off-by: Sebastian Huber Acked-by: Alistair Francis Alistair > --- > hw/misc/mchp_pfsoc_sysreg.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/hw/misc/mchp_pfsoc_sysreg.c b/hw/misc/mchp_pfsoc_sysreg.c > index

Re: [PATCH v3 3/6] hw/riscv: Make FDT optional for MPFS

2025-04-03 Thread Alistair Francis
On Wed, Mar 19, 2025 at 4:13 PM Sebastian Huber wrote: > > Real-time kernels such as RTEMS or Zephyr may use a static device tree > built into the kernel image. Do not require to use the -dtb option if > -kernel is used for the microchip-icicle-kit machine. Issue a warning > if no device tree is

Re: [PATCH v3 4/6] hw/riscv: Allow direct start of kernel for MPFS

2025-04-03 Thread Alistair Francis
On Wed, Mar 19, 2025 at 4:13 PM Sebastian Huber wrote: > > Further customize the -bios and -kernel options behaviour for the > microchip-icicle-kit machine. If "-bios none -kernel filename" is > specified, then do not load a firmware and instead only load and start > the kernel image. > > For tes

Re: [PATCH v3 5/6] hw/riscv: Configurable MPFS CLINT timebase freq

2025-04-03 Thread Alistair Francis
On Wed, Mar 19, 2025 at 4:13 PM Sebastian Huber wrote: > > This property enables the setting of the CLINT timebase frequency > through the command line, for example: > > -machine microchip-icicle-kit,clint-timebase-frequency=1000 > > Signed-off-by: Sebastian Huber > Reviewed-by: Philippe Ma

Re: [PATCH 14/15] fuse: Implement multi-threading

2025-04-03 Thread Eric Blake
On Wed, Apr 02, 2025 at 09:20:33AM -0400, Stefan Hajnoczi wrote: > > > Eric: Are you interested in implementing support for multiple IOThreads > > > in the NBD export? I remember some time ago we talked about NBD > > > multi-conn support, although maybe that was for the client rather than > > > the

[RFC PATCH-for-10.1 07/39] hw/arm/raspi: Filter machine types for binary

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 4 hw/arm/raspi.c | 9 + hw/arm/raspi4b.c | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 95e16806fa1..7dd81e8e0f9 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm

[RFC PATCH-for-10.1 04/39] hw/arm: Filter machine types for binary

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/b-l475e-iot01a.c | 1 + hw/arm/collie.c | 1 + hw/arm/exynos4_boards.c | 1 + hw/arm/fby35.c| 1 + hw/arm/highbank.c | 2 ++ hw/arm/microbit.c | 1 + hw/arm/mps2-tz.c | 4 hw/arm/mps2.c

[RFC PATCH-for-10.1 24/39] hw/arm/virt-acpi: Replace arm_feature() -> arm_cpu_has_feature()

2025-04-03 Thread Philippe Mathieu-Daudé
Using arm_cpu_has_feature() instead of arm_feature() remove a dependency on (the indirectly included) "cpu.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- hw/arm/virt-acpi-build.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/arm/vir

[PULL 1/6] tcg: Allocate TEMP_VAL_MEM frame in temp_load()

2025-04-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Be sure to allocate the temp frame if it wasn't. In the resolved issues, incomplete dead code elimination left a load at the top of an unreachable loop. We simply need to allocate the stack slot to avoid crashing. Fixes: c896fe29d6c ("TCG code generator") Reported-

[RFC PATCH-for-10.1 12/39] target/arm/cpu-features: Include missing 'cpu.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
"target/arm/cpu-features.h" dereferences the ARMISARegisters structure, which is defined in "cpu.h". Include the latter to avoid when refactoring unrelated headers: In file included from target/arm/internals.h:33: target/arm/cpu-features.h:45:54: error: unknown type name 'ARMISARegisters'

Re: [PATCH-for-10.1 v3 7/9] hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled)

2025-04-03 Thread Gustavo Romero
Hi Phil, On 4/3/25 17:40, Philippe Mathieu-Daudé wrote: Citing Gustavo [*]: Gating IORT table generation entirely based on the presence of ITS looks wrong because IORT table has data beyond GIC ITS, like for SMMUv3 etc.. [*] https://lore.kernel.org/qemu-devel/bae6e29a-7290-47d2-8caf-

Re: [RFC PATCH] Hexagon (target/hexagon) analyze all reads before writes

2025-04-03 Thread Brian Cain
On 3/24/2025 9:14 PM, Taylor Simpson wrote: I noticed that analyze_packet is marking the implicit pred reads after marking all the writes. However, the semantics of the instrucion and packet are to do all the reads, then do the operation, then do all the writes. Here is the old code static vo

Re: [PATCH-for-10.1 1/4] target/riscv: Restrict RV128 MTTCG check on system emulation

2025-04-03 Thread Alistair Francis
On Thu, Apr 3, 2025 at 12:41 AM Philippe Mathieu-Daudé wrote: > > On 2/4/25 16:25, Philippe Mathieu-Daudé wrote: > > On 23/3/25 19:08, Richard Henderson wrote: > >> On 3/21/25 08:59, Philippe Mathieu-Daudé wrote: > >>> Multi-threaded TCG only concerns system emulation. > >> > >> That's not really

Re: [PATCH 2/4] hw/intc: riscv_aclint: Fix mtime write for sstc extension

2025-04-03 Thread Alistair Francis
On Thu, Mar 20, 2025 at 5:24 AM Jim Shu wrote: > > When changing the mtime value, the period of [s|vs]timecmp timers > should also be updated like the period of mtimecmp timer. Why should they be updated? Alistair > > Signed-off-by: Jim Shu > --- > hw/intc/riscv_aclint.c | 5 + > 1 file c

[PATCH-for-10.1 v3 06/19] exec: Restrict 'cpu_ldst.h' to accel/tcg/

2025-04-03 Thread Philippe Mathieu-Daudé
Mechanical change using: $ sed -i -e 's,exec/cpu_ldst,accel/tcg/cpu-ldst,' \ $(git grep -l exec/cpu_ldst.h) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 2 +- include/{exec/

[PATCH-for-10.0 v3 0/5] hw/arm: Tests fixes for 10.0

2025-04-03 Thread Philippe Mathieu-Daudé
Hi, I tried to gather all the hw/arm/-related patches for the GitLab issues tagged for 10.0: - trivial ones fixing / disabling broken tests - disable the VMapple machine (not sure about it) Regards, Phil. Since v2: - Reword skipIfOperatingSystem() decorator - Dropped ACPI patches Philippe Mat

Re: [PATCH 3/4] target/riscv: Fix VSTIP bit in sstc extension.

2025-04-03 Thread Alistair Francis
On Thu, Mar 20, 2025 at 5:24 AM Jim Shu wrote: > > VSTIP is only writable when both [mh]envcfg.STCE is enabled, or it will > revert it's defined behavior as if sstc extension is not implemented. > > Signed-off-by: Jim Shu Acked-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 9 +++

[RFC PATCH-for-10.1 16/39] hw/arm: Remove unnecessary 'cpu.h' header

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- hw/arm/exynos4210.c | 1 - hw/arm/highbank.c | 1 - hw/arm/mps3r.c | 1 - hw/arm/smmuv3.c | 1 - 4 files changed, 4 deletions(-) diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index b452470598b..044393643

[RFC PATCH-for-10.1 04/19] qemu: Convert target_words_bigendian() to TargetInfo API

2025-04-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/exec/tswap.h| 13 + include/qemu/target_info-impl.h | 4 include/qemu/target_info.h | 11 +++ cpu-target.c| 6 -- hw/core/cpu-system.c| 2 +- hw/display/vga.c

[PATCH 0/2] fix deadlock with plugins reset/uninstall

2025-04-03 Thread Pierrick Bouvier
We first fix the issue reported in [1]. We then add a test plugin making sure we don't regress in the future. [1] https://gitlab.com/qemu-project/qemu/-/issues/2901 Pierrick Bouvier (2): plugins/loader: fix deadlock when resetting/uninstalling a plugin tests/tcg/plugins: add plugin to test re

[PATCH 2/2] tests/tcg/plugins: add plugin to test reset and uninstall

2025-04-03 Thread Pierrick Bouvier
We perform a plugin reset, uninstall, and make sure we went through those steps. Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/reset.c | 73 +++ tests/tcg/plugins/meson.build | 2 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644

[PATCH 1/2] plugins/loader: fix deadlock when resetting/uninstalling a plugin

2025-04-03 Thread Pierrick Bouvier
Reported and fixed by Dmitry Kurakin. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2901 Signed-off-by: Pierrick Bouvier --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 7523d554f03..0d6e082e170 100644 --- a

<    1   2   3   >