All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/14] RISCV basic exception handling implementation
@ 2023-01-20 14:59 Oleksii Kurochko
  2023-01-20 14:59 ` [PATCH v1 01/14] xen/riscv: add _zicsr to CFLAGS Oleksii Kurochko
                   ` (13 more replies)
  0 siblings, 14 replies; 58+ messages in thread
From: Oleksii Kurochko @ 2023-01-20 14:59 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, Stefano Stabellini, Gianluca Guida,
	Oleksii Kurochko, Bob Eshleman, Alistair Francis, Connor Davis,
	Doug Goldstein

The patch series is based on another one [Basic early_printk and smoke
test implementation] which hasn't been commited yet.

The patch series provides a basic implementation of exception handling.
It can do only basic things such as decode a cause of an exception,
save/restore registers and execute "wfi" instruction if an exception
can not be handled.

To verify that exception handling works well it was implemented macros
from <asm/bug.h> such as BUG/WARN/run_in_exception/assert_failed.
The implementation of macros is used "ebreak" instruction and set up bug
frame tables for each type of macros.
Also it was implemented register save/restore to return and continue work
after WARN/run_in_exception.
Not all functionality of the macros was implemented as some of them
require hard-panic the system which is not available now. Instead of
hard-panic 'wfi' instruction is used but it should be definitely changed
in the neareset future.
It wasn't implemented show_execution_state() and stack trace discovering
as it's not necessary now.

Oleksii Kurochko (14):
  xen/riscv: add _zicsr to CFLAGS
  xen/riscv: add <asm/asm.h> header
  xen/riscv: add <asm/riscv_encoding.h header
  xen/riscv: add <asm/csr.h> header
  xen/riscv: add early_printk_hnum() function
  xen/riscv: introduce exception context
  xen/riscv: introduce exception handlers implementation
  xen/riscv: introduce decode_cause() stuff
  xen/riscv: introduce do_unexpected_trap()
  xen/riscv: mask all interrupts
  xen/riscv: introduce setup_trap_handler()
  xen/riscv: introduce an implementation of macros from <asm/bug.h>
  xen/riscv: test basic handling stuff
  automation: add smoke test to verify macros from bug.h

 automation/scripts/qemu-smoke-riscv64.sh    |   2 +
 xen/arch/riscv/Makefile                     |   2 +
 xen/arch/riscv/arch.mk                      |   2 +-
 xen/arch/riscv/early_printk.c               |  39 +
 xen/arch/riscv/entry.S                      |  97 ++
 xen/arch/riscv/include/asm/asm.h            |  54 ++
 xen/arch/riscv/include/asm/bug.h            | 120 +++
 xen/arch/riscv/include/asm/csr.h            |  82 ++
 xen/arch/riscv/include/asm/early_printk.h   |   2 +
 xen/arch/riscv/include/asm/processor.h      | 114 +++
 xen/arch/riscv/include/asm/riscv_encoding.h | 945 ++++++++++++++++++++
 xen/arch/riscv/include/asm/traps.h          |  13 +
 xen/arch/riscv/riscv64/head.S               |   5 +
 xen/arch/riscv/setup.c                      |  27 +
 xen/arch/riscv/traps.c                      | 229 +++++
 xen/arch/riscv/xen.lds.S                    |  10 +
 16 files changed, 1742 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/riscv/entry.S
 create mode 100644 xen/arch/riscv/include/asm/asm.h
 create mode 100644 xen/arch/riscv/include/asm/bug.h
 create mode 100644 xen/arch/riscv/include/asm/csr.h
 create mode 100644 xen/arch/riscv/include/asm/processor.h
 create mode 100644 xen/arch/riscv/include/asm/riscv_encoding.h
 create mode 100644 xen/arch/riscv/include/asm/traps.h
 create mode 100644 xen/arch/riscv/traps.c

-- 
2.39.0



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

