aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-03-13 18:31:02 -0400
committerPaul Mackerras <paulus@samba.org>2012-04-03 02:42:39 -0400
commit592f5d87b3feee9d60411f19d583038c0c7670ad (patch)
treedd357ccd3a4757965a9a27ab62ad8d849a4dc28b
parente1f8acf8380abfd52aefbfa524e74af5ce0c8492 (diff)
KVM: PPC: Book3S: PR: Fix preemption
We were leaking preemption counters. Fix the code to always toggle between preempt and non-preempt properly. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kvm/book3s_pr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
index a657c44b7fbc..7759053d391b 100644
--- a/arch/powerpc/kvm/book3s_pr.c
+++ b/arch/powerpc/kvm/book3s_pr.c
@@ -777,6 +777,7 @@ program_interrupt:
777 } 777 }
778 } 778 }
779 779
780 preempt_disable();
780 if (!(r & RESUME_HOST)) { 781 if (!(r & RESUME_HOST)) {
781 /* To avoid clobbering exit_reason, only check for signals if 782 /* To avoid clobbering exit_reason, only check for signals if
782 * we aren't already exiting to userspace for some other 783 * we aren't already exiting to userspace for some other
@@ -798,8 +799,6 @@ program_interrupt:
798 run->exit_reason = KVM_EXIT_INTR; 799 run->exit_reason = KVM_EXIT_INTR;
799 r = -EINTR; 800 r = -EINTR;
800 } else { 801 } else {
801 preempt_disable();
802
803 /* In case an interrupt came in that was triggered 802 /* In case an interrupt came in that was triggered
804 * from userspace (like DEC), we need to check what 803 * from userspace (like DEC), we need to check what
805 * to inject now! */ 804 * to inject now! */