[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 14/28] tcg: add kick timer for single-threaded
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC v4 14/28] tcg: add kick timer for single-threaded vCPU emulation |
Date: |
Wed, 7 Sep 2016 07:40:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 07/09/2016 05:25, Richard Henderson wrote:
>>
>> + /* Set to kick if we have to do more than one vCPU */
>> + if (CPU_NEXT(first_cpu)) {
>> + kick_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, kick_tcg_thread,
>> + &kick_timer);
>
> I'm not especially keen on this pointer to local variable thing.
> Perhaps better as
>
> kick_timer = timer_new_ns(..., NULL);
> kick_timer->opaque = kick_timer;
Or put it in CPUState and pass that.
Paolo
> and avoid the indirection in kick_tcg_thread.