Commit c6c937d6 authored by Like Xu's avatar Like Xu Committed by Paolo Bonzini
Browse files

KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()



Just like on the optional mmu_alloc_direct_roots() path, once shadow
path reaches "r = -EIO" somewhere, the caller needs to know the actual
state in order to enter error handling and avoid something worse.

Fixes: 4a38162e ("KVM: MMU: load PDPTRs outside mmu_lock")
Signed-off-by: default avatarLike Xu <likexu@tencent.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20220301124941.48412-1-likexu@tencent.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 9ee83635
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3565,7 +3565,7 @@ static int mmu_alloc_shadow_roots(struct kvm_vcpu *vcpu)
out_unlock:
	write_unlock(&vcpu->kvm->mmu_lock);

	return 0;
	return r;
}

static int mmu_alloc_special_roots(struct kvm_vcpu *vcpu)