]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic: Undo work in failed ITS restores
authorRicardo Koller <ricarkol@google.com>
Tue, 10 May 2022 00:16:33 +0000 (17:16 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 16 May 2022 12:58:04 +0000 (13:58 +0100)
commit58597cdabb86bbfd3f923a3c7594871f0e4fe789
tree67ec6f091b574d0f942132fa0d16760d81a84439
parent0168771f3cb8277f063b90dd618a5b2675b0d1e3
KVM: arm64: vgic: Undo work in failed ITS restores

Failed ITS restores should clean up all state restored until the
failure. There is some cleanup already present when failing to restore
some tables, but it's not complete. Add the missing cleanup.

Note that this changes the behavior in case of a failed restore of the
device tables.

restore ioctl:
1. restore collection tables
2. restore device tables

With this commit, failures in 2. clean up everything created so far,
including state created by 1.

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-5-ricarkol@google.com
arch/arm64/kvm/vgic/vgic-its.c