diff options
author | Scott Wood <scottwood@freescale.com> | 2014-01-09 19:18:40 -0600 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-01-27 16:00:55 +0100 |
commit | 6c85f52b10fd60e45c6e30c5b85d116406bd3c9b (patch) | |
tree | e1fc869540a04f9003c26bd6d6598a8a848b8cd0 /arch/powerpc/kvm/book3s_pr.c | |
parent | 70713fe315ed14cd1bb07d1a7f33e973d136ae3d (diff) | |
download | linux-rt-6c85f52b10fd60e45c6e30c5b85d116406bd3c9b.tar.gz |
kvm/ppc: IRQ disabling cleanup
Simplify the handling of lazy EE by going directly from fully-enabled
to hard-disabled. This replaces the lazy_irq_pending() check
(including its misplaced kvm_guest_exit() call).
As suggested by Tiejun Chen, move the interrupt disabling into
kvmppc_prepare_to_enter() rather than have each caller do it. Also
move the IRQ enabling on heavyweight exit into
kvmppc_prepare_to_enter().
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_pr.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_pr.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index aedba681bb94..e82fafdaf880 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c @@ -999,14 +999,14 @@ program_interrupt: * and if we really did time things so badly, then we just exit * again due to a host external interrupt. */ - local_irq_disable(); s = kvmppc_prepare_to_enter(vcpu); - if (s <= 0) { - local_irq_enable(); + if (s <= 0) r = s; - } else { + else { + /* interrupts now hard-disabled */ kvmppc_fix_ee_before_entry(); } + kvmppc_handle_lost_ext(vcpu); } @@ -1219,12 +1219,10 @@ static int kvmppc_vcpu_run_pr(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) * really did time things so badly, then we just exit again due to * a host external interrupt. */ - local_irq_disable(); ret = kvmppc_prepare_to_enter(vcpu); - if (ret <= 0) { - local_irq_enable(); + if (ret <= 0) goto out; - } + /* interrupts now hard-disabled */ /* Save FPU state in thread_struct */ if (current->thread.regs->msr & MSR_FP) |