:p
atchew
Login
The following changes since commit dd3ee9c63d96b223c8d41bf5d65392eb898be626: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2026-03-30 13:54:56 +0100) are available in the Git repository at: https://gitlab.com/pm215/qemu.git tags/pull-target-arm-20260330 for you to fetch changes up to 36212b4e859d1ccb25ab37deac152d67421ac425: hw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values (2026-03-30 16:18:07 +0100) ---------------------------------------------------------------- target-arm queue: * target/arm: Don't skip access flag fault for AccessType_AT * hw/net/rocker: Avoid double-free of l2_flood.group_ids * MAINTAINERS updates * hw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values ---------------------------------------------------------------- Peter Maydell (4): hw/net/rocker: Avoid double-free of l2_flood.group_ids MAINTAINERS: Remove Riku Voipio MAINTAINERS: Remove Igor Mitsyanko hw/arm/xilinx_zynq: Use strcasecmp to parse boot-mode option values Zenghui Yu (1): target/arm: Don't skip access flag fault for AccessType_AT MAINTAINERS | 4 +--- hw/arm/xilinx_zynq.c | 8 ++++---- hw/net/rocker/rocker_of_dpa.c | 1 + target/arm/ptw.c | 18 ++++++++++-------- 4 files changed, 16 insertions(+), 15 deletions(-)
From: Zenghui Yu <zenghui.yu@linux.dev> As per the pseudo code from DDI0487 M.a.a (on J1-16021) AArch64.S1Walk(): // Check descriptor AF bit elsif (descriptor<10> == '0' && walkparams.ha == '0' && (!accdesc.acctype IN {AccessType_DC, AccessType_IC} || boolean IMPLEMENTATION_DEFINED "Generate access flag fault on IC/DC operations")) then fault.statuscode = Fault_AccessFlag; an access flag fault should be generated for AccessType_AT, if the AF bit is 0 and !param.ha. Besides, we should continue to not raise the access flag fault for in_debug = true which is what we've been doing previously (before commit efebeec13d07) for LPAE and is what intention of the debugger access codepath is. Cc: qemu-stable@nongnu.org Fixes: efebeec13d07 ("target/arm: Skip AF and DB updates for AccessType_AT") Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev> Message-id: 20260324160321.96347-1-zenghui.yu@linux.dev Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- target/arm/ptw.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index XXXXXXX..XXXXXXX 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -XXX,XX +XXX,XX @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw, descaddr &= ~(hwaddr)(page_size - 1); descaddr |= (address & (page_size - 1)); + if (likely(!ptw->in_debug)) { + /* Check descriptor AF bit */ + if (!(descriptor & (1 << 10)) && !param.ha) { + fi->type = ARMFault_AccessFlag; + goto do_fault; + } + } + /* * For AccessType_AT, DB is not updated (AArch64.SetDirtyFlag), * and it is IMPLEMENTATION DEFINED whether AF is updated @@ -XXX,XX +XXX,XX @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw, /* * Access flag. * If HA is enabled, prepare to update the descriptor below. - * Otherwise, pass the access fault on to software. */ - if (!(descriptor & (1 << 10))) { - if (param.ha) { - new_descriptor |= 1 << 10; /* AF */ - } else { - fi->type = ARMFault_AccessFlag; - goto do_fault; - } + if (!(descriptor & (1 << 10)) && param.ha) { + new_descriptor |= 1 << 10; /* AF */ } /* -- 2.43.0
In of_dpa_cmd_add_l2_flood(), we allocate memory for the group->l2_flood.group_ids array, freeing any previous array. However, in the error-exit path we free the group_ids memory but do not clear the pointer to NULL. This means that if the guest causes us to take the error-exit path and then later call the function again, we will try again to free the memory we already freed. Fix this by clearing the group_ids pointer in the error exit path, so we maintain the invariant of "either it points at allocated memory, or it is NULL" (both being valid to g_free()). Cc: qemu-stable@nongnu.org Fixes: dc488f88806 ("rocker: add new rocker switch device") Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3253 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20260324193530.375628-1-peter.maydell@linaro.org --- hw/net/rocker/rocker_of_dpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/rocker/rocker_of_dpa.c b/hw/net/rocker/rocker_of_dpa.c index XXXXXXX..XXXXXXX 100644 --- a/hw/net/rocker/rocker_of_dpa.c +++ b/hw/net/rocker/rocker_of_dpa.c @@ -XXX,XX +XXX,XX @@ static int of_dpa_cmd_add_l2_flood(OfDpa *of_dpa, OfDpaGroup *group, err_out: group->l2_flood.group_count = 0; g_free(group->l2_flood.group_ids); + group->l2_flood.group_ids = NULL; g_free(tlvs); return err; -- 2.43.0
Riku Voipio doesn't wish to be listed in MAINTAINERS any more; remove his email from the relevant sections. This moves the "overall usermode emulation" section to Orphan status. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20260323134741.4114629-2-peter.maydell@linaro.org --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index XXXXXXX..XXXXXXX 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -XXX,XX +XXX,XX @@ F: hw/core/resetcontainer.c Usermode Emulation ------------------ Overall usermode emulation -M: Riku Voipio <riku.voipio@iki.fi> -S: Odd Fixes +S: Orphan F: accel/tcg/user-exec*.c F: hw/core/cpu-user.c F: include/user/ -- 2.43.0
Igor Mitsyanko doesn't wish to be listed in MAINTAINERS any more; remove his email from the relevant sections. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20260323134741.4114629-3-peter.maydell@linaro.org --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index XXXXXXX..XXXXXXX 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -XXX,XX +XXX,XX @@ F: hw/display/dm163.c F: tests/qtest/dm163-test.c Exynos -M: Igor Mitsyanko <i.mitsyanko@gmail.com> M: Peter Maydell <peter.maydell@linaro.org> L: qemu-arm@nongnu.org S: Odd Fixes -- 2.43.0
In zynq_set_boot_mode() where we parse the string the user has set the boot-mode option to, we use strncasecmp(str, "qspi", 4) and so on. This is wrong, because it means that we will ignore any trailing junk on the end of the option string, and handle -machine boot-mode=sdXYZZY the same as -machine boot-mode=sd In the documentation we say: Supported values are ``jtag``, ``sd``, ``qspi`` and ``nor``. and that's obviously what we meant to implement. The correct tool for this job is a simple strcasecmp operation. Switch to that. We use the g_ascii_strcasecmp() rather than plain strcasecmp() because we're comparing ASCII strings here and don't want the potentially locale-specific behaviour that strcasecmp() implies (and we're trying to standardize on the glib function for this kind of string comparison). Fixes: 7df3747c92d13 ("hw/arm/xilinx_zynq: Add boot-mode property") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20260327145012.907264-1-peter.maydell@linaro.org --- hw/arm/xilinx_zynq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c index XXXXXXX..XXXXXXX 100644 --- a/hw/arm/xilinx_zynq.c +++ b/hw/arm/xilinx_zynq.c @@ -XXX,XX +XXX,XX @@ static void zynq_set_boot_mode(Object *obj, const char *str, ZynqMachineState *m = ZYNQ_MACHINE(obj); uint8_t mode = 0; - if (!strncasecmp(str, "qspi", 4)) { + if (!g_ascii_strcasecmp(str, "qspi")) { mode = 1; - } else if (!strncasecmp(str, "sd", 2)) { + } else if (!g_ascii_strcasecmp(str, "sd")) { mode = 5; - } else if (!strncasecmp(str, "nor", 3)) { + } else if (!g_ascii_strcasecmp(str, "nor")) { mode = 2; - } else if (!strncasecmp(str, "jtag", 4)) { + } else if (!g_ascii_strcasecmp(str, "jtag")) { mode = 0; } else { error_setg(errp, "%s boot mode not supported", str); -- 2.43.0
v3->v4: Windows headers define an INT type which clashed with an enum value name in arm_gicv3_its.c... The following changes since commit eae587e8e3694b1aceab23239493fb4c7e1a80f5: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-13' into staging (2021-09-13 11:00:30 +0100) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210913-3 for you to fetch changes up to 28e987a7e7edaa3ca7feeac65edca26145df8814: hw/arm/mps2.c: Mark internal-only I2C buses as 'full' (2021-09-13 21:01:08 +0100) ---------------------------------------------------------------- target-arm queue: * mark MPS2/MPS3 board-internal i2c buses as 'full' so that command line user-created devices are not plugged into them * Take an exception if PSTATE.IL is set * Support an emulated ITS in the virt board * Add support for kudo-bmc board * Probe for KVM_CAP_ARM_VM_IPA_SIZE when creating scratch VM * cadence_uart: Fix clock handling issues that prevented u-boot from running ---------------------------------------------------------------- Bin Meng (6): hw/misc: zynq_slcr: Correctly compute output clocks in the reset exit phase hw/char: cadence_uart: Disable transmit when input clock is disabled hw/char: cadence_uart: Move clock/reset check to uart_can_receive() hw/char: cadence_uart: Convert to memop_with_attrs() ops hw/char: cadence_uart: Ignore access when unclocked or in reset for uart_{read, write}() hw/char: cadence_uart: Log a guest error when device is unclocked or in reset Chris Rauer (1): hw/arm: Add support for kudo-bmc board. Marc Zyngier (1): hw/arm/virt: KVM: Probe for KVM_CAP_ARM_VM_IPA_SIZE when creating scratch VM Peter Maydell (5): target/arm: Take an exception if PSTATE.IL is set qdev: Support marking individual buses as 'full' hw/arm/mps2-tz.c: Add extra data parameter to MakeDevFn hw/arm/mps2-tz.c: Mark internal-only I2C buses as 'full' hw/arm/mps2.c: Mark internal-only I2C buses as 'full' Richard Henderson (1): target/arm: Merge disas_a64_insn into aarch64_tr_translate_insn Shashi Mallela (9): hw/intc: GICv3 ITS initial framework hw/intc: GICv3 ITS register definitions added hw/intc: GICv3 ITS command queue framework hw/intc: GICv3 ITS Command processing hw/intc: GICv3 ITS Feature enablement hw/intc: GICv3 redistributor ITS processing tests/data/acpi/virt: Add IORT files for ITS hw/arm/virt: add ITS support in virt GIC tests/data/acpi/virt: Update IORT files for ITS docs/system/arm/nuvoton.rst | 1 + hw/intc/gicv3_internal.h | 188 ++++- include/hw/arm/virt.h | 2 + include/hw/intc/arm_gicv3_common.h | 13 + include/hw/intc/arm_gicv3_its_common.h | 32 +- include/hw/qdev-core.h | 24 + target/arm/cpu.h | 1 + target/arm/kvm_arm.h | 4 +- target/arm/syndrome.h | 5 + target/arm/translate.h | 2 + hw/arm/mps2-tz.c | 92 ++- hw/arm/mps2.c | 12 +- hw/arm/npcm7xx_boards.c | 34 + hw/arm/virt.c | 29 +- hw/char/cadence_uart.c | 61 +- hw/intc/arm_gicv3.c | 14 + hw/intc/arm_gicv3_common.c | 13 + hw/intc/arm_gicv3_cpuif.c | 7 +- hw/intc/arm_gicv3_dist.c | 5 +- hw/intc/arm_gicv3_its.c | 1322 ++++++++++++++++++++++++++++++++ hw/intc/arm_gicv3_its_common.c | 7 +- hw/intc/arm_gicv3_its_kvm.c | 2 +- hw/intc/arm_gicv3_redist.c | 153 +++- hw/misc/zynq_slcr.c | 31 +- softmmu/qdev-monitor.c | 7 +- target/arm/helper-a64.c | 1 + target/arm/helper.c | 8 + target/arm/kvm.c | 7 +- target/arm/translate-a64.c | 255 +++--- target/arm/translate.c | 21 + hw/intc/meson.build | 1 + tests/data/acpi/virt/IORT | Bin 0 -> 124 bytes tests/data/acpi/virt/IORT.memhp | Bin 0 -> 124 bytes tests/data/acpi/virt/IORT.numamem | Bin 0 -> 124 bytes tests/data/acpi/virt/IORT.pxb | Bin 0 -> 124 bytes 35 files changed, 2144 insertions(+), 210 deletions(-) create mode 100644 hw/intc/arm_gicv3_its.c create mode 100644 tests/data/acpi/virt/IORT create mode 100644 tests/data/acpi/virt/IORT.memhp create mode 100644 tests/data/acpi/virt/IORT.numamem create mode 100644 tests/data/acpi/virt/IORT.pxb