qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel
Date: Wed, 23 Apr 2014 15:04:58 +0200

  Hi,

> Anything bigger than 16bytes, no?  And that is the whole point that we
> are talking about?  Or the 16bytes that we are using can be at any place
> on the buffer?

Yes.  It's a ring buffer, with rptr pointing to the first used element
and wptr pointing to the first free element.

So, what we need is a function to move the content we are interested
(between rptr and wptr) in to the head of the ring buffer, set rptr to
0, set wptr to count.  We obviously need to do that in post_load(), but
as I've noticed meanwhile also in pre_save, otherwise old qemu will get
things wrong in case the buffer is wrapped (rptr > wptr).

cheers,
  Gerd





reply via email to

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