Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343493
b: refs/heads/master
c: 5bd1cf1
h: refs/heads/master
i:
  343491: a89e58d
v: v3
  • Loading branch information
Scott Wood authored and Alexander Graf committed Oct 5, 2012
1 parent ac863a1 commit c88f67a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 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: adbb48a854bf8dee556dc42b96dd61503351a82d
refs/heads/master: 5bd1cf118533aba41b3fbd4834e6362a9237db71
1 change: 0 additions & 1 deletion trunk/arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,6 @@ int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)

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

Expand Down
14 changes: 9 additions & 5 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)
break;
}

vcpu->mode = IN_GUEST_MODE;

/*
* Reading vcpu->requests must happen after setting vcpu->mode,
* so we don't miss a request because the requester sees
* OUTSIDE_GUEST_MODE and assumes we'll be checking requests
* before next entering the guest (and thus doesn't IPI).
*/
smp_mb();

if (vcpu->requests) {
/* Make sure we process requests preemptable */
local_irq_enable();
Expand Down Expand Up @@ -111,11 +120,6 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)
#endif

kvm_guest_enter();

/* Going into guest context! Yay! */
vcpu->mode = IN_GUEST_MODE;
smp_wmb();

break;
}

Expand Down

0 comments on commit c88f67a

Please sign in to comment.