On 1/12/22 18:30, Sean Christopherson wrote:
Uhhmm, why not? Who says the vcpu will run the moment it becomes
runnable again? Another task could be woken up meanwhile occupying the
real cpu.
Hrm, but when emulating HLT, e.g. for an idling vCPU, KVM will voluntarily schedule
out the vCPU and mark it as preempted from the guest's perspective. The vast majority,
probably all, usage of steal_time.preempted expects it to truly mean "preempted" as
opposed to "not running".
I'm not sure about that. In particular, PV TLB shootdown benefits from
treating a halted vCPU as preempted, because it avoids wakeups of the
halted vCPUs.
kvm_smp_send_call_func_ipi might not, though.
Paolo