On 28/07/2015 01:17, Steve Rutherford wrote: > + > + if (irqchip_in_kernel(vcpu->kvm) && !pic_in_kernel(vcpu->kvm) && > + vcpu->arch.pending_external_vector == -1) { > + vcpu->arch.pending_external_vector = irq->irq; > + return 0; > + } else if (irqchip_in_kernel(vcpu->kvm) && !pic_in_kernel(vcpu->kvm)) > + return -EEXIST; > + else if (irqchip_in_kernel(vcpu->kvm)) > return -ENXIO; This is better written as: if (!irqchip_in_kernel(vcpu->kvm)) { kvm_queue_interrupt(vcpu, irq->irq, false); kvm_make_request(KVM_REQ_EVENT, vcpu); return 0; } /* * With in-kernel LAPIC, we only use this to inject EXTINT, so * fail for in-kernel 8259. */ if (pic_in_kernel(vcpu->kvm)) { return -ENXIO; if (vcpu->arch.pending_external_vector != -1) return -EEXIST; vcpu->arch.pending_external_vector = irq->irq; return 0; Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html