[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v11 03/12] xen/arm: permit non direct-mapped Dom0 construction



On Fri, Dec 13, 2024 at 12:47 PM Michal Orzel <michal.orzel@xxxxxxx> wrote:
>
>
>
> On 13/12/2024 12:33, Carlo Nonato wrote:
> >
> >
> > Using paste.debian:
> >
> > https://paste.debian.net/1339647/
>
> 1. Issue I mentioned with prefixing with double underscore
> 2. Generic helper should not be named ext_regions
> 3. s/skip_size/min_bank_size/
>
> And still you need to convince others about 128MB limit because I'm not sure.
>
> Imagine, that our kernel+dtb+ramdisk is > 128MB and your first bank is 128MB. 
> With your
> solution this would fail. Now, imagine that you sort your banks and start 
> with the biggest
> one. You don't care about its size. It's the biggest one so if it does not 
> fit, then that's not
> your problem.
>
> ~Michal
>

Something like that in add_hwdom_free_regions()?

>     /* Find the insert position (descending order). */
>     for ( i = 0; i < free_regions->nr_banks ; i++)
>         if ( size > free_regions->bank[i].size )
>             break;
>
>     /* Move the other banks to make space. */
>     for ( j = free_regions->nr_banks; j > i ; j-- )
>     {
>         free_regions->bank[j].start = free_regions->bank[j - 1].start;
>         free_regions->bank[j].size = free_regions->bank[j - 1].size;
>     }
>
>     free_regions->bank[i].start = start;
>     free_regions->bank[i].size = size;
>     free_regions->nr_banks++;

With that (if I didn't make any mistake) I'm inserting banks in descending size
order. Is it ok?

Thanks.

- Carlo



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.