aboutsummaryrefslogtreecommitdiff
path: root/hw/avr/arduino.c
diff options
context:
space:
mode:
authorZenghui Yu <zenghui.yu@linux.dev>2025-07-30 00:16:50 +0800
committerPeter Maydell <peter.maydell@linaro.org>2025-08-01 16:48:50 +0100
commitb10bd4bd17ac8628ede8735a08ad82dc3b721c64 (patch)
tree6021c63cc4e70835342c7ed988e699d863991f8e /hw/avr/arduino.c
parenta0555e36fc44ea98edf7c50924de8b973cd4267d (diff)
downloadqemu-b10bd4bd17ac8628ede8735a08ad82dc3b721c64.zip
qemu-b10bd4bd17ac8628ede8735a08ad82dc3b721c64.tar.gz
qemu-b10bd4bd17ac8628ede8735a08ad82dc3b721c64.tar.bz2
hw/intc/arm_gicv3_kvm: Write all 1's to clear enable/active
KVM's userspace access interface to the GICD enable and active bits is via set/clear register pairs which implement the hardware's "write 1s to the clear register to clear the 0 bits, and write 1s to the set register to set the 1 bits" semantics. We didn't get this right, because we were writing 0 to the clear register. Writing 0 to GICD_IC{ENABLE,ACTIVE}R architecturally has no effect on interrupt status (all writes are simply ignored by KVM) and doesn't comply with the intention of "first write to the clear-reg to clear all bits". Write all 1's to actually clear the enable/active status. This didn't have any adverse effects on migration because there we start with a clean VM state; it would be guest-visible when doing a system reset, but since Linux always cleans up the register state of the GIC during bootup before it enables it most users won't have run into a problem here. Cc: qemu-stable@nongnu.org Fixes: 367b9f527bec ("hw/intc/arm_gicv3_kvm: Implement get/put functions") Signed-off-by: Zenghui Yu <zenghui.yu@linux.dev> Message-id: 20250729161650.43758-3-zenghui.yu@linux.dev Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/avr/arduino.c')
0 files changed, 0 insertions, 0 deletions