All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: stable-rt@vger.kernel.org
Cc: Clark Williams <williams@redhat.com>
Subject: [PATCH v6.6-RT] kvm: Use the proper mask to check for the LAZY bit.
Date: Fri, 25 Oct 2024 12:26:33 +0200	[thread overview]
Message-ID: <20241025102633.w55fsSjV@linutronix.de> (raw)

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


                 reply	other threads:[~2024-10-25 10:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241025102633.w55fsSjV@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=stable-rt@vger.kernel.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.