]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/intc/arm_gicv3_kvm: preserve pending interrupts during cpr
authorSteve Sistare <steven.sistare@oracle.com>
Tue, 26 Aug 2025 10:21:28 +0000 (11:21 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 30 Aug 2025 15:37:22 +0000 (16:37 +0100)
commit376cdd7e9c94f1e03b2c58e068e8ebfe78b49514
tree0359718c9ff3f3d476330beff58eac7a20d5a350
parent6e6d5fb4b928f09b46d0fa99830d75cddb22f73b
hw/intc/arm_gicv3_kvm: preserve pending interrupts during cpr

Close a race condition that causes cpr-transfer to lose VFIO
interrupts on ARM.

CPR stops VCPUs but does not disable VFIO interrupts, which may continue
to arrive throughout the transition to new QEMU.

CPR calls kvm_irqchip_remove_irqfd_notifier_gsi in old QEMU to force
future interrupts to the producer eventfd, where they are preserved.
Old QEMU then destroys the old KVM instance.  However, interrupts may
already be pending in KVM state.  To preserve them, call ioctl
KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES to flush them to guest RAM, where
they will be picked up when the new KVM+VCPU instance is created.

Cc: qemu-stable@nongnu.org
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-id: 1754936384-278328-1-git-send-email-steven.sistare@oracle.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/intc/arm_gicv3_kvm.c
include/hw/intc/arm_gicv3_common.h