/* check if there is pending interrupt without intack.  */
int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
/* check if there is pending interrupt without intack.  */
int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
{
	struct kvm_pic *s;
	if (!irqchip_in_kernel(v->kvm))
		return v->arch.interrupt.pending;
	if (kvm_apic_has_interrupt(v) == -1) {
		if (kvm_apic_accept_pic_intr(v)) {
			s = pic_irqchip(v->kvm);
			return s->output;
		} else
			return 0;
	}
	return 1;
}