diff options
author | Like Xu <likexu@tencent.com> | 2022-03-01 20:49:41 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-03-02 10:55:58 -0500 |
commit | c6c937d673aaa1d603f62f134e1ca9c173eeeed3 (patch) | |
tree | 2c0aab27010170b61be15ceddf408fdf7b6d3ec2 /arch | |
parent | 9ee83635d872812f3920209c606c6ea9e412ffcc (diff) | |
download | linux-c6c937d673aaa1d603f62f134e1ca9c173eeeed3.tar.bz2 |
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: 4a38162ee9f1 ("KVM: MMU: load PDPTRs outside mmu_lock")
Signed-off-by: Like Xu <likexu@tencent.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220301124941.48412-1-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c index 8e24f73bf60b..5628d0ba637e 100644 --- a/arch/x86/kvm/mmu/mmu.c +++ b/arch/x86/kvm/mmu/mmu.c @@ -3565,7 +3565,7 @@ set_root_pgd: out_unlock: write_unlock(&vcpu->kvm->mmu_lock); - return 0; + return r; } static int mmu_alloc_special_roots(struct kvm_vcpu *vcpu) |