Skip to content

Commit

Permalink
kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()
Browse files Browse the repository at this point in the history
EE is hard-disabled on entry to kvmppc_handle_exit(), so call
hard_irq_disable() so that PACA_IRQ_HARD_DIS is set, and soft_enabled
is unset.

Without this, we get warnings such as arch/powerpc/kernel/time.c:300,
and sometimes host kernel hangs.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
  • Loading branch information
Scott Wood authored and Gleb Natapov committed Jun 11, 2013
1 parent f1e8902 commit 7c11c0c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,17 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
int s;
int idx;

#ifdef CONFIG_PPC64
WARN_ON(local_paca->irq_happened != 0);
#endif

/*
* We enter with interrupts disabled in hardware, but
* we need to call hard_irq_disable anyway to ensure that
* the software state is kept in sync.
*/
hard_irq_disable();

/* update before a new last_exit_type is rewritten */
kvmppc_update_timing_stats(vcpu);

Expand Down

0 comments on commit 7c11c0c

Please sign in to comment.