> I have an ugly hack that fixes the code so there are no more key repeats, > but I was never able to figure out what caused the key drops.
I suppose that I have same ugly hack as you: uint32_t ps2_read_data(void *opaque) { [...] if (q->count == 0) { [...] } else { val = q->data[q->rptr]; if (++q->rptr == PS2_QUEUE_SIZE) q->rptr = 0; q->count--; /* reading deasserts IRQ */ /* If I comment out following line: s->update_irq(s->update_arg, 0); repeating keys disapear. I didn't notice negative effects of this so far. */ /* reassert IRQs if data left */ s->update_irq(s->update_arg, q->count != 0); } return val; } BTW: what happens when update_irq is called? AFAIK some interraption should be emulated but I don't know how. Becouse ps2_queue can grow (q->count can be sth more than 1) and becouse every time at the end of ps2_queue function update_irq is called, I suppose that irqs are emulated by another thread. So how they are synchronized? -- Rafał Cygnarowski [EMAIL PROTECTED] _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel