From nobody Tue Mar 3 04:56:17 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1771604393; cv=none; d=zohomail.com; s=zohoarc; b=lv+MT5hqGbcDXSHiP9gK0fFdYAayF0t8x0FSNRVnIN6r+UsxxuMG6c+Zn9j3/25uoZ7E/8ojZcDCV/USn1CFvWLapHn5wzsdCCrdqmDE7fvsBd9O4bK7FIQBKddCGD7bOdVgMQzv15IoEKg4ggZjIW34mVp6WdzvvaNCC7uAHT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771604393; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=J6aGuGPcNuPDYPCV7GwkHM9t8Lc+qUdl4ib7PfisxG8=; b=ZCnwQfLCcqIgbqSCaRH9eKxur0OBz83IDa/YJgEKmP2AeHIH7LtJAA6/+EQDrPk8I1XYtIrwamg+oTh9PcJsUIBijUHSVRi47HL1ZEmaw5NImlD6Ksrwpgni7lcUHT6mqPmgDKw4LWgooDU2blmZQOoPU2pxyl1Fs8fGJMa6zhQ= 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 1771604393118847.5146757334064; Fri, 20 Feb 2026 08:19:53 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1237341.1539764 (Exim 4.92) (envelope-from ) id 1vtTE4-0002RG-It; Fri, 20 Feb 2026 16:19:32 +0000 Received: by outflank-mailman (output) from mailman id 1237341.1539764; Fri, 20 Feb 2026 16:19:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vtTE4-0002QD-AP; Fri, 20 Feb 2026 16:19:32 +0000 Received: by outflank-mailman (input) for mailman id 1237341; Fri, 20 Feb 2026 16:19:30 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vtTE2-0000Q4-SE for xen-devel@lists.xenproject.org; Fri, 20 Feb 2026 16:19:30 +0000 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [2a00:1450:4864:20::42d]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ee5bc87b-0e77-11f1-9ccf-f158ae23cfc8; Fri, 20 Feb 2026 17:19:29 +0100 (CET) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-4362c635319so2097773f8f.2 for ; Fri, 20 Feb 2026 08:19:29 -0800 (PST) Received: from fedora (user-109-243-67-101.play-internet.pl. [109.243.67.101]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43796a6c1bfsm56991068f8f.13.2026.02.20.08.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Feb 2026 08:19:27 -0800 (PST) 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" X-Inumbo-ID: ee5bc87b-0e77-11f1-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771604368; x=1772209168; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J6aGuGPcNuPDYPCV7GwkHM9t8Lc+qUdl4ib7PfisxG8=; b=UtCZMvNsUewN3dl7b484fGEpmCpA5wx7N4zu4EhoBBFEK+CUQGuW4oYuAin2jb3Yhh s11yDClK1e1mCwSFc78C4XBcrKRjZw3SNPkt9uDhFP1D+xjnIl339svmw6KScnlN06sT aUpxuGZehKXQU36t9SELH2py8QXeoEpAmlYm5As4Y1PAcUfd23jkg/fnflNWsJqX/0Zi Oxxd4RdBllPkWpW/NUsDAhFez3g/p3K3p/zmTgnht5PzRJ9rmA6G5eTVtOWw9aIArPiJ R/VnLPq7eTdyVldEB+5tj4dfn4YmFVE+L8/FPZpmirgKSDgvKE948njRHiKt7peyD4ky F59Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771604368; x=1772209168; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=J6aGuGPcNuPDYPCV7GwkHM9t8Lc+qUdl4ib7PfisxG8=; b=HEvvL+ScUAm2asxJuuZc+8vEmiprZpXF0j9PPEVhtsT4PQafjhZdffCfJ/dHK9AYxc tFw/rhS6KarIwbkLpepguUtq7Qh3c1/Bncz1/pkfLOB04n/29W9A7nPIqjP07BH6wYNh eRSCHQ3nM+dzGFa9JWhAln2WwlIFHHMb9Yg+5y8w8KK+6kEyRK0nvKZ9JhOCwJJVI+LJ 2u+2640xlgmqyjDDggEhlhNr7Am2LvJo1cypIwGYnac87mj/5OY1B4J0UozxON3gyu7B ylC3MdU3Rz+NPQO3Pkd55C1lODeFZ0czvqxziLSZ+PZ6LP4cuVFQXDdfnfNEzbpGMK73 lUng== X-Gm-Message-State: AOJu0YwI18DZ8F2bkwshYkqRXAK8UfGEdTY9fzjLi3GTXXcP7izWepZ2 YTm9C7nA6xTQOeHymEqLshjs3fgycJpgi1TTTAPrOD+GE+Gc92kLcyxuhmnlbw== X-Gm-Gg: AZuq6aJ7yAh0kcl2lmAyy5zsMGicxQeLs0NU11MhyoNTmZffxvdC9fc9DhpJbYMOg7k pJ4JVQOJmQMlmdsN77nPOzsaWruY02mufnv2cFOikVuNb0rGBbeG7UY6ijvgw6kPfl2dbrpCWhB 6xMpTl8y3sm4GN5pRyVHxJXc2oTrWHkYad4K+kVdTJRP9IwH0l5vnJVnXyMVArfXjuvtrQyzmYp WAXKjT/XzHvBnm1BtpUQ73rJILUclotcI8nheti20/RSRfa9w07b8Al0S5KnNdpGMhiLcQhH/PR GyVa7CNTtxEX9qUUrbtB5iYymp8SF6wyok0R0uGK7QjkGYHv39uiM9HPbDGyMXaoeAEaqbxoO7u xtRaYYxkpKiJU25o6vqybjcg15ZPx4nQQpulDEXDwCY/Rsu/RrKR29Q4O1zOvEWdZJZ9Soxcx6n 1xGOobJ/Dwq30lxlmonJ3idtsQZDTyTzoNbTTxsniUdy9mD+98prv4hz5paeIm73Owuw== X-Received: by 2002:a5d:64e5:0:b0:437:6806:994f with SMTP id ffacd0b85a97d-4396f14cb6fmr908975f8f.12.1771604367888; Fri, 20 Feb 2026 08:19:27 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Romain Caritey , Oleksii Kurochko , Alistair Francis , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v5 09/14] xen/riscv: implement SBI legacy SET_TIMER support for guests Date: Fri, 20 Feb 2026 17:19:04 +0100 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1771604394728158500 Add handling of the SBI_EXT_0_1_SET_TIMER function ID to the legacy extension ecall handler. The handler now programs the vCPU=E2=80=99s virtual timer via vtimer_set_timer() and returns SBI_SUCCESS. This enables guests using the legacy SBI timer interface to schedule timer events correctly. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in v3 - v5: - Nothing changed. Only rebase. --- Changes in v2: - Add Acked-by: Jan Beulich . --- xen/arch/riscv/vsbi/legacy-extension.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/riscv/vsbi/legacy-extension.c b/xen/arch/riscv/vsbi/l= egacy-extension.c index 2e8df191c295..090c23440cea 100644 --- a/xen/arch/riscv/vsbi/legacy-extension.c +++ b/xen/arch/riscv/vsbi/legacy-extension.c @@ -7,6 +7,7 @@ =20 #include #include +#include =20 static void vsbi_print_char(char c) { @@ -44,6 +45,11 @@ static int vsbi_legacy_ecall_handler(unsigned long eid, = unsigned long fid, ret =3D SBI_ERR_NOT_SUPPORTED; break; =20 + case SBI_EXT_0_1_SET_TIMER: + vtimer_set_timer(¤t->arch.vtimer, regs->a0); + regs->a0 =3D SBI_SUCCESS; + break; + default: /* * TODO: domain_crash() is acceptable here while things are still = under --=20 2.53.0