Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-25 Thread Oleksii
On Mon, 2023-01-23 at 11:50 +, Andrew Cooper wrote: > > > > +    /* Save context to stack */ > > +    REG_S   sp, (RISCV_CPU_USER_REGS_OFFSET(sp) - > > RISCV_CPU_USER_REGS_SIZE) (sp) > > +    addi    sp, sp, -RISCV_CPU_USER_REGS_SIZE > > +    REG_S   t0,

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-23 Thread Andrew Cooper
On 23/01/2023 3:17 pm, Oleksii wrote: > On Mon, 2023-01-23 at 11:50 +, Andrew Cooper wrote: >> On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: >>> +    /* Save context to stack */ >>> +    REG_S   sp, (RISCV_CPU_USER_REGS_OFFSET(sp) - >>> RISCV_CPU_USER_REGS_SIZE) (sp) >>> +    addi 

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-23 Thread Oleksii
On Mon, 2023-01-23 at 11:50 +, Andrew Cooper wrote: > On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > > diff --git a/xen/arch/riscv/entry.S b/xen/arch/riscv/entry.S > > new file mode 100644 > > index 00..f7d46f42bb > > --- /dev/null > > +++ b/xen/arch/riscv/entry.S > > @@ -0,0 +1,97

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-23 Thread Oleksii
On Mon, 2023-01-23 at 12:17 +0100, Jan Beulich wrote: > On 20.01.2023 15:59, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/entry.S > > @@ -0,0 +1,97 @@ > > +#include > > +#include > > +#include > > +#include > > + > > +    .global handle_exception > > +    .align 4

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-23 Thread Jan Beulich
On 23.01.2023 12:50, Andrew Cooper wrote: > On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: >> +csrrt0, CSR_SEPC >> +REG_S t0, RISCV_CPU_USER_REGS_OFFSET(sepc)(sp) >> +csrrt0, CSR_SSTATUS >> +REG_S t0, RISCV_CPU_USER_REGS_OFFSET(sstatus)(sp) > > So

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-23 Thread Andrew Cooper
On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > diff --git a/xen/arch/riscv/entry.S b/xen/arch/riscv/entry.S > new file mode 100644 > index 00..f7d46f42bb > --- /dev/null > +++ b/xen/arch/riscv/entry.S > @@ -0,0 +1,97 @@ > +#include > +#include > +#include > +#include > + > +

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-23 Thread Jan Beulich
On 20.01.2023 15:59, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/arch/riscv/entry.S > @@ -0,0 +1,97 @@ > +#include > +#include > +#include > +#include > + > +.global handle_exception > +.align 4 > + > +handle_exception: > + > +/* Exceptions from xen */ >

Re: [PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-22 Thread Alistair Francis
On Sat, Jan 21, 2023 at 1:00 AM Oleksii Kurochko wrote: > > The patch introduces an implementation of basic exception handlers: > - to save/restore context > - to handle an exception itself. The handler calls wait_for_interrupt > now, nothing more. > > Signed-off-by: Oleksii Kurochko

[PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-20 Thread Oleksii Kurochko
The patch introduces an implementation of basic exception handlers: - to save/restore context - to handle an exception itself. The handler calls wait_for_interrupt now, nothing more. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile| 2 + xen/arch/riscv/entry.S