Skip to content

Commit

Permalink
KVM: pit: Do not check pending pit timer in vcpu thread
Browse files Browse the repository at this point in the history
Pit interrupt injection was done by workqueue, so no need to check
pending pit timer in vcpu thread which could lead unnecessary
unblocking of vcpu.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Jason Wang authored and Avi Kivity committed Oct 24, 2010
1 parent 989044e commit 23e7a79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
9 changes: 0 additions & 9 deletions arch/x86/kvm/i8254.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,6 @@ static void pit_latch_status(struct kvm *kvm, int channel)
}
}

int pit_has_pending_timer(struct kvm_vcpu *vcpu)
{
struct kvm_pit *pit = vcpu->kvm->arch.vpit;

if (pit && kvm_vcpu_is_bsp(vcpu) && pit->pit_state.irq_ack)
return atomic_read(&pit->pit_state.pit_timer.pending);
return 0;
}

static void kvm_pit_ack_irq(struct kvm_irq_ack_notifier *kian)
{
struct kvm_kpit_state *ps = container_of(kian, struct kvm_kpit_state,
Expand Down
7 changes: 1 addition & 6 deletions arch/x86/kvm/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@
*/
int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
{
int ret;

ret = pit_has_pending_timer(vcpu);
ret |= apic_has_pending_timer(vcpu);

return ret;
return apic_has_pending_timer(vcpu);
}
EXPORT_SYMBOL(kvm_cpu_has_pending_timer);

Expand Down

0 comments on commit 23e7a79

Please sign in to comment.