Revert "FROMGIT: KVM: arm64: vgic-v3: Fix vcpu index comparison"

This reverts commit d11273c6b3.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ibfdd432ac711a871576c40d25cce9af7a1233bac
This commit is contained in:
Will Deacon
2022-07-07 15:51:52 +01:00
parent 056550b1ed
commit 3fba2cc0c0

View File

@@ -763,12 +763,10 @@ static int vgic_register_all_redist_iodevs(struct kvm *kvm)
}
if (ret) {
/* The current c failed, so iterate over the previous ones. */
int i;
/* The current c failed, so we start with the previous one. */
mutex_lock(&kvm->slots_lock);
for (i = 0; i < c; i++) {
vcpu = kvm_get_vcpu(kvm, i);
for (c--; c >= 0; c--) {
vcpu = kvm_get_vcpu(kvm, c);
vgic_unregister_redist_iodev(vcpu);
}
mutex_unlock(&kvm->slots_lock);