On 11/03/20 21:14, Maxime Villard wrote: >> The problem is that qcpu->stop is checked _before_ entering the >> hypervisor and not after, so there is a small race window. > Ok. I don't understand what's supposed to be the race here. If we get an > IPI between the check and the call to nvmm_vcpu_run() then we'll just do > one run and stop in the next iteration, because the IPI will have set > qcpu->stop. Is this extra iteration undesired?
Yes, you don't know how long that run would take. I don't know about NVMM but for KVM it may even never leave if the guest is in HLT state. Paolo