Skip to content

riscv: introduce basic UART support and interrupts for hypervisor mode

Oleksii Kurochko xen-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest7 patches 6 repliesIn review
  2. v59 patches 6 repliesSuperseded
  3. v49 patches 8 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v314 patches32 repliesSuperseded
v216 patches45 repliesSuperseded
v114 patches64 repliesSuperseded

Changes in v6 from the cover letter

- Have been merged to staging:
[PATCH v5 2/9] xen/riscv: introduce register_intc_ops() and intc_hw_ops. [PATCH v4 1/9] xen/riscv: dt_processor_hartid()
- All other changes are patch-specific. Please check each patch separately.
---

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7xen/riscv: imsic_init() implementationxen/arch/riscv/Makefile xen/arch/riscv/imsic.c xen/arch/riscv/include/asm/imsic.h +1 more+438 -02 replies
2/7xen/riscv: aplic_init() implementationxen/arch/riscv/aplic-priv.h xen/arch/riscv/aplic.c xen/arch/riscv/include/asm/aplic.h +1 more+204 -04 replies
3/7xen/riscv: introduce intc_init() and helpersxen/arch/riscv/include/asm/intc.h xen/arch/riscv/intc.c xen/arch/riscv/setup.c+47 -00 replies
4/7xen/riscv: implementation of aplic and imsic operationsxen/arch/riscv/aplic-priv.h xen/arch/riscv/aplic.c xen/arch/riscv/imsic.c +2 more+267 -20 replies
5/7xen/riscv: add external interrupt handling for hypervisor modexen/arch/riscv/aplic.c xen/arch/riscv/include/asm/aplic.h xen/arch/riscv/include/asm/imsic.h +5 more+163 -10 replies
6/7xen/riscv: implement setup_irq()xen/arch/riscv/include/asm/irq.h xen/arch/riscv/irq.c+86 -00 replies
7/7xen/riscv: add basic UART supportxen/arch/riscv/Kconfig xen/arch/riscv/setup.c xen/drivers/char/Kconfig+14 -20 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchJan Beulich
1/7A-b
2/7A-b
3/7A-b
4/7A-b
5/7A-b
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/7] riscv: introduce basic UART support and interrupts for hypervisor mode

The patch series introduces basic UART support (in interrupt mode) and support of interrupts for hypervisor mode.

To implement this the following has been added:
- APLIC and IMISC initialization.
- Introduce of intc_hw_operations abstraction.
- Introduce some APLIC and IMSIC operations.
- Introduce init_IRQ(), platform_get_irq() and setup_irq() functions.
- Update do_trap() handler to handle IRQ_S_EXT.
- Introduce some other functions such as: get_s_time(), smp_clear_cpu_maps(), ioremap().
- Enable UART.

CI tests: https://gitlab.com/xen-project/people/olkur/xen/-/pipelines/1910703345
---
Changes in V6:
- Have been merged to staging:
[PATCH v5 2/9] xen/riscv: introduce register_intc_ops() and intc_hw_ops. [PATCH v4 1/9] xen/riscv: dt_processor_hartid()
- All other changes are patch-specific. Please check each patch separately.
---
Changes in V5:
- Update CI tests link.
- Mostly changes are patch-specific. Please check each patch separately.
---
Changes in V4:
- Merged to staging:
- xen/riscv: initialize bitmap to zero in riscv_fill_hwcap_from_isa_string()
- xen/asm-generic: introduce asm-generic/irq-dt.h
- xen/riscv: introduce smp_prepare_boot_cpu()
- xen/riscv: introduce support of Svpbmt extension
- add ioremap_*() variants using ioremap_attr()
- xen/riscv: introduce init_IRQ()
- xen/riscv: introduce platform_get_irq()
- All other changes are patch-specific. Please check each patch separately.
---
Changes in V2:
- Merged to staging:
xen/riscv: initialize bitmap to zero in riscv_fill_hwcap_from_isa_string() xen/asm-generic: introduce asm-generic/irq-dt.h
- All other changes are patch-specific. Please check each patch separately.
---

Oleksii Kurochko (7):
xen/riscv: imsic_init() implementation
xen/riscv: aplic_init() implementation
xen/riscv: introduce intc_init() and helpers xen/riscv: implementation of aplic and imsic operations xen/riscv: add external interrupt handling for hypervisor mode xen/riscv: implement setup_irq()
xen/riscv: add basic UART support

 xen/arch/riscv/Kconfig             |   1 +
 xen/arch/riscv/Makefile            |   1 +
 xen/arch/riscv/aplic-priv.h        |  38 +++
 xen/arch/riscv/aplic.c             | 297 ++++++++++++++++++
 xen/arch/riscv/imsic.c             | 489 +++++++++++++++++++++++++++++
 xen/arch/riscv/include/asm/aplic.h |  73 +++++
 xen/arch/riscv/include/asm/imsic.h |  74 +++++
 xen/arch/riscv/include/asm/intc.h  |  13 +
 xen/arch/riscv/include/asm/irq.h   |   8 +-
 xen/arch/riscv/include/asm/smp.h   |  13 +
 xen/arch/riscv/intc.c              |  46 +++
 xen/arch/riscv/irq.c               | 131 ++++++++
 xen/arch/riscv/setup.c             |  14 +
 xen/arch/riscv/traps.c             |  19 ++
 xen/drivers/char/Kconfig           |   3 +-
 15 files changed, 1217 insertions(+), 3 deletions(-)
 create mode 100644 xen/arch/riscv/aplic-priv.h
 create mode 100644 xen/arch/riscv/imsic.c
 create mode 100644 xen/arch/riscv/include/asm/aplic.h
 create mode 100644 xen/arch/riscv/include/asm/imsic.h
Signature · 1 line
2.50.0