kvm: Use the proper mask to check for the LAZY bit.
PATCH 1/1 kvm: Use the proper mask to check for the LAZY bit.
To check for the LAZY bit in ti_work, it is needed to use _TIF_NEED_RESCHED_LAZY which contains the shifted bit (the mask) instead of TIF_NEED_RESCHED_LAZY which contains the bit number.
This broke while switch from the old PREEMPT_LAZY code to PREEMPT_AUTO.
Use _TIF_NEED_RESCHED_LAZY instead of TIF_NEED_RESCHED_LAZY.
Signed-off-by Sebastian Andrzej Siewior <[email protected]>
--- kernel/entry/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/entry/kvm.c +1 -1
@@ -13,7 +13,7 @@ static int xfer_to_guest_mode_work(struct kvm_vcpu *vcpu, unsigned long ti_work)return -EINTR ; } -if (ti_work & (_TIF_NEED_RESCHED |TIF_NEED_RESCHED_LAZY )) +if (ti_work & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY))schedule ();if (ti_work & _TIF_NOTIFY_RESUME)
Signature · 1 line
2.45.2