]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
KVM: arm: vgic: Fix limit condition when writing to GICD_I[CS]ACTIVER
authorMarc Zyngier <maz@kernel.org>
Tue, 14 Apr 2020 14:10:08 +0000 (15:10 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 25 May 2020 08:42:47 +0000 (10:42 +0200)
commit0c1b40f1a7f5d50dcc02b92695b0bec57595e034
tree290411e184eec25145793ff13a773127c9a9f7c9
parent14c7bf24bf709d806fda9c6a463ba61df69b5903
KVM: arm: vgic: Fix limit condition when writing to GICD_I[CS]ACTIVER

BugLink: https://bugs.launchpad.net/bugs/1878649
commit 1c32ca5dc6d00012f0c964e5fdd7042fcc71efb1 upstream.

When deciding whether a guest has to be stopped we check whether this
is a private interrupt or not. Unfortunately, there's an off-by-one bug
here, and we fail to recognize a whole range of interrupts as being
global (GICv2 SPIs 32-63).

Fix the condition from > to be >=.

Cc: stable@vger.kernel.org
Fixes: abd7229626b93 ("KVM: arm/arm64: Simplify active_change_prepare and plug race")
Reported-by: André Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
virt/kvm/arm/vgic/vgic-mmio.c