[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu kbd emulation

From: Rafał Cygnarowski
Subject: Re: [Qemu-devel] qemu kbd emulation
Date: Thu, 29 Jun 2006 22:56:55 +0200
User-agent: KMail/1.9.1

> 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;
        /* 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]