]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic: Check that new ITEs could be saved in guest memory
authorRicardo Koller <ricarkol@google.com>
Tue, 10 May 2022 00:16:30 +0000 (17:16 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 16 May 2022 12:58:04 +0000 (13:58 +0100)
commit8c3856ae5d7479c32d81dbf9c2d840d7d63d3c70
treed997f028d800b75ba33e1179839e756da8b952ec
parent8dd3e26bbbc758feb75d55e38f0ba1ef6979f6d1
KVM: arm64: vgic: Check that new ITEs could be saved in guest memory

Try to improve the predictability of ITS save/restores by failing
commands that would lead to failed saves. More specifically, fail any
command that adds an entry into an ITS table that is not in guest
memory, which would otherwise lead to a failed ITS save ioctl. There
are already checks for collection and device entries, but not for
ITEs.  Add the corresponding check for the ITT when adding ITEs.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220510001633.552496-2-ricarkol@google.com
arch/arm64/kvm/vgic/vgic-its.c