On 3/9/22 12:17, Li,Rongqing wrote:
Is it necessary to check PV_UNHALT? The bit is present anyway in
the steal time struct, unless it's a very old kernel. And it's
safe to always return zero if the bit is not present.
I think calling _kvm_vcpu_is_preempted should be avoid in some
unnecessary condition, like no unhalt, which means that vcpu do not
exit for hlt and vcpu is not preempted?
PV_UNHALT can be cleared by userspace just because the user requested
it. (In fact, what KVM does when it clears it automatically is not
really a good idea...).
Paolo