On Thu, Feb 08, 2018 at 11:17:32AM -0500, Luiz Capitulino wrote: [...] > The "halted" field is somewhat controversial. On the one hand, > it offers a convenient way to know if a guest CPU is idle or > running. On the other hand, it's a field that can change many > times a second. In fact, the halted state can change even > before query-cpus-fast has returned. This makes one wonder if > this field should be dropped all together. Having the "halted" > field as optional gives a better option for dropping it in > the future, since we can just stop returning it.
I'd just drop it, unless we find a use case where it's really useful. Also, the code that sets/clears cpu->halted is target-specific, so I wouldn't be so sure that simply checking for !kvm_irqchip_in_kernel() is enough on all targets. -- Eduardo