Re: [PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-23 Thread Andrew Cooper
On 23/01/2023 12:03 pm, Oleksii wrote: > On Fri, 2023-01-20 at 15:54 +, Andrew Cooper wrote: >> On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: >>> + >>> +#define RISCV_CPU_USER_REGS_OFFSET(x)   ((RISCV_CPU_USER_REGS_##x) >>> * __SIZEOF_POINTER__) >>> +#define RISCV_CPU_USER_REGS_SIZE    >>>

Re: [PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-23 Thread Oleksii
On Fri, 2023-01-20 at 15:54 +, Andrew Cooper wrote: > On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > > diff --git a/xen/arch/riscv/include/asm/processor.h > > b/xen/arch/riscv/include/asm/processor.h > > new file mode 100644 > > index 00..5898a09ce6 > > --- /dev/null > > +++ b/xen/arc

Re: [PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-23 Thread Jan Beulich
On 20.01.2023 15:59, Oleksii Kurochko wrote: > +/* On stack VCPU state */ > +struct cpu_user_regs > +{ > +register_t zero; > +register_t ra; > +register_t sp; > +register_t gp; > +register_t tp; > +register_t t0; > +register_t t1; > +register_t t2; > +register_t

Re: [PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > diff --git a/xen/arch/riscv/include/asm/processor.h > b/xen/arch/riscv/include/asm/processor.h > new file mode 100644 > index 00..5898a09ce6 > --- /dev/null > +++ b/xen/arch/riscv/include/asm/processor.h > @@ -0,0 +1,114 @@ > +/* SPDX-Licens

[PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-20 Thread Oleksii Kurochko
The patch introduces a set of registers which should be saved to and restored from a stack after an exception occurs and a set of defines which will be used during exception context saving/restoring. Originally header was introduced in the patch series from Bobby so mostly it was re-used and remo