Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-23 Thread Oleksandr
On 23.09.21 19:38, Stefano Stabellini wrote: Hi Stefano On Thu, 23 Sep 2021, Oleksandr wrote: On 18.09.21 19:59, Oleksandr wrote: +#define EXT_REGION_END 0x80003fffULL + +static int __init find_unallocated_memory(const struct kernel_info *kinfo, +

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-23 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr wrote: > On 18.09.21 19:59, Oleksandr wrote: > > > > > +#define EXT_REGION_END 0x80003fffULL > > > > > + > > > > > +static int __init find_unallocated_memory(const struct kernel_info > > > > > *kinfo, > > > > > +  struct mem

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-23 Thread Oleksandr
Hi Stefano, Julien On 18.09.21 19:59, Oleksandr wrote: Hi Julien. [snip] +#define EXT_REGION_END 0x80003fffULL + +static int __init find_unallocated_memory(const struct kernel_info *kinfo, +  struct meminfo *ext_regions) +{ +    const st

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-23 Thread Oleksandr
On 23.09.21 00:05, Stefano Stabellini wrote: Hi Stefano On Wed, 22 Sep 2021, Oleksandr wrote: You will also need to cover "ranges" that will describe the BARs for the PCI devices. Good point. Yes, very good point! Could you please clarify how to recognize whether it is a PCI device as l

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-23 Thread Oleksandr
On 22.09.21 23:50, Stefano Stabellini wrote: Hi Stefano. On Wed, 22 Sep 2021, Oleksandr wrote: On 22.09.21 01:00, Stefano Stabellini wrote: On Tue, 21 Sep 2021, Oleksandr wrote: On 21.09.21 02:21, Stefano Stabellini wrote: On Sun, 19 Sep 2021, Oleksandr wrote: On 18/09/2021 03:37, Stefan

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-22 Thread Stefano Stabellini
On Wed, 22 Sep 2021, Oleksandr wrote: > > > > > You will also need to cover "ranges" that will describe the BARs for > > > > > the PCI > > > > > devices. > > > > Good point. > > > Yes, very good point! > > > > > > > > > > Could you please clarify how to recognize whether it is a PCI > > > > devic

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-22 Thread Stefano Stabellini
On Wed, 22 Sep 2021, Oleksandr wrote: > On 22.09.21 01:00, Stefano Stabellini wrote: > > On Tue, 21 Sep 2021, Oleksandr wrote: > > > On 21.09.21 02:21, Stefano Stabellini wrote: > > > > On Sun, 19 Sep 2021, Oleksandr wrote: > > > > > > On 18/09/2021 03:37, Stefano Stabellini wrote: > > > > > > > On

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-22 Thread Oleksandr
On 22.09.21 01:00, Stefano Stabellini wrote: Hi Stefano On Tue, 21 Sep 2021, Oleksandr wrote: On 21.09.21 02:21, Stefano Stabellini wrote: On Sun, 19 Sep 2021, Oleksandr wrote: On 18/09/2021 03:37, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Stefano Stabellini wrote: On Fri, 17 Sep 20

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-22 Thread Oleksandr
Hi Stefano [snip] You will also need to cover "ranges" that will describe the BARs for the PCI devices. Good point. Yes, very good point! Could you please clarify how to recognize whether it is a PCI device as long as PCI support is not merged? Or just to find any device nodes

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-21 Thread Stefano Stabellini
On Tue, 21 Sep 2021, Oleksandr wrote: > On 21.09.21 02:21, Stefano Stabellini wrote: > > On Sun, 19 Sep 2021, Oleksandr wrote: > > > > On 18/09/2021 03:37, Stefano Stabellini wrote: > > > > > On Fri, 17 Sep 2021, Stefano Stabellini wrote: > > > > > > On Fri, 17 Sep 2021, Oleksandr wrote: > > > > >

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-21 Thread Oleksandr
On 18.09.21 00:56, Stefano Stabellini wrote: Hi Stefano On Fri, 17 Sep 2021, Oleksandr wrote: + +    dt_dprintk("Find unallocated memory for extended regions\n"); + +    unalloc_mem = rangeset_new(NULL, NULL, 0); +    if ( !unalloc_mem ) +    return -ENOMEM; + +    /* Start with all avai

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-21 Thread Oleksandr
On 21.09.21 02:21, Stefano Stabellini wrote: Hi Stefano On Sun, 19 Sep 2021, Oleksandr wrote: On 18/09/2021 03:37, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Oleksandr wrote: + +    dt_dprintk("Find unallocated memory for extended regions

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-20 Thread Stefano Stabellini
On Sun, 19 Sep 2021, Julien Grall wrote: > On 18/09/2021 03:37, Stefano Stabellini wrote: > > On Fri, 17 Sep 2021, Stefano Stabellini wrote: > > > On Fri, 17 Sep 2021, Oleksandr wrote: > > > > > > + > > > > > > +    dt_dprintk("Find unallocated memory for extended regions\n"); > > > > > > + > > > >

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-20 Thread Stefano Stabellini
On Sun, 19 Sep 2021, Oleksandr wrote: > > On 18/09/2021 03:37, Stefano Stabellini wrote: > > > On Fri, 17 Sep 2021, Stefano Stabellini wrote: > > > > On Fri, 17 Sep 2021, Oleksandr wrote: > > > > > > > + > > > > > > > +    dt_dprintk("Find unallocated memory for extended regions\n"); > > > > > > >

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-19 Thread Oleksandr
On 19.09.21 17:34, Julien Grall wrote: Hi Stefano, Hi Julien On 18/09/2021 03:37, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Oleksandr wrote: + +    dt_dprintk("Find unallocated memory for extended regions\n"); + +    unalloc_mem =

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-19 Thread Oleksandr
On 19.09.21 17:00, Julien Grall wrote: Hi, Hi Julien On 18/09/2021 00:51, Oleksandr wrote: On 17.09.21 18:48, Julien Grall wrote: On 10/09/2021 23:18, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space w

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-19 Thread Julien Grall
Hi Stefano, On 18/09/2021 03:37, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Stefano Stabellini wrote: On Fri, 17 Sep 2021, Oleksandr wrote: + +    dt_dprintk("Find unallocated memory for extended regions\n"); + +    unalloc_mem = rangeset_new(NULL, NULL, 0); +    if ( !unalloc_mem ) + 

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-19 Thread Julien Grall
Hi, On 18/09/2021 00:51, Oleksandr wrote: On 17.09.21 18:48, Julien Grall wrote: On 10/09/2021 23:18, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used to create grant/f

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-18 Thread Oleksandr
Hi Julien. [snip] +#define EXT_REGION_END 0x80003fffULL + +static int __init find_unallocated_memory(const struct kernel_info *kinfo, +  struct meminfo *ext_regions) +{ +    const struct meminfo *assign_mem = &kinfo->mem; +    struct rangeset

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Stefano Stabellini
On Fri, 17 Sep 2021, Stefano Stabellini wrote: > On Fri, 17 Sep 2021, Oleksandr wrote: > > > > + > > > > +    dt_dprintk("Find unallocated memory for extended regions\n"); > > > > + > > > > +    unalloc_mem = rangeset_new(NULL, NULL, 0); > > > > +    if ( !unalloc_mem ) > > > > +    return -ENO

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Stefano Stabellini
On Fri, 17 Sep 2021, Oleksandr wrote: > > > + > > > +    dt_dprintk("Find unallocated memory for extended regions\n"); > > > + > > > +    unalloc_mem = rangeset_new(NULL, NULL, 0); > > > +    if ( !unalloc_mem ) > > > +    return -ENOMEM; > > > + > > > +    /* Start with all available RAM */ >

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Oleksandr
On 17.09.21 18:52, Julien Grall wrote: Hi Julien On 16/09/2021 00:10, Oleksandr wrote: + * The extended regions will be prevalidated by the memory hotplug path + * in Linux which requires for any added address range to be within maximum + * possible addressable physical memory range for w

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Oleksandr
On 17.09.21 18:48, Julien Grall wrote: Hi Oleksandr, Hi Julien On 10/09/2021 23:18, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used to create grant/foreign mappi

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Julien Grall
On 16/09/2021 00:10, Oleksandr wrote: + * The extended regions will be prevalidated by the memory hotplug path + * in Linux which requires for any added address range to be within maximum + * possible addressable physical memory range for which the linear mapping + * could be created. + * F

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Julien Grall
Hi Oleksandr, On 10/09/2021 23:18, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used to create grant/foreign mappings instead of wasting real RAM pages from the domain mem

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Oleksandr
On 15.09.21 22:10, Oleksandr wrote: Hi Stefano. [snip] +static int __init find_memory_holes(const struct kernel_info *kinfo, +    struct meminfo *ext_regions) +{ +    struct dt_device_node *np; +    struct rangeset *mem_holes; +    paddr_t start, end; +    un

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-17 Thread Oleksandr
On 17.09.21 00:30, Stefano Stabellini wrote: Hi Stefano On Thu, 16 Sep 2021, Oleksandr wrote: On Wed, 15 Sep 2021, Oleksandr wrote: On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space whi

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Oleksandr wrote: > > On Wed, 15 Sep 2021, Oleksandr wrote: > > > > On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: > > > > > From: Oleksandr Tyshchenko > > > > > > > > > > The extended region (safe range) is a region of guest physical > > > > > address space which is unused

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-16 Thread Oleksandr
On 16.09.21 00:21, Stefano Stabellini wrote: Hi Stefano On Wed, 15 Sep 2021, Oleksandr wrote: On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used t

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-15 Thread Stefano Stabellini
On Wed, 15 Sep 2021, Oleksandr wrote: > > On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > > > > > The extended region (safe range) is a region of guest physical > > > address space which is unused and could be safely used to create > > > grant/foreign mapping

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-15 Thread Oleksandr
On 14.09.21 03:55, Stefano Stabellini wrote: Hi Stefano On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used to create grant/foreign mappings instead

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-13 Thread Stefano Stabellini
On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > The extended region (safe range) is a region of guest physical > address space which is unused and could be safely used to create > grant/foreign mappings instead of wasting real RAM pages from > the domain memory f

[PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-10 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used to create grant/foreign mappings instead of wasting real RAM pages from the domain memory for establishing these mappings. The extended regions are cho