Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297084
b: refs/heads/master
c: 7d82714
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Graf authored and Avi Kivity committed Mar 5, 2012
1 parent 45b10b5 commit 797c003
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: dfd4d47e9a71c5a35eb67a44cd311efbe1846b7e
refs/heads/master: 7d82714d4d1293edc57439c796750310866624b2
13 changes: 11 additions & 2 deletions trunk/arch/powerpc/kvm/book3s_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
run->ready_for_interrupt_injection = 1;

trace_kvm_book3s_exit(exit_nr, vcpu);
preempt_enable();
kvm_resched(vcpu);
switch (exit_nr) {
case BOOK3S_INTERRUPT_INST_STORAGE:
Expand Down Expand Up @@ -761,6 +762,8 @@ 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! */
Expand Down Expand Up @@ -923,18 +926,22 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
#endif
ulong ext_msr;

preempt_disable();

/* Check if we can run the vcpu at all */
if (!vcpu->arch.sane) {
kvm_run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
return -EINVAL;
ret = -EINVAL;
goto out;
}

kvmppc_core_prepare_to_enter(vcpu);

/* No need to go into the guest when all we do is going out */
if (signal_pending(current)) {
kvm_run->exit_reason = KVM_EXIT_INTR;
return -EINTR;
ret = -EINTR;
goto out;
}

/* Save FPU state in stack */
Expand Down Expand Up @@ -1004,6 +1011,8 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
current->thread.used_vsr = used_vsr;
#endif

out:
preempt_enable();
return ret;
}

Expand Down

0 comments on commit 797c003

Please sign in to comment.