]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: KVM: Free the GIC FD when cleaning up in arch_timer
authorOliver Upton <oupton@google.com>
Wed, 6 Apr 2022 23:56:15 +0000 (23:56 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 7 Apr 2022 07:46:13 +0000 (08:46 +0100)
commitce03a3ed3021c13e8060b1a8e208e5857bbd9c98
tree3e6b7dd2b66f5460c076b2f2c0c71158a84d0433
parent6257a9d33cf92c1da0e0a1518f2934682836d545
selftests: KVM: Free the GIC FD when cleaning up in arch_timer

In order to correctly destroy a VM, all references to the VM must be
freed. The arch_timer selftest creates a VGIC for the guest, which
itself holds a reference to the VM.

Close the GIC FD when cleaning up a VM.

Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220406235615.1447180-4-oupton@google.com
tools/testing/selftests/kvm/aarch64/arch_timer.c