|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [RFC PATCH v4 13/23] cpus: only take BQL for sleeping threads |
Date: | Fri, 19 Jan 2018 13:26:02 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 19/01/2018 13:25, Pavel Dovgalyuk wrote: >>> It means, that I'll have to fix all the has_work function to avoid races, >>> because x86_cpu_has_work may have them? >> Why only x86_cpu_has_work? >> >> Even reading cs->interrupt_request outside the mutex is unsafe. > All the vcpu function that access interrupt controller or peripheral state > may be unsafe? > How can it work safely then? They do it inside the big QEMU lock. But here you're calling cpu_has_work (via all_cpu_threads_idle) outside the lock. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |