On Thu, Apr 23, 2015 at 12:28:43PM +0100, Peter Maydell wrote: > On 23 April 2015 at 12:24, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote: > > Maybe we can consider YIELD instead of NOP when has_work() is true as a WFI > > is probably a good hint from guests to reschedule QEMU CPUs. > > That I'm not convinced about. If we have a pending interrupt then > our best bet is probably to take it immediately on this CPU, not > yield to another CPU and take the interrupt when we eventually > get control back.
Yeah, true. It's actually a very bad YIELD point when has_work() is true for a WFI. For WFE too I guess, when interrupts are unmasked. Good point. Cheers, Edgar