Re: [PATCH 0/4] KVM: arm/arm64: vgic: Use raw_spinlock for locks taken in IRQ context

From: Christoffer Dall
Date: Tue Nov 20 2018 - 09:20:05 EST


On Mon, Nov 19, 2018 at 05:07:55PM +0000, Julien Thierry wrote:
> While testing KVM running on PREEMPT_RT, starting guest could simply
> freeze the machine. This is because we are using spinlocks for VGIC
> locks, which is invalid in the VGIC case since the locks must be take
> with interrupts disabled.
>
> The solution is to use raw_spinlock instead of spinlocks.
>
> Replacing those locks also highlighted an issue where we attempt to
> cond_resched with interrupts disabled.
>
> Patch 1 fixes the cond_resched issue.

I don't agree with this fix without seeing a more thorough analysis.

> Patch 2-4 replace the VGIC spinlocks with raw_spinlocks
>

For these:

Acked-by: Christoffer Dall <christoffer.dall@xxxxxxx>



Thanks,

Christoffer