Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-03-22 Thread Oleksii
Hi Julien, On Tue, 2023-03-21 at 16:25 +, Julien Grall wrote: > > > On 05/03/2023 16:25, Oleksii wrote: > > Hi Julien, > > Hi, > > Sorry for the late answer. I was away for the past couple of weeks. > > > On Mon, 2023-02-27 at 17:36 +, Julien Grall wrote: > > > Hi Oleksii, > > > > >

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-03-21 Thread Julien Grall
On 05/03/2023 16:25, Oleksii wrote: Hi Julien, Hi, Sorry for the late answer. I was away for the past couple of weeks. On Mon, 2023-02-27 at 17:36 +, Julien Grall wrote: Hi Oleksii, On 27/02/2023 16:52, Oleksii wrote: On Sat, 2023-02-25 at 17:53 +, Julien Grall wrote: +/* + *

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-03-05 Thread Oleksii
On Mon, 2023-02-27 at 16:19 +0100, Jan Beulich wrote: > On 27.02.2023 16:12, Jan Beulich wrote: > > On 24.02.2023 16:06, Oleksii Kurochko wrote: > > > +static void __attribute__((section(".entry"))) > > > +_setup_initial_pagetables(pte_t *second, pte_t *first, pte_t > > > *zeroeth, > > > > Why the

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-03-05 Thread Oleksii
On Mon, 2023-02-27 at 16:12 +0100, Jan Beulich wrote: > On 24.02.2023 16:06, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/page.h > > @@ -0,0 +1,90 @@ > > +#ifndef _ASM_RISCV_PAGE_H > > +#define _ASM_RISCV_PAGE_H > > + > > +#include > > +#include > > + > > +#defin

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-03-05 Thread Oleksii
> > > > > > > > > > > > + > > > > > +    page_addr = map_start; > > > > > +    while ( page_addr < map_end ) > > > > > > > > Looking at the loop, it looks like you are assuming that the > > > > region > > > > will > > > > never cross a boundary of a page-table (either L0, L1, L2). I > > > > am

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-03-05 Thread Oleksii
Hi Julien, On Mon, 2023-02-27 at 17:36 +, Julien Grall wrote: > Hi Oleksii, > > On 27/02/2023 16:52, Oleksii wrote: > > On Sat, 2023-02-25 at 17:53 +, Julien Grall wrote: > > > > +/* > > > > + * WARNING: load_addr() and linker_addr() are to be called > > > > only > > > > when the MMU is >

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-27 Thread Julien Grall
Hi Oleksii, On 27/02/2023 16:52, Oleksii wrote: On Sat, 2023-02-25 at 17:53 +, Julien Grall wrote: +/* + * WARNING: load_addr() and linker_addr() are to be called only when the MMU is + * disabled and only when executed by the primary CPU.  They cannot refer to + * any global variable or fu

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-27 Thread Oleksii
On Sat, 2023-02-25 at 17:53 +, Julien Grall wrote: > Hi Oleksii, > > On 24/02/2023 15:06, Oleksii Kurochko wrote: > > Mostly the code for setup_initial_pages was taken from Bobby's > > repo except for the following changes: > > * Use only a minimal part of the code enough to enable MMU > > * r

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-27 Thread Jan Beulich
On 27.02.2023 16:12, Jan Beulich wrote: > On 24.02.2023 16:06, Oleksii Kurochko wrote: >> +static void __attribute__((section(".entry"))) >> +_setup_initial_pagetables(pte_t *second, pte_t *first, pte_t *zeroeth, > > Why the special section (also again further down)? Looking at patch 2 it occurre

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-27 Thread Jan Beulich
On 24.02.2023 16:06, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/arch/riscv/include/asm/page.h > @@ -0,0 +1,90 @@ > +#ifndef _ASM_RISCV_PAGE_H > +#define _ASM_RISCV_PAGE_H > + > +#include > +#include > + > +#define PAGE_ENTRIES512 > +#define VPN_BITS(9) > +#def

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-25 Thread Julien Grall
Hi Oleksii, On 24/02/2023 15:06, Oleksii Kurochko wrote: Mostly the code for setup_initial_pages was taken from Bobby's repo except for the following changes: * Use only a minimal part of the code enough to enable MMU * rename {_}setup_initial_pagetables functions * add writable argument for _se

Re: [PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-24 Thread Andrew Cooper
On 24/02/2023 3:06 pm, Oleksii Kurochko wrote: > diff --git a/xen/arch/riscv/include/asm/page.h > b/xen/arch/riscv/include/asm/page.h > new file mode 100644 > index 00..fabbe1305f > --- /dev/null > +++ b/xen/arch/riscv/include/asm/page.h > @@ -0,0 +1,90 @@ > +#ifndef _ASM_RISCV_PAGE_H > +#

[PATCH v1 1/3] xen/riscv: introduce setup_initial_pages

2023-02-24 Thread Oleksii Kurochko
Mostly the code for setup_initial_pages was taken from Bobby's repo except for the following changes: * Use only a minimal part of the code enough to enable MMU * rename {_}setup_initial_pagetables functions * add writable argument for _setup_initial_pagetables to have an opportunity to make some