From a472f640dd49c03c479c49a6ec24344472b0e223 Mon Sep 17 00:00:00 2001 From: Baptiste Le Duc Date: Tue, 19 May 2026 18:14:44 +0200 Subject: [PATCH] xen/riscv: Fix SSTC init to write VSTIMECMP instead of STIMECMP According to the preceeding comment, CSR_VSTIMECMP should be written rather than CSR_STIMECMP. Fixes: 25e032730690 ("xen/riscv: allow Xen to use SSTC while hiding it from guests") Signed-off-by: Baptiste Le Duc Reviewed-by: Oleksii Kurochko --- 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); } }