KVM: SVM: Fix off-by-one indexing when nullifying last used SEV VMCB
[linux-2.6-microblaze.git] / arch / x86 / kvm / svm / sev.c
index 6710d9e..4d0aba1 100644 (file)
@@ -189,7 +189,7 @@ static void sev_asid_free(struct kvm_sev_info *sev)
 
        for_each_possible_cpu(cpu) {
                sd = per_cpu(svm_data, cpu);
-               sd->sev_vmcbs[pos] = NULL;
+               sd->sev_vmcbs[sev->asid] = NULL;
        }
 
        mutex_unlock(&sev_bitmap_lock);