aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorTiejun Chen <tiejun.chen@windriver.com>2013-10-22 21:26:48 -0400
committerAlexander Graf <agraf@suse.de>2014-01-09 04:15:10 -0500
commit9bd880a2c882d2181b1eaba0aed422cced8f0e8a (patch)
tree04d627755115ed0d56e2538f0c7436dd0fff60c3 /arch/powerpc/kvm
parent08c9a188d0d0fc0f0c5e17d89a06bb59c493110f (diff)
KVM: PPC: Book3E HV: call RECONCILE_IRQ_STATE to sync the software state
Rather than calling hard_irq_disable() when we're back in C code we can just call RECONCILE_IRQ_STATE to soft disable IRQs while we're already in hard disabled state. This should be functionally equivalent to the code before, but cleaner and faster. Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com> [agraf: fix comment, commit message] Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/booke.c11
-rw-r--r--arch/powerpc/kvm/bookehv_interrupts.S11
2 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 54ee1c01798f..6a8c32ec4173 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -879,17 +879,6 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
879 int s; 879 int s;
880 int idx; 880 int idx;
881 881
882#ifdef CONFIG_PPC64
883 WARN_ON(local_paca->irq_happened != 0);
884#endif
885
886 /*
887 * We enter with interrupts disabled in hardware, but
888 * we need to call hard_irq_disable anyway to ensure that
889 * the software state is kept in sync.
890 */
891 hard_irq_disable();
892
893 /* update before a new last_exit_type is rewritten */ 882 /* update before a new last_exit_type is rewritten */
894 kvmppc_update_timing_stats(vcpu); 883 kvmppc_update_timing_stats(vcpu);
895 884
diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index e8ed7d659c55..be3de1dd7bb3 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
@@ -33,6 +33,8 @@
33 33
34#ifdef CONFIG_64BIT 34#ifdef CONFIG_64BIT
35#include <asm/exception-64e.h> 35#include <asm/exception-64e.h>
36#include <asm/hw_irq.h>
37#include <asm/irqflags.h>
36#else 38#else
37#include "../kernel/head_booke.h" /* for THREAD_NORMSAVE() */ 39#include "../kernel/head_booke.h" /* for THREAD_NORMSAVE() */
38#endif 40#endif
@@ -465,6 +467,15 @@ _GLOBAL(kvmppc_resume_host)
465 mtspr SPRN_EPCR, r3 467 mtspr SPRN_EPCR, r3
466 isync 468 isync
467 469
470#ifdef CONFIG_64BIT
471 /*
472 * We enter with interrupts disabled in hardware, but
473 * we need to call RECONCILE_IRQ_STATE to ensure
474 * that the software state is kept in sync.
475 */
476 RECONCILE_IRQ_STATE(r3,r5)
477#endif
478
468 /* Switch to kernel stack and jump to handler. */ 479 /* Switch to kernel stack and jump to handler. */
469 PPC_LL r3, HOST_RUN(r1) 480 PPC_LL r3, HOST_RUN(r1)
470 mr r5, r14 /* intno */ 481 mr r5, r14 /* intno */