qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface


From: Claudio Fontana
Subject: Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface
Date: Wed, 5 Aug 2020 10:50:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 8/5/20 10:47 AM, Paolo Bonzini wrote:
> On 05/08/20 10:40, Claudio Fontana wrote:
>>>  #ifdef _WIN32
>>> -    /* Eat dummy APC queued by qemu_cpu_kick_thread.  */
>>> +    /* Eat dummy APC queued by qemu_cpu_kick_thread. */
>>> +    /* NB!!! Should not this be if (hax_enabled)? Is this wrong for whpx? 
>>> */
>>>      if (!tcg_enabled()) {
>>>          SleepEx(0, TRUE);
>>>      }
>>
>> Looking at the history here, I think this should be if (hax_enabled());
>> this check was added at a time when whpx did not exist, so I _think_ there 
>> might have been an assumption here
>> that !tcg_enabled() on windows means actually hax_enabled() for eating this 
>> dummy APC.
> 
> Yes, that matches the condition under which QueueUserAPC is called in
> qemu_cpu_kick_thread.
> 
> Paolo
> 
>> Probably it does not cause problems, because whpx does not end up calling 
>> qemu_wait_io_event,
>> instead it calls qemu_wait_io_event_common. But it would be more expressive 
>> to use if (hax_enabled()) I think.
> 

Thanks for the clarification, indeed,
I'd then convert it to hax_enabled() in the series then, because this allows 
removing an extra include in cpus.c

(no need to check for tcg_enabled() in cpus.c anymore)...

thanks,

Claudio



reply via email to

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