linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] KVM: arm/arm64: vgic: Use raw_spinlock for locks taken in IRQ context
@ 2019-01-07 15:06 Julien Thierry
  2019-01-07 15:06 ` [PATCH v3 1/3] KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a raw_spinlock Julien Thierry
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Julien Thierry @ 2019-01-07 15:06 UTC (permalink / raw)
  To: linux-kernel, kvmarm
  Cc: marc.zyngier, Christoffer.Dall, linux-arm-kernel, linux-rt-users,
	tglx, rostedt, bigeasy, Julien Thierry

Hi,

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.

Changes since v2[1]:
- Rebase on v5.0-rc1
- Remove first patch from series as it has been applied

Changes since v1[2]:
- Rebase on v4.20-rc4
- Add Christoffer's Acked-by
- Fix potential lock up when waiting for vcpus to halt

[1] https://lkml.org/lkml/2018/11/27/20
[2] https://lkml.org/lkml/2018/11/19/776

Cheers,

Julien

-->

Julien Thierry (3):
  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    |  34 +++++------
 virt/kvm/arm/vgic/vgic-v2.c      |   4 +-
 virt/kvm/arm/vgic/vgic-v3.c      |   8 +--
 virt/kvm/arm/vgic/vgic.c         | 118 +++++++++++++++++++--------------------
 10 files changed, 115 insertions(+), 115 deletions(-)

--
1.9.1

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

end of thread, other threads:[~2019-02-01 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 15:06 [PATCH v3 0/3] KVM: arm/arm64: vgic: Use raw_spinlock for locks taken in IRQ context Julien Thierry
2019-01-07 15:06 ` [PATCH v3 1/3] KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a raw_spinlock Julien Thierry
2019-02-01 15:30   ` Julien Grall
2019-02-01 17:36     ` Julia Cartwright
2019-02-01 17:55       ` Julien Grall
2019-01-07 15:06 ` [PATCH v3 2/3] KVM: arm/arm64: vgic: Make vgic_dist->lpi_list_lock " Julien Thierry
2019-01-07 15:06 ` [PATCH v3 3/3] KVM: arm/arm64: vgic: Make vgic_cpu->ap_list_lock " Julien Thierry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).