From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2F33107BCCC for ; Fri, 13 Mar 2026 16:45:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1254116.1550090 (Exim 4.92) (envelope-from ) id 1w15d3-00048O-V8; Fri, 13 Mar 2026 16:44:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1254116.1550090; Fri, 13 Mar 2026 16:44:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w15d3-00048H-SU; Fri, 13 Mar 2026 16:44:49 +0000 Received: by outflank-mailman (input) for mailman id 1254116; Fri, 13 Mar 2026 16:44:48 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w15d2-00048B-Kb for xen-devel@lists.xenproject.org; Fri, 13 Mar 2026 16:44:48 +0000 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [2a00:1450:4864:20::52f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f20268b9-1efb-11f1-b164-2bf370ae4941; Fri, 13 Mar 2026 17:44:47 +0100 (CET) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-6611f41eebcso3200281a12.2 for ; Fri, 13 Mar 2026 09:44:47 -0700 (PDT) Received: from fedora (user-109-243-67-101.play-internet.pl. [109.243.67.101]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-66350b86008sm1394733a12.28.2026.03.13.09.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 09:44:45 -0700 (PDT) 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: f20268b9-1efb-11f1-b164-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773420286; x=1774025086; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nvusB8amxANk2/hw0DyBVCpoKjQxhuOgDtnr4JFcqBM=; b=L1BY/W0e2Vctn0m3KQzKHUug6kxYCCMGIOQNRjWuw+hhBH2KAsuGOJZI7XjTdIQF+o 17h7Qzgx+Rrq7MejimTCOAdCaIe488/LxBccIhNQ+0oHRD0WtSWirTtGmeDMhmM+7+7L V/VALccSHfceTR/kQwFpzM20G9x3E6AuWokfa6L4AEPJBsE9Sp5WwBBzu+3TFD2+nKgZ DLXDjfPIgoeZaT/RZ9QKpvUh7MuNQnJkaG17a0yAW/yctM/Ql4rBQcVKdxq8B2c4I5Vp 0CoTmqJN0+O+vNoy7JP3JE9HKkkWq60gfbX4cZ33oyB+zFzcWb+kJx/nKTsDtWtXAp47 hVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773420286; x=1774025086; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nvusB8amxANk2/hw0DyBVCpoKjQxhuOgDtnr4JFcqBM=; b=CAh3+z5Y1cNu8I2WJMDqN+0EkkYxRaLhWiZ7bV48X9sF/a89YGlXdaFmRDlMkZjLcr 4miFFUv7wX3IGrX5RbfQp815DTpp2CZ+3YWUJDzYxR3L2MgEr9R3MAAyxPPL6LbX6/XA DZw84Q5bCy7pidpGjNA8oUcbCQisFJofFvJKRgv/t4sLOID/Ovnyu2J1JH9FQMreV+JF dPN3jtBHDhpZrOKpX4qe4VMaSKoO1EKYl8TgIUnWFwQ7kaK6vYiYDSeZbcMRsEBOv6Gz j0HJMGJ0hYZia2OPpGh4lqbZ/5yfmsYfM6VRS2BUFnd/7TJenOnucPQNdHZ4uJDU90ZH 1yUw== X-Gm-Message-State: AOJu0YzkYfCyJK27imm6kl4xasoq+s5jOKawMLez+BwPQwfV6shgjGil YqYuKCl02ydsf3PLm/JhyzPLP0zdEA4nqD7UfL74SbdJy8ZYKf5o9gzhVhpfyQ== X-Gm-Gg: ATEYQzxnKr5IvAdDJDBU+llx4Dsa7awaKT+4hplTB4Gc3jf9KuoeTqEMxtPzyD4jbLr 6Z4KyY2GHvWZnyQHjV+UBGl6xf6Jtr6ifyPNKcbcvzhmi5OITMZDCipIqaM0zUEUCD4jybvjiC5 B1aSCcLCBS969Jb7nCgaSvKSm+GM2WTKDLUD9qWwfn22KRT+TaQHM3Frjnxg8CT/KCTqXPKf8Y7 /IxTD9m6bGkulIW9ensP09NgtqVJ/ybbfHj44WyV6/ketlDx2daeaAO8MvetnSDPUl8YJAkp3v0 9HC8LwheK8yX2FHQ+4R8gCn6EnGjUgrdvjIR0Gdgz+aOTelPj0CAWhWt/aX5EVELqMI5yjl3d6W T6UXzrMBVgLBYvWBHdBwx7NfQIxhJeiCF6d1ku3j0ApGqUlK/aYsiaJewr03gMyDpD+i29ZtD9e CWCBw8qkWQ9d9X9jsqPZ7+B7f+4bTA0HNM6kZeOFK/L8eOEQdk/El/Bp3yfP0CSb5Kow== X-Received: by 2002:a17:907:da07:b0:b94:1224:c605 with SMTP id a640c23a62f3a-b976500fa5bmr219134666b.19.1773420286041; Fri, 13 Mar 2026 09:44:46 -0700 (PDT) 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 v1 0/4] RISCV: Intrdouce SSTC support in Xen Date: Fri, 13 Mar 2026 17:44:34 +0100 Message-ID: X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series is created based on [1] and the aim is to make Xen properly works when SSTC extension is available. It is needed to do in this way as OpenSBI doesn't pass that it supports SSTC by DTS to Xen and there is no easy way to turn off support of SSTC support. Also, as a part of this patch series intrdouce suggested [2] by Jan B. improvements of init_csr_masks(). [1] https://lore.kernel.org/xen-devel/cover.1772814110.git.oleksii.kurochko@gmail.com/T/#mc14576ef43a83b344c5f31626005b995e2ccbeaa [2] https://lore.kernel.org/xen-devel/cover.1772814110.git.oleksii.kurochko@gmail.com/T/#m9c18d2d7a98958befec16419f5deccc40f6c8c3e Oleksii Kurochko (4): xen/riscv: add exception table support xen/riscv: add csr_allowed_read() helper xen/riscv: allow Xen to use SSTC while hiding it from guests xen/riscv: init_csr_masks()-related improvements xen/arch/riscv/Kconfig | 1 + xen/arch/riscv/Makefile | 1 + xen/arch/riscv/cpufeature.c | 33 ++++++++ xen/arch/riscv/domain.c | 32 ++++---- xen/arch/riscv/extables.c | 85 +++++++++++++++++++++ xen/arch/riscv/include/asm/cpufeature.h | 1 + xen/arch/riscv/include/asm/csr.h | 34 ++++++++- xen/arch/riscv/include/asm/extables.h | 72 +++++++++++++++++ xen/arch/riscv/include/asm/riscv_encoding.h | 2 + xen/arch/riscv/setup.c | 3 + xen/arch/riscv/time.c | 36 +++++---- xen/arch/riscv/traps.c | 3 + xen/arch/riscv/vtimer.c | 7 +- xen/arch/riscv/xen.lds.S | 3 + xen/arch/x86/xen.lds.S | 6 +- xen/include/xen/xen.lds.h | 10 +++ 16 files changed, 294 insertions(+), 35 deletions(-) create mode 100644 xen/arch/riscv/extables.c create mode 100644 xen/arch/riscv/include/asm/extables.h -- 2.53.0