[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: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel |
Date: |
Wed, 23 Apr 2014 14:21:57 +0000 |
>
> Hi,
>
> > > > if (++q->rptr == 256) {
> > > > q->rptr = 0;
> > > > }
> > > > }
> > >
> > > That fails for the wraparound (rptr > wptr) case.
> > >
> > Yep, it should use a temporary data array to transfer, which I have written
> > in the previous email.
>
> Saw it. And this wraparound handling is also the reason why pre-save
> needs to do this too. You want qemu versions with both 16 and 256 bytes
> buffer size interpret the vmstate stream correctly. Therefore you
> should write out the ring buffer in a state where the buffer size is not
> needed to read it, i.e. where rptr + count < PS2_QUEUE_SIZE so you don't
> need to wrap around.
>
So do you agree with my method to address the issue? Gerd. Thanks,
Best regards,
-Gonglei
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, (continued)
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gonglei (Arei), 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gerd Hoffmann, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gonglei (Arei), 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Juan Quintela, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gonglei (Arei), 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Markus Armbruster, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gerd Hoffmann, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gerd Hoffmann, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gonglei (Arei), 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gerd Hoffmann, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel,
Gonglei (Arei) <=
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gerd Hoffmann, 2014/04/23
- Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel, Gonglei (Arei), 2014/04/23