static void kvm_set_pic_irq(struct kvm_kernel_irq_routing_entry *e, struct kvm *kvm, int level) { #ifdef CONFIG_X86 kvm_pic_set_irq(pic_irqchip(kvm), e->irqchip.pin, level); #endif }
/* 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); #ifdef CONFIG_X86 kvm_pic_set_irq(pic_irqchip(kvm), irq, level); #endif }
static int kvm_set_pic_irq(struct kvm_kernel_irq_routing_entry *e, struct kvm *kvm, int irq_source_id, int level, bool line_status) { #ifdef CONFIG_X86 struct kvm_pic *pic = pic_irqchip(kvm); return kvm_pic_set_irq(pic, e->irqchip.pin, irq_source_id, level); #else return -1; #endif }