From nobody Sat May 23 21:12:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1779205157; cv=none; d=zohomail.com; s=zohoarc; b=dOxcdG96EVxQJpTQrZuq/DFsjTAwAAr6VH39KkSKeOjXJoJ9wtlnQnc19TMu2a7BHQdfra4MphRuzhS6ofKprQ+vQSg6fyvNn4dJSHTTn5u0/mOIORfMaAC64UnzMUdj4fzxgD0lnH7tV5nsjobFyLq7U11IpbCpnm5BxT5J8j4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779205157; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GYnp417w01Lf1CsqXNPWxHt3d4VocunnjUOFZTvihpY=; b=StUvpnC/kzGHSA6FhfqUwmBoL2jXuYx0b89Pja0dpXu4LQlJg4CvpnXlhvRVMLaJb6Dlfc6kWXL6FPn9Eb+3CY2/VYq1E9vioGNal1mDjHqn2BznLABbKOXk6o1gNHSxehMmayWwyBzfeeiqnHNHWOhivSYoLxuIy516AYTMewY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1779205157604418.2132707689343; Tue, 19 May 2026 08:39:17 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1313175.1583396 (Exim 4.92) (envelope-from ) id 1wPMWz-00083Y-C5; Tue, 19 May 2026 15:38:53 +0000 Received: by outflank-mailman (output) from mailman id 1313175.1583396; Tue, 19 May 2026 15:38:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wPMWz-00083R-8d; Tue, 19 May 2026 15:38:53 +0000 Received: by outflank-mailman (input) for mailman id 1313175; Tue, 19 May 2026 15:38:51 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wPMWx-00083L-Fr for xen-devel@lists.xenproject.org; Tue, 19 May 2026 15:38:51 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wPMWw-00CnNk-Hi for xen-devel@lists.xenproject.org; Tue, 19 May 2026 17:38:50 +0200 Received: from [10.42.69.8] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a0c83fe-e002-0a2a0a5209dd-0a2a4508951c-38 for ; Tue, 19 May 2026 17:38:50 +0200 Received: from [185.255.28.34] (helo=prod-mta-13.swg-srv.net) by tlsNG-c1860d.mxtls.expurgate.net with ESMTPS (eXpurgate 4.56.1) (envelope-from ) id 6a0c840a-63b5-0a2a45080019-b9ff1c22846b-3 for ; Tue, 19 May 2026 17:38:50 +0200 Received: from mail2.vates.fr ([37.26.189.201] mail2.vates.fr) (Authenticated sender: 8631fc262581453bbf619ec5b2062170/smtp/7773de5a-2839-4720-82ee-e06722ae1d3e) by prod-mta-13.swg-srv.net (ZoneMTA - prod-mta-13) with ESMTPSA id 19e40e3b9da000f373.007 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 19 May 2026 15:38:46 +0000 Received: from leducb (182.136.141.83.rev.sfr.net [83.141.136.182]) (Authenticated sender: baptiste.le-duc) by mail2.vates.fr (Postfix) with ESMTPSA id C84E686593; Tue, 19 May 2026 17:38:45 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Transfer-Encoding:Feedback-ID" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; q=dns/txt; s=selector1; bh=GYnp417w01Lf1CsqXNPWxHt3d4VocunnjUOFZTvihpY=; h=from:subject:date:message-id:to:cc:mime-version:content-transfer-encoding:feedback-id; b=Ev98y5Ck6RenwwtA5F0kV+hZ0T1tSoqhmV1DtQY5jdG4pkMtiVfS2k/p5280kUPnidcklqc6D SwCf0P0gK1rHQdHc5tEuwjPibDDOSM2Vku2qjOnuve0nUNotcG1QP7C5FGi9xE0GwTNTkRbGxuy 0dDA9E3L16QGfmr2JBXKwzIQboQrzgX44dCgwF+Sfd1YFZwTsODgMLjnA4btiGEqFuhG2KxdKr1 w3+Dju8cgAT1h9vowJtCR5AYTL1J8MPy6a/y9x9MnnwyoXV20pVreRrM3OmwKRk0zlg7Crj+m/P sVFWfwaTsyFpNVqalmy0r2MK3YMWOU9KAwxVA29/eGXg== X-Zone-Loop: 637d2fec0ac3e3a6bddd82822c2ae1953e1d0d6565a9 x-campaign-type: default x-transaction-id: 4d6c4308-c795-4aed-87af-041b82dbfe6f x-swg-uid: 01-5e184eab-63d2-49f0-88d6-e5206b7982e5 X-Mailer: Sweego Message-ID: <1779205126.8631fc262581453bbf619ec5b2062170.19e40e3b9da000f373@vates.tech> x-swg-bid: 1779205126.8631fc262581453bbf619ec5b2062170.19e40e3b9da000f373 Feedback-ID: default:8631fc262581453bbf619ec5b2062170:Sweego x-campaign-id: default x-client-id: 8631fc262581453bbf619ec5b2062170 X-Originating-IP: [37.26.189.201] From: Baptiste Le Duc To: xen-devel@lists.xenproject.org Cc: Baptiste Le Duc , Alistair Francis , Connor Davis , Oleksii Kurochko , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH] xen/riscv: fix sstc init to write vstimecmp instead of stimecmp Date: Tue, 19 May 2026 17:38:22 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1779205126043 X-purgate-ID: tlsNG-c1860d/1779205130-C4C79DB1-6BDECA2D/0/0 X-purgate-type: clean X-purgate-size: 1147 X-ZohoMail-DKIM: pass (identity @vates.tech) X-ZM-MESSAGEID: 1779205159403158500 Content-Type: text/plain; charset="utf-8" Commit <25e03273069036f5b46e14bbdf396ac79805d07e> mistakenly wrote to CSR_STIMECMP during sstc initialization instead of CSR_VSTIMECMP. CSR_VSTIMECMP is the VS-level timer comparator: the hardware fires a VS-timer interrupt whenever (time + htimedelta) >=3D vstimecmp. Writing to CSR_STIMECMP leaves CSR_VSTIMECMP uninitialized, so its reset value may immediately satisfy this condition, generating spurious VS-timer interrupts before any guest has programmed the timer. Fix this by writing the ULONG_MAX value to CSR_VSTIMECMP as intended. Signed-off-by: Baptiste Le Duc --- xen/arch/riscv/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/time.c b/xen/arch/riscv/time.c index 8769709e52..10b7e35f13 100644 --- a/xen/arch/riscv/time.c +++ b/xen/arch/riscv/time.c @@ -101,6 +101,6 @@ void __init preinit_xen_time(void) * Thereby to avoid spurious VS-timer irqs set vstimecmp CSR to * ULONG_MAX. */ - csr_write64(CSR_STIMECMP, ULONG_MAX); + csr_write64(CSR_VSTIMECMP, ULONG_MAX); } } --=20 2.54.0