From: "Rafał Cygnarowski" <zswi@pers.pl>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu kbd emulation
Date: Thu, 29 Jun 2006 22:56:55 +0200 [thread overview]
Message-ID: <200606292256.55462.zswi@pers.pl> (raw)
In-Reply-To: <20060628142851.GA16101@jbrown.mylinuxbox.org>
> 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
rafi@pers.pl
next prev parent reply other threads:[~2006-06-29 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-28 8:27 [Qemu-devel] qemu kbd emulation Rafał Cygnarowski
2006-06-28 8:39 ` Oliver Gerlich
2006-06-28 12:16 ` Rafał Cygnarowski
2006-06-28 14:28 ` Jim C. Brown
2006-06-28 17:27 ` Rafał Cygnarowski
2006-06-29 20:56 ` Rafał Cygnarowski [this message]
2006-06-28 15:05 ` Stuart Brady
2006-06-28 9:39 ` Stuart Brady
2006-06-28 10:07 ` Stuart Brady
2006-06-28 11:17 ` Rafał Cygnarowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200606292256.55462.zswi@pers.pl \
--to=zswi@pers.pl \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).