All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/16]  xen/riscv: introduce vtimer related things
@ 2026-01-22 16:47 Oleksii Kurochko
  2026-01-22 16:47 ` [PATCH v2 01/16] xen/riscv: introduce struct arch_vcpu Oleksii Kurochko
                   ` (15 more replies)
  0 siblings, 16 replies; 65+ messages in thread
From: Oleksii Kurochko @ 2026-01-22 16:47 UTC (permalink / raw)
  To: xen-devel
  Cc: Oleksii Kurochko, Alistair Francis, Connor Davis, Andrew Cooper,
	Anthony PERARD, Michal Orzel, Jan Beulich, Julien Grall,
	Roger Pau Monné, Stefano Stabellini, Bertrand Marquis,
	Volodymyr Babchuk, Romain Caritey

This patch series introduces the components necessary to implement a virtual
timer (vtimer).

Since the SSTC extension is not supported by Xen, an emulated (SBI-based)
timer is required. To address this, a virtual timer built on Xen’s timer
infrastructure is introduced, with save/restore support and SBI-based
programming.

To provide full guest software–based timer support, the following components
are also introduced:
- arch_vcpu_{create,destroy}() to initialize the virtual timer and other
  vCPU-related state not directly tied to timer functionality. As part of this
  work, struct arch_vcpu is introduced to describe the internal state of a
  virtual CPU, along with vcpu_csr_init() to initialize the relevant CSR state.
- Support functions required by the virtual timer, including:
  - vcpu_kick(), and a stub implementation of smp_send_event_check_mask()
    (since SMP is not yet supported in Xen), which is used by vcpu_kick().
  - Support for guest timer programming via interception of the SBI legacy
    SET_TIMER call from guest.
  - Implement reprogram_timer() using introduced sbi_set_timer().
  - Initial lockless tracking of pending vCPU interrupts using atomic bitmaps.
- Handling of hypervisor timer interrupts and dispatch into Xen’s generic timer
  softirq.

---
Changes in v2:
 - Add consumer part of tracking of pending vCPU interrupts.
 - Split patch "xen/riscv: init tasklet subsystem" to two.
 - Patches were acked:
   - xen/riscv: introduce vcpu_kick() implementation
   - xen/riscv: implement SBI legacy SET_TIMER support for guests
 - All other changes are patch-specific. Please check them.
---

Oleksii Kurochko (16):
  xen/riscv: introduce struct arch_vcpu
  xen/riscv: implement arch_vcpu_{create,destroy}()
  xen/riscv: implement vcpu_csr_init()
  xen/riscv: introduce tracking of pending vCPU interrupts, part 1
  xen/riscv: introduce tracking of pending vCPU interrupts, part 2
  xen/time: move ticks<->ns helpers to common code
  xen/riscv: introduce basic vtimer infrastructure for guests
  xen/riscv: add temporary stub for smp_send_event_check_mask()
  xen/riscv: introduce vcpu_kick() implementation
  xen/riscv: add vtimer context switch helpers
  xen/riscv: implement SBI legacy SET_TIMER support for guests
  xen/riscv: introduce sbi_set_timer()
  xen/riscv: implement reprogram_timer() via SBI
  xen/riscv: handle hypervisor timer interrupts
  xen/riscv: init tasklet subsystem
  xen/riscv: implement sync_vcpu_execstate()

 xen/arch/arm/include/asm/time.h             |   3 -
 xen/arch/arm/time.c                         |  11 -
 xen/arch/arm/vtimer.c                       |   2 +-
 xen/arch/riscv/Makefile                     |   2 +
 xen/arch/riscv/cpufeature.c                 |   1 +
 xen/arch/riscv/domain.c                     | 279 ++++++++++++++++++++
 xen/arch/riscv/include/asm/config.h         |   3 +-
 xen/arch/riscv/include/asm/cpufeature.h     |   1 +
 xen/arch/riscv/include/asm/current.h        |   8 +
 xen/arch/riscv/include/asm/domain.h         |  84 +++++-
 xen/arch/riscv/include/asm/riscv_encoding.h |   2 +
 xen/arch/riscv/include/asm/sbi.h            |  18 ++
 xen/arch/riscv/include/asm/time.h           |   5 -
 xen/arch/riscv/include/asm/vtimer.h         |  23 ++
 xen/arch/riscv/sbi.c                        |  40 +++
 xen/arch/riscv/setup.c                      |   3 +
 xen/arch/riscv/smp.c                        |   7 +
 xen/arch/riscv/stubs.c                      |  35 ---
 xen/arch/riscv/time.c                       |  44 +++
 xen/arch/riscv/traps.c                      |  14 +
 xen/arch/riscv/vsbi/legacy-extension.c      |   6 +
 xen/arch/riscv/vtimer.c                     |  88 ++++++
 xen/include/xen/time.h                      |  11 +
 23 files changed, 632 insertions(+), 58 deletions(-)
 create mode 100644 xen/arch/riscv/domain.c
 create mode 100644 xen/arch/riscv/include/asm/vtimer.h
 create mode 100644 xen/arch/riscv/vtimer.c

-- 
2.52.0



^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2026-02-09 12:54 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22 16:47 [PATCH v2 00/16] xen/riscv: introduce vtimer related things Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 01/16] xen/riscv: introduce struct arch_vcpu Oleksii Kurochko
2026-01-26 11:41   ` Jan Beulich
2026-01-26 12:30     ` Oleksii Kurochko
2026-01-26 12:53       ` Jan Beulich
2026-01-26 14:22         ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 02/16] xen/riscv: implement arch_vcpu_{create,destroy}() Oleksii Kurochko
2026-01-23 11:30   ` Teddy Astie
2026-01-26  9:00     ` Oleksii Kurochko
2026-01-26 11:47       ` Jan Beulich
2026-01-26 12:07         ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 03/16] xen/riscv: implement vcpu_csr_init() Oleksii Kurochko
2026-01-24 22:44   ` Teddy Astie
2026-01-26  8:36     ` Jan Beulich
2026-01-26  9:47       ` Oleksii Kurochko
2026-01-26  9:54         ` Jan Beulich
2026-01-26  9:39     ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 04/16] xen/riscv: introduce tracking of pending vCPU interrupts, part 1 Oleksii Kurochko
2026-01-29 16:44   ` Jan Beulich
2026-02-02 10:16     ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 05/16] xen/riscv: introduce tracking of pending vCPU interrupts, part 2 Oleksii Kurochko
2026-01-29 17:01   ` Jan Beulich
2026-02-02 10:50     ` Oleksii Kurochko
2026-02-02 14:22       ` Jan Beulich
2026-01-22 16:47 ` [PATCH v2 06/16] xen/time: move ticks<->ns helpers to common code Oleksii Kurochko
2026-01-29  8:48   ` Jan Beulich
2026-02-04  8:13     ` Jan Beulich
2026-02-04  9:00       ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 07/16] xen/riscv: introduce basic vtimer infrastructure for guests Oleksii Kurochko
2026-02-03 15:47   ` Jan Beulich
2026-02-03 16:55     ` Oleksii Kurochko
2026-02-03 17:04       ` Jan Beulich
2026-01-22 16:47 ` [PATCH v2 08/16] xen/riscv: add temporary stub for smp_send_event_check_mask() Oleksii Kurochko
2026-01-29 16:32   ` Jan Beulich
2026-01-29 16:46     ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 09/16] xen/riscv: introduce vcpu_kick() implementation Oleksii Kurochko
2026-02-06 16:36   ` Oleksii Kurochko
2026-02-09  9:07     ` Jan Beulich
2026-02-09  9:40       ` Oleksii Kurochko
2026-02-09  9:51         ` Jan Beulich
2026-02-09 12:35           ` Oleksii Kurochko
2026-02-09 12:54             ` Jan Beulich
2026-01-22 16:47 ` [PATCH v2 10/16] xen/riscv: add vtimer context switch helpers Oleksii Kurochko
2026-02-03 16:43   ` Jan Beulich
2026-02-03 16:56     ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 11/16] xen/riscv: implement SBI legacy SET_TIMER support for guests Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 12/16] xen/riscv: introduce sbi_set_timer() Oleksii Kurochko
2026-02-03 17:02   ` Jan Beulich
2026-02-04  9:29     ` Oleksii Kurochko
2026-02-04 10:11       ` Jan Beulich
2026-02-04  6:50   ` Jan Beulich
2026-02-04  9:36     ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 13/16] xen/riscv: implement reprogram_timer() via SBI Oleksii Kurochko
2026-01-24 23:13   ` Teddy Astie
2026-01-26 10:20     ` Oleksii Kurochko
2026-02-04 10:39   ` Jan Beulich
2026-02-05 16:25     ` Oleksii Kurochko
2026-01-22 16:47 ` [PATCH v2 14/16] xen/riscv: handle hypervisor timer interrupts Oleksii Kurochko
2026-02-04 10:42   ` Jan Beulich
2026-01-22 16:47 ` [PATCH v2 15/16] xen/riscv: init tasklet subsystem Oleksii Kurochko
2026-01-29 16:33   ` Jan Beulich
2026-01-22 16:47 ` [PATCH v2 16/16] xen/riscv: implement sync_vcpu_execstate() Oleksii Kurochko
2026-02-04 10:49   ` Jan Beulich
2026-02-05 16:51     ` Oleksii Kurochko
2026-02-05 16:53       ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.