Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7d8fece6 authored by Glauber Costa's avatar Glauber Costa Committed by Avi Kivity
Browse files

KVM: Don't destroy vcpu in case vcpu_setup fails



One of vcpu_setup responsibilities is to do mmu initialization.
However, in case we fail in kvm_arch_vcpu_reset, before we get the
chance to init mmu. OTOH, vcpu_destroy will attempt to destroy mmu,
triggering a bug. Keeping track of whether or not mmu is initialized
would unnecessarily complicate things. Rather, we just make return,
making sure any needed uninitialization is done before we return, in
case we fail.

Signed-off-by: default avatarGlauber Costa <glommer@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent af2152f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment