From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796290517; b=CiJJIweuFxGHpsqtsimx+31obgFLF57sXBXsMi7rqGY2ExP5A+aC7ZNe98d32PkhqpSm eOR05UFpnwkTn5NCa9XXkOWzMp9dUNdruLTNXoDkzv7JL8COcUKQ4QLCaXMag94/Zn41/ TdlTx8OKK7e65PNO6hIX6M5udqO2q/CzqVEb/rrZ99RrY/Np4QHRRnOphlDnhyvZlcD+V rWoWPwEjya3cMJZyuKF11t+fh7lQDtKJUmxcnU73lzivwKlTCpkcDs/SPjFQX758ItKcT 0TT7xljQN0pA4rsuE+ZJ703ElQCRxmU86bLE/TlDi7QOHlNydmbqPJs/PmS+bEY38ow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796290517; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=f6Bi94iHSpY43NKxJBWB7ugf7Lud6Xe52ubv/NSSr9s=; b=PF5dxaYH90HPFC6WB2uhgoU5dzG48TCDGu+1pJbSRC9w51efmhlW4OL7J38zlTFYwUgs oeXpHAITuPqAER+0QtH6XY8HSYMVdVI099NzPU9bVPlHPIKRONQgB5as+OO2oyjTM3CsJ YjxHDCtAicutSZLzXol73KUNQ6nyTAZyJW6HSEYHS+AIA4TvOTuayIokEpP/RojWQpAm0 3cAhEXJ5NR3qZzK1/rAtpPuxU1AaX+lLq6YVPdBCCUPMsujjvS+AA3SfJhz05w82yJr54 TcWHNeYWe6D0U9Xh4UDb6Med5mrswnsivy9kj3pA1Kpstxqmk0zW9sHkwkydgFtrTog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Vgu5FXrr; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E423D606A335 for ; Thu, 3 Dec 2026 09:35:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Vgu5FXrr Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE0AB1F000C1; Thu, 3 Dec 2026 09:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796290516; bh=f6Bi94iHSpY43NKxJBWB7ugf7Lud6Xe52ubv/NSSr9s=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=Vgu5FXrrb1kjzUoHVUCWYrDV2L2aTPFnik8tcjcOsTZcFy+9TMK9X+Mxnn3QIUw30 Om5CJMT3J8eY4/Sxpt2JK6cpGYsx8YSHzUE8aLfDwlO7Qty+9HkR7fIXYGSAd1zTzV 23r8rFPunz2n8btGB9eGs0JDUA3MXbeBm4iB9qB6wPsqxkIOe2C+97zsdthoFaQG9w +9aIKGV6xvLoV5O+kaL+Eow9oyGmaMEMq6UbwcZiZvupSHYuUa08fbUyv+DQzV3mc8 huPuEI5JJIO1BZFHJayRmbm5MubpWpOeqw3d4VYSTgHOtGDH911lMbIfdl+fGZqC6t gFMDvgbUcz3rQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] KVM: x86/xen: defer timer event delivery on PREEMPT_RT Reply-To: sashiko-reviews@lists.linux.dev To: "Yang Luohan" , kvm@vger.kernel.org In-Reply-To: <179628948570.2061.8987479680072097733@gmail.com> References: <179628948570.2061.8987479680072097733@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 09:35:16 +0000 X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] KVM: x86/xen: missing Fixes trailer for commit 77c9b9dea4fb -- commit 21cb04c9f920ff2e2b8066f225f0bcf72b648f06 Author: Yang Luohan > KVM: x86/xen: defer timer event delivery on PREEMPT_RT > > xen_timer_callback() runs from an hrtimer, so it executes with interrupts > disabled. It calls kvm_xen_set_evtchn_fast(), which acquires gpc->lock wi= th > read_lock_irqsave(). On PREEMPT_RT rwlock_t is a sleeping lock, and taking > it in that context reports: > > BUG: sleeping function called from invalid context at > kernel/locking/spinlock_rt.c:248 > in_atomic(): 1, irqs_disabled(): 1 > kvm_xen_set_evtchn_fast > xen_timer_callback > > The callback already handles -EWOULDBLOCK by recording the pending timer > and raising KVM_REQ_UNBLOCK, and the delivery is then completed from > vCPU context by kvm_xen_inject_timer_irqs(). On PREEMPT_RT, skip the > fast path and let that deferred path run instead of taking a sleeping > lock from hardirq context. > > Signed-off-by: Yang Luohan [Severity: Low] This fixes a sleeping-in-invalid-context bug on PREEMPT_RT introduced when xen_timer_callback() started calling kvm_xen_set_evtchn_fast(). Should this include: Fixes: 77c9b9dea4fb ("KVM: x86/xen: Use fast path for Xen timer delivery") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/179628948570.2061.8= 987479680072097733@gmail.com?part=3D1