summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-03-13 23:31:02 +0100
committerPaul Mackerras <paulus@samba.org>2012-04-03 16:42:39 +1000
commit592f5d87b3feee9d60411f19d583038c0c7670ad (patch)
treedd357ccd3a4757965a9a27ab62ad8d849a4dc28b /arch/powerpc
parente1f8acf8380abfd52aefbfa524e74af5ce0c8492 (diff)
downloadlinux-592f5d87b3feee9d60411f19d583038c0c7670ad.tar.gz
linux-592f5d87b3feee9d60411f19d583038c0c7670ad.tar.bz2
linux-592f5d87b3feee9d60411f19d583038c0c7670ad.zip
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>
Diffstat (limited to 'arch/powerpc')
-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:
}
}
+ preempt_disable();
if (!(r & RESUME_HOST)) {
/* To avoid clobbering exit_reason, only check for signals if
* we aren't already exiting to userspace for some other
@@ -798,8 +799,6 @@ program_interrupt:
run->exit_reason = KVM_EXIT_INTR;
r = -EINTR;
} else {
- preempt_disable();
-
/* In case an interrupt came in that was triggered
* from userspace (like DEC), we need to check what
* to inject now! */