Mark reported that df5fd75ee305 ("KVM: arm64: Don't eagerly teardown the vgic on init error") causes vgic_init test assertion failure. This is due to the fact that now an incomplete vgic setup causes a KVM_REQ_VM_DEAD request to be sent. vgic_init test checks such kind of incomplete setups. As a consequence some KVM IOCTL's fail on the clean up path (kvm_vm_free) and cause assertion failures in the test. This series fixes that by checking the VM state and avoid to call KVM IOCTL's after the occcurence of such failure. Best regards Eric This series can be found at: https://github.com/eauger/linux/tree/vgic_init_dead_v1 Eric Auger (3): KVM: selftests: Introduce vm_dead() KVM: selftests: Introduce kvm_vm_dead_free KVM: selftests: Handle dead VM in vgic_init test .../testing/selftests/kvm/aarch64/vgic_init.c | 41 +++++++++++-------- .../testing/selftests/kvm/include/kvm_util.h | 28 +++++++++---- tools/testing/selftests/kvm/lib/kvm_util.c | 25 ++++++++--- 3 files changed, 62 insertions(+), 32 deletions(-) -- 2.41.0