Skip to content

Commit

Permalink
kvm/ppc/booke: Delay kvmppc_lazy_ee_enable
Browse files Browse the repository at this point in the history
kwmppc_lazy_ee_enable() should be called as late as possible,
or else we get things like WARN_ON(preemptible()) in enable_kernel_fp()
in configurations where preemptible() works.

Note that book3s_pr already waits until just before __kvmppc_vcpu_run
to call kvmppc_lazy_ee_enable().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Scott Wood authored and Paolo Bonzini committed Jun 19, 2013
1 parent 764bcbc commit f8941fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,6 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
ret = s;
goto out;
}
kvmppc_lazy_ee_enable();

kvm_guest_enter();

Expand All @@ -699,6 +698,8 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
kvmppc_load_guest_fp(vcpu);
#endif

kvmppc_lazy_ee_enable();

ret = __kvmppc_vcpu_run(kvm_run, vcpu);

/* No need for kvm_guest_exit. It's done in handle_exit.
Expand Down

0 comments on commit f8941fb

Please sign in to comment.