Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307841
b: refs/heads/master
c: 03660ba
h: refs/heads/master
i:
  307839: ce8b474
v: v3
  • Loading branch information
Alexander Graf authored and Avi Kivity committed Apr 8, 2012
1 parent 979a2cc commit e02c125
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cc1e8ee78f469ecff8aa29465325f1e4c5e1b5f
refs/heads/master: 03660ba27020250eae0b5a2722e0c7bec4968c3c
18 changes: 10 additions & 8 deletions trunk/arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu)
*
* returns !0 if a signal is pending and check_signal is true
*/
static int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu, bool check_signal)
static int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)
{
int r = 0;

Expand All @@ -477,7 +477,7 @@ static int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu, bool check_signal)
continue;
}

if (check_signal && signal_pending(current)) {
if (signal_pending(current)) {
r = 1;
break;
}
Expand Down Expand Up @@ -509,7 +509,7 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
}

local_irq_disable();
if (kvmppc_prepare_to_enter(vcpu, true)) {
if (kvmppc_prepare_to_enter(vcpu)) {
kvm_run->exit_reason = KVM_EXIT_INTR;
ret = -EINTR;
goto out;
Expand Down Expand Up @@ -946,11 +946,13 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
* To avoid clobbering exit_reason, only check for signals if we
* aren't already exiting to userspace for some other reason.
*/
local_irq_disable();
if (kvmppc_prepare_to_enter(vcpu, !(r & RESUME_HOST))) {
run->exit_reason = KVM_EXIT_INTR;
r = (-EINTR << 2) | RESUME_HOST | (r & RESUME_FLAG_NV);
kvmppc_account_exit(vcpu, SIGNAL_EXITS);
if (!(r & RESUME_HOST)) {
local_irq_disable();
if (kvmppc_prepare_to_enter(vcpu)) {
run->exit_reason = KVM_EXIT_INTR;
r = (-EINTR << 2) | RESUME_HOST | (r & RESUME_FLAG_NV);
kvmppc_account_exit(vcpu, SIGNAL_EXITS);
}
}

return r;
Expand Down

0 comments on commit e02c125

Please sign in to comment.