qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load


From: Gonglei
Subject: Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load
Date: Thu, 27 Nov 2014 19:22:26 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 2014/11/27 19:19, Gerd Hoffmann wrote:

> On Do, 2014-11-27 at 19:16 +0800, Gonglei wrote:
>> On 2014/11/27 19:04, Gerd Hoffmann wrote:
>>
>>>   Hi,
>>>
>>>>> +        evt = s->ptr.queue[(s->head+s->n) & QUEUE_MASK];
>>>>
>>>> s->n is QUEUE_LENGTH, can we directly delete it?
>>>>   evt = s->ptr.queue[s->head & QUEUE_MASK]
>>>
>>> I prefer to make clear in the code that we want the last ring element
>>> not the first and leave in the "+n", even if we could take it out.
>>>
>> OK.
>>
>> Another question, whether or not we handle this scenario
>> before calling hid_set_next_idle(s) ? Maybe it is safer, because
>> hid_idle_timer will call  hid_pointer_event(), callback function
>> of hs->event(hs).
> 
> Not needed, the timer will not called before vmload is completely
> finished.
> 

Yep, as the Qemu big lock.
I will test this patch later, thanks for your work. :)

Regards,
-Gonglei




reply via email to

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