Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343456
b: refs/heads/master
c: 4ffc635
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Graf committed Oct 5, 2012
1 parent f68960b commit 5c0677a
Show file tree
Hide file tree
Showing 2 changed files with 18 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: 8043e494da644ec174f7df0b67f88ccf8777a1ce
refs/heads/master: 4ffc6356ec690f77f65b7b78e0047a3fe8316371
24 changes: 17 additions & 7 deletions trunk/arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,6 @@ static void kvmppc_core_check_exceptions(struct kvm_vcpu *vcpu)
unsigned long *pending = &vcpu->arch.pending_exceptions;
unsigned int priority;

if (vcpu->requests) {
if (kvm_check_request(KVM_REQ_PENDING_TIMER, vcpu)) {
smp_mb();
update_timer_ints(vcpu);
}
}

priority = __ffs(*pending);
while (priority < BOOKE_IRQPRIO_MAX) {
if (kvmppc_booke_irqprio_deliver(vcpu, priority))
Expand Down Expand Up @@ -461,6 +454,14 @@ int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu)
return r;
}

static void kvmppc_check_requests(struct kvm_vcpu *vcpu)
{
if (vcpu->requests) {
if (kvm_check_request(KVM_REQ_PENDING_TIMER, vcpu))
update_timer_ints(vcpu);
}
}

/*
* Common checks before entering the guest world. Call with interrupts
* disabled.
Expand All @@ -485,6 +486,15 @@ static int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)
break;
}

smp_mb();
if (vcpu->requests) {
/* Make sure we process requests preemptable */
local_irq_enable();
kvmppc_check_requests(vcpu);
local_irq_disable();
continue;
}

if (kvmppc_core_prepare_to_enter(vcpu)) {
/* interrupts got enabled in between, so we
are back at square 1 */
Expand Down

0 comments on commit 5c0677a

Please sign in to comment.