end of thread, other threads:[~2023-01-31 12:30 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 14:59 [PATCH v1 00/14] RISCV basic exception handling implementation Oleksii Kurochko
2023-01-20 14:59 ` [PATCH v1 01/14] xen/riscv: add _zicsr to CFLAGS Oleksii Kurochko
2023-01-20 15:29   ` Andrew Cooper
2023-01-23 10:43     ` Oleksii
2023-01-31 11:49       ` Alistair Francis
2023-01-31 12:30         ` Oleksii
2023-01-20 14:59 ` [PATCH v1 02/14] xen/riscv: add <asm/asm.h> header Oleksii Kurochko
2023-01-20 15:31   ` Andrew Cooper
2023-01-23 11:00     ` Jan Beulich
2023-01-23 11:10       ` Andrew Cooper
2023-01-22 22:58   ` Alistair Francis
2023-01-20 14:59 ` [PATCH v1 03/14] xen/riscv: add <asm/riscv_encoding.h header Oleksii Kurochko
2023-01-22 23:24   ` Alistair Francis
2023-01-23 13:52   ` Jan Beulich
2023-01-23 14:04     ` Oleksii
2023-01-23 14:06       ` Jan Beulich
2023-01-20 14:59 ` [PATCH v1 04/14] xen/riscv: add <asm/csr.h> header Oleksii Kurochko
2023-01-22 23:25   ` Alistair Francis
2023-01-23 13:57   ` Jan Beulich
2023-01-23 14:23     ` Oleksii
2023-01-23 14:31       ` Jan Beulich
2023-01-20 14:59 ` [PATCH v1 05/14] xen/riscv: add early_printk_hnum() function Oleksii Kurochko
2023-01-20 15:39   ` Andrew Cooper
2023-01-23 12:05     ` Oleksii
2023-01-23 11:10   ` Jan Beulich
2023-01-20 14:59 ` [PATCH v1 06/14] xen/riscv: introduce exception context Oleksii Kurochko
2023-01-20 15:54   ` Andrew Cooper
2023-01-23 12:03     ` Oleksii
2023-01-23 12:25       ` Andrew Cooper
2023-01-23 11:13   ` Jan Beulich
2023-01-20 14:59 ` [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation Oleksii Kurochko
2023-01-22 23:29   ` Alistair Francis
2023-01-23 11:17   ` Jan Beulich
2023-01-23 15:04     ` Oleksii
2023-01-23 11:50   ` Andrew Cooper
2023-01-23 12:41     ` Jan Beulich
2023-01-23 15:17     ` Oleksii
2023-01-23 20:09       ` Andrew Cooper
2023-01-25 14:44     ` Oleksii
2023-01-20 14:59 ` [PATCH v1 08/14] xen/riscv: introduce decode_cause() stuff Oleksii Kurochko
2023-01-22 23:38   ` Alistair Francis
2023-01-23 12:09   ` Andrew Cooper
2023-01-20 14:59 ` [PATCH v1 09/14] xen/riscv: introduce do_unexpected_trap() Oleksii Kurochko
2023-01-22 23:39   ` Alistair Francis
2023-01-25 17:01     ` Oleksii
2023-01-25 17:11       ` Julien Grall
2023-01-25 17:15       ` Andrew Cooper
2023-01-26  8:40         ` Oleksii
2023-01-20 14:59 ` [PATCH v1 10/14] xen/riscv: mask all interrupts Oleksii Kurochko
2023-01-22 23:40   ` Alistair Francis
2023-01-20 14:59 ` [PATCH v1 11/14] xen/riscv: introduce setup_trap_handler() Oleksii Kurochko
2023-01-22 23:41   ` Alistair Francis
2023-01-23 23:21   ` Andrew Cooper
2023-01-20 14:59 ` [PATCH v1 12/14] xen/riscv: introduce an implementation of macros from <asm/bug.h> Oleksii Kurochko
2023-01-23 11:37   ` Jan Beulich
2023-01-20 14:59 ` [PATCH v1 13/14] xen/riscv: test basic handling stuff Oleksii Kurochko
2023-01-20 14:59 ` [PATCH v1 14/14] automation: add smoke test to verify macros from bug.h Oleksii Kurochko
2023-01-24 23:53   ` Stefano Stabellini

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.