/* raise irq to CPU if necessary. must be called every time the active irq may change  */
static void pic_update_irq(struct kvm_pic *s)
/* raise irq to CPU if necessary. must be called every time the active irq may change  */
static void pic_update_irq(struct kvm_pic *s)
{
	int irq2, irq;
	irq2 = pic_get_irq(&s->pics[1]);
	if (irq2 >= 0) {
		pic_set_irq1(&s->pics[0], 2, 1);
		pic_set_irq1(&s->pics[0], 2, 0);
	}
	irq = pic_get_irq(&s->pics[0]);
	if (irq >= 0)
		s->irq_request(s->irq_request_opaque, 1);
	else
		s->irq_request(s->irq_request_opaque, 0);
}