OSDN Git Service

KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections
authorEric Auger <eric.auger@redhat.com>
Fri, 13 Dec 2019 09:42:37 +0000 (10:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:33:26 +0000 (16:33 -0500)
commit092c84fdac555086bec0d6de64274062d2add748
tree3be739e988256feb0cc14a56395af13724ad28e4
parent0703c46a76c1bb16e2d5a1e27349436351ba08a8
KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections

commit 8c58be34494b7f1b2adb446e2d8beeb90e5de65b upstream.

Saving/restoring an unmapped collection is a valid scenario. For
example this happens if a MAPTI command was sent, featuring an
unmapped collection. At the moment the CTE fails to be restored.
Only compare against the number of online vcpus if the rdist
base is set.

Fixes: ea1ad53e1e31a ("KVM: arm64: vgic-its: Collection table save/restore")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/20191213094237.19627-1-eric.auger@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/arm/vgic/vgic-its.c