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, RISCV_CPU_USER_REGS_OF
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
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 @@
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
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 someth
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
> +
> +.g
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 */
> +save_to_sta
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
Reviewed-
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