提交 592f5d87 编写于 作者: A Alexander Graf 提交者: Paul Mackerras

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: NAlexander Graf <agraf@suse.de>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 e1f8acf8
......@@ -777,6 +777,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
}
}
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 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
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! */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册