All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: arm/arm64: vgic: Use raw_spinlock for locks taken in IRQ context
@ 2018-11-19 17:07 ` Julien Thierry
  0 siblings, 0 replies; 21+ messages in thread
From: Julien Thierry @ 2018-11-19 17:07 UTC (permalink / raw)
  To: linux-kernel, kvmarm
  Cc: marc.zyngier, Christoffer.Dall, linux-arm-kernel, linux-rt-users,
	tglx, rostedt, bigeasy, Julien Thierry

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.
Patch 2-4 replace the VGIC spinlocks with raw_spinlocks

Cheers,

Julien

-->

Julien Thierry (4):
  KVM: arm/arm64: vgic: Do not cond_resched_lock() with IRQs disabled
  KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a raw_spinlock
  KVM: arm/arm64: vgic: Make vgic_dist->lpi_list_lock a raw_spinlock
  KVM: arm/arm64: vgic: Make vgic_cpu->ap_list_lock a raw_spinlock

 include/kvm/arm_vgic.h           |   6 +-
 virt/kvm/arm/vgic/vgic-debug.c   |   4 +-
 virt/kvm/arm/vgic/vgic-init.c    |   8 +--
 virt/kvm/arm/vgic/vgic-its.c     |  22 +++----
 virt/kvm/arm/vgic/vgic-mmio-v2.c |  14 ++---
 virt/kvm/arm/vgic/vgic-mmio-v3.c |  12 ++--
 virt/kvm/arm/vgic/vgic-mmio.c    |  67 +++++++++-----------
 virt/kvm/arm/vgic/vgic-v2.c      |   4 +-
 virt/kvm/arm/vgic/vgic-v3.c      |   8 +--
 virt/kvm/arm/vgic/vgic.c         | 130 +++++++++++++++++++--------------------
 10 files changed, 132 insertions(+), 143 deletions(-)

--
1.9.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-11-20 17:22 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 17:07 [PATCH 0/4] KVM: arm/arm64: vgic: Use raw_spinlock for locks taken in IRQ context Julien Thierry
2018-11-19 17:07 ` Julien Thierry
2018-11-19 17:07 ` [PATCH 1/4] KVM: arm/arm64: vgic: Do not cond_resched_lock() with IRQs disabled Julien Thierry
2018-11-19 17:07   ` Julien Thierry
2018-11-20 13:25   ` Sasha Levin
2018-11-20 14:18   ` Christoffer Dall
2018-11-20 14:18     ` Christoffer Dall
2018-11-20 14:37     ` Marc Zyngier
2018-11-20 14:37       ` Marc Zyngier
2018-11-20 17:22     ` Julien Thierry
2018-11-20 17:22       ` Julien Thierry
2018-11-19 17:07 ` [PATCH 2/4] KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a raw_spinlock Julien Thierry
2018-11-19 17:07   ` Julien Thierry
2018-11-19 17:07   ` Julien Thierry
2018-11-19 17:07 ` [PATCH 3/4] KVM: arm/arm64: vgic: Make vgic_dist->lpi_list_lock " Julien Thierry
2018-11-19 17:07   ` Julien Thierry
2018-11-19 17:07   ` Julien Thierry
2018-11-19 17:07 ` [PATCH 4/4] KVM: arm/arm64: vgic: Make vgic_cpu->ap_list_lock " Julien Thierry
2018-11-19 17:07   ` Julien Thierry
2018-11-20 14:20 ` [PATCH 0/4] KVM: arm/arm64: vgic: Use raw_spinlock for locks taken in IRQ context Christoffer Dall
2018-11-20 14:20   ` Christoffer Dall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.