Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115226
b: refs/heads/master
c: 867767a
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Avi Kivity committed Oct 15, 2008
1 parent 2418086 commit 1e36f43
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d98e6346350ac909f095768beb28b82368bd126f
refs/heads/master: 867767a365ee74a3adcfaba27075eefb66b14bfd
11 changes: 11 additions & 0 deletions trunk/arch/x86/kvm/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@ void __kvm_migrate_timers(struct kvm_vcpu *vcpu)
__kvm_migrate_apic_timer(vcpu);
__kvm_migrate_pit_timer(vcpu);
}

/* This should be called with the kvm->lock mutex held */
void kvm_set_irq(struct kvm *kvm, int irq, int level)
{
/* Not possible to detect if the guest uses the PIC or the
* IOAPIC. So set the bit in both. The guest will ignore
* writes to the unused one.
*/
kvm_ioapic_set_irq(kvm->arch.vioapic, irq, level);
kvm_pic_set_irq(pic_irqchip(kvm), irq, level);
}
2 changes: 2 additions & 0 deletions trunk/arch/x86/kvm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ static inline int irqchip_in_kernel(struct kvm *kvm)

void kvm_pic_reset(struct kvm_kpic_state *s);

void kvm_set_irq(struct kvm *kvm, int irq, int level);

void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec);
void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu);
void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu);
Expand Down

0 comments on commit 1e36f43

Please sign in to comment.