KVM: arm64: vgic: Implement SW-driven deactivation
authorMarc Zyngier <maz@kernel.org>
Mon, 15 Mar 2021 13:11:58 +0000 (13:11 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 1 Jun 2021 09:46:00 +0000 (10:46 +0100)
commit354920e79441c8a53ac73008b06d3b70ed06eb34
treebbbf888458a716159eb5c8910d1dbc10655576fc
parentdb75f1a33f82ad332b6e139c5960e01999969d2c
KVM: arm64: vgic: Implement SW-driven deactivation

In order to deal with these systems that do not offer HW-based
deactivation of interrupts, let implement a SW-based approach:

- When the irq is queued into a LR, treat it as a pure virtual
  interrupt and set the EOI flag in the LR.

- When the interrupt state is read back from the LR, force a
  deactivation when the state is invalid (neither active nor
  pending)

Interrupts requiring such treatment get the VGIC_SW_RESAMPLE flag.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-v2.c
arch/arm64/kvm/vgic/vgic-v3.c
include/kvm/arm_vgic.h