On Thu, 16 Oct 2025 at 13:17, Salil Mehta <[email protected]> wrote: > > Hi Peter, > > > From: [email protected] <qemu- > > [email protected]> On Behalf Of Peter > > Maydell > > Sent: Tuesday, October 14, 2025 11:25 AM > > To: [email protected] > > Cc: Salil Mehta <[email protected]>; Marc Zyngier <[email protected]> > > Subject: [PATCH] hw/intc/arm_gicv3_kvm: Avoid reading ICC_CTLR_EL1 from > > kernel in cpuif reset > > > > Currently in arm_gicv3_icc_reset() we read the kernel's value of > > ICC_CTLR_EL1 as part of resetting the CPU interface. This mostly works, but > > we're actually breaking an assumption the kernel makes that userspace only > > accesses the in-kernel GIC data when the VM is totally paused, which may > > not be the case if a single vCPU is being reset. The effect is that it's > > possible > > that the read attempt returns EBUSY. > > > > Avoid this by reading the kernel's value of the reset ICC_CTLR_EL1 once in > > device realize. This brings ICC_CTLR_EL1 into line with the other cpuif > > registers, where we assume we know what the kernel is resetting them to > > and just update QEMU's data structures in arm_gicv3_icc_reset(). > > > > Signed-off-by: Peter Maydell <[email protected]> > > --- > > I've only tested this fairly lightly, but it seems to work. > > Salil, does this fix the EBUSY issues you were seeing ? > > > Would you be absorbing this in your tree now or should I make it part > of the RFC V7 ? > > Reviewed-by: Salil Mehta <[email protected]> > Tested-by: Salil Mehta <[email protected]>
Thanks for the testing. I'll pull it into target-arm.next since it does fix a potential issue with the current codebase. -- PMM
