All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6.6-RT] kvm: Use the proper mask to check for the LAZY bit.
@ 2024-10-25 10:26 Sebastian Andrzej Siewior
  0 siblings, 0 replies; only message in thread
From: Sebastian Andrzej Siewior @ 2024-10-25 10:26 UTC (permalink / raw)
  To: stable-rt; +Cc: Clark Williams

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 <bigeasy@linutronix.de>
---
 kernel/entry/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/entry/kvm.c b/kernel/entry/kvm.c
index d952fa5ee8801..5253d3d2d0139 100644
--- a/kernel/entry/kvm.c
+++ b/kernel/entry/kvm.c
@@ -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)
-- 
2.45.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-25 10:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 10:26 [PATCH v6.6-RT] kvm: Use the proper mask to check for the LAZY bit Sebastian Andrzej Siewior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.