Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343467
b: refs/heads/master
c: 24afa37
h: refs/heads/master
i:
  343465: 5c8bb48
  343463: 749a968
v: v3
  • Loading branch information
Alexander Graf committed Oct 5, 2012
1 parent 4c0efeb commit 106e374
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 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: 0652eaaebea0995b3236e51dec727d62264f4248
refs/heads/master: 24afa37b9c8f035d2fe2028e4824bc4e49bafe73
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/kvm/book3s_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,12 +868,15 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
*/
__hard_irq_disable();
if (kvmppc_prepare_to_enter(vcpu)) {
/* local_irq_enable(); */
run->exit_reason = KVM_EXIT_INTR;
r = -EINTR;
} else {
/* Going back to guest */
kvm_guest_enter();
}
}

kvm_guest_enter();
trace_kvm_book3s_reenter(r, vcpu);

return r;
Expand Down Expand Up @@ -1123,7 +1126,8 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)

ret = __kvmppc_vcpu_run(kvm_run, vcpu);

kvm_guest_exit();
/* No need for kvm_guest_exit. It's done in handle_exit.
We also get here with interrupts enabled. */

current->thread.regs->msr = ext_msr;

Expand Down
13 changes: 8 additions & 5 deletions trunk/arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)

local_irq_disable();
if (kvmppc_prepare_to_enter(vcpu)) {
local_irq_enable();
kvm_run->exit_reason = KVM_EXIT_INTR;
ret = -EINTR;
goto out;
Expand Down Expand Up @@ -512,6 +513,9 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)

ret = __kvmppc_vcpu_run(kvm_run, vcpu);

/* No need for kvm_guest_exit. It's done in handle_exit.
We also get here with interrupts enabled. */

#ifdef CONFIG_PPC_FPU
kvmppc_save_guest_fp(vcpu);

Expand All @@ -527,12 +531,9 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
current->thread.fpexc_mode = fpexc_mode;
#endif

kvm_guest_exit();

out:
vcpu->mode = OUTSIDE_GUEST_MODE;
smp_wmb();
local_irq_enable();
return ret;
}

Expand Down Expand Up @@ -947,14 +948,16 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
if (!(r & RESUME_HOST)) {
local_irq_disable();
if (kvmppc_prepare_to_enter(vcpu)) {
local_irq_enable();
run->exit_reason = KVM_EXIT_INTR;
r = (-EINTR << 2) | RESUME_HOST | (r & RESUME_FLAG_NV);
kvmppc_account_exit(vcpu, SIGNAL_EXITS);
} else {
/* Going back to guest */
kvm_guest_enter();
}
}

kvm_guest_enter();

return r;
}

Expand Down

0 comments on commit 106e374

Please sign in to comment.