Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Jan Beulich
On 14.06.2023 13:06, Oleksii wrote: >>> +} >>> + >>> +void __init remove_identity_mapping(void) >>> +{ >>> +    int i, j; >> >> Nit: unsigned int please. >> >> > It should be int in the current case because of the 'for' exit > condition: > for ( pgtbl = stage1_pgtbl_root, i = CONFIG_PAGING_LE

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Oleksii
> > +} > > + > > +void __init remove_identity_mapping(void) > > +{ > > +    int i, j; > > Nit: unsigned int please. > > It should be int in the current case because of the 'for' exit condition: for ( pgtbl = stage1_pgtbl_root, i = CONFIG_PAGING_LEVELS - 1; i >= 0; i-- ) Should exit condit

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Jan Beulich
On 14.06.2023 11:47, Oleksii wrote: > On Mon, 2023-06-12 at 15:48 +0200, Jan Beulich wrote: >> On 06.06.2023 21:55, Oleksii Kurochko wrote: >>> The way how switch to virtual address was implemented in the >>> commit e66003e7be ("xen/riscv: introduce setup_initial_pages") >>> wasn't safe enough so i

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Oleksii
On Mon, 2023-06-12 at 16:24 +0200, Jan Beulich wrote: > On 12.06.2023 15:48, Jan Beulich wrote: > > On 06.06.2023 21:55, Oleksii Kurochko wrote: > > > -void __init noreturn noinline enable_mmu() > > > +/* > > > + * enable_mmu() can't be __init because __init section isn't > > > part of identity > >

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Oleksii
On Mon, 2023-06-12 at 15:48 +0200, Jan Beulich wrote: > On 06.06.2023 21:55, Oleksii Kurochko wrote: > > The way how switch to virtual address was implemented in the > > commit e66003e7be ("xen/riscv: introduce setup_initial_pages") > > wasn't safe enough so identity mapping was introduced and > >

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-12 Thread Jan Beulich
On 12.06.2023 15:48, Jan Beulich wrote: > On 06.06.2023 21:55, Oleksii Kurochko wrote: >> -void __init noreturn noinline enable_mmu() >> +/* >> + * enable_mmu() can't be __init because __init section isn't part of >> identity >> + * mapping so it will cause an issue after MMU will be enabled. >> +

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-12 Thread Jan Beulich
On 06.06.2023 21:55, Oleksii Kurochko wrote: > The way how switch to virtual address was implemented in the > commit e66003e7be ("xen/riscv: introduce setup_initial_pages") > wasn't safe enough so identity mapping was introduced and > used. I don't think this is sufficient as a description. You wa

[PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-06 Thread Oleksii Kurochko
The way how switch to virtual address was implemented in the commit e66003e7be ("xen/riscv: introduce setup_initial_pages") wasn't safe enough so identity mapping was introduced and used. Fixes: e66003e7be ("xen/riscv: introduce setup_initial_pages") Signed-off-by: Oleksii Kurochko --- xen/arch/