Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-16 Thread Boris Ostrovsky
On 5/16/22 2:30 PM, Oleksandr wrote: On 16.05.22 19:00, Boris Ostrovsky wrote: With the error handling in gnttab_init() fixed yes, this is a diff that I am going to apply for the next version: [snip] @@ -1596,19 +1601,20 @@ static int gnttab_expand(unsigned int req_entries)  int

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-16 Thread Oleksandr
On 16.05.22 19:00, Boris Ostrovsky wrote: Hello Boris On 5/16/22 1:59 AM, Juergen Gross wrote: On 14.05.22 04:34, Boris Ostrovsky wrote: On 5/13/22 1:33 AM, Juergen Gross wrote: On 12.05.22 22:01, Boris Ostrovsky wrote: On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: +/* Rebuilds

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-16 Thread Boris Ostrovsky
On 5/16/22 1:59 AM, Juergen Gross wrote: On 14.05.22 04:34, Boris Ostrovsky wrote: On 5/13/22 1:33 AM, Juergen Gross wrote: On 12.05.22 22:01, Boris Ostrovsky wrote: On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: +/* Rebuilds the free grant list and tries to find count consecutive

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-16 Thread Juergen Gross
On 14.05.22 04:34, Boris Ostrovsky wrote: On 5/13/22 1:33 AM, Juergen Gross wrote: On 12.05.22 22:01, Boris Ostrovsky wrote: On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: +/* Rebuilds the free grant list and tries to find count consecutive entries. */ +static int get_free_seq(unsigned

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-13 Thread Boris Ostrovsky
On 5/13/22 1:33 AM, Juergen Gross wrote: On 12.05.22 22:01, Boris Ostrovsky wrote: On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: +/* Rebuilds the free grant list and tries to find count consecutive entries. */ +static int get_free_seq(unsigned int count) +{ +    int ret = -ENOSPC; +   

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-13 Thread Oleksandr
On 13.05.22 08:33, Juergen Gross wrote: On 12.05.22 22:01, Boris Ostrovsky wrote: Hello Juergen, Boris [Juergen, thank you for your explanation] On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: + +/* + * Handling of free grants: + * + * Free grants are in a simple list anchored in

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-12 Thread Juergen Gross
On 12.05.22 22:01, Boris Ostrovsky wrote: On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: + +/* + * Handling of free grants: + * + * Free grants are in a simple list anchored in gnttab_free_head. They are + * linked by grant ref, the last element contains GNTTAB_LIST_END. The number + * of free

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-12 Thread Boris Ostrovsky
On 5/7/22 2:19 PM, Oleksandr Tyshchenko wrote: + +/* + * Handling of free grants: + * + * Free grants are in a simple list anchored in gnttab_free_head. They are + * linked by grant ref, the last element contains GNTTAB_LIST_END. The number + * of free entries is stored in gnttab_free_count. +

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-12 Thread Oleksandr
On 12.05.22 00:09, Boris Ostrovsky wrote: Hello Boris On 5/11/22 2:00 PM, Oleksandr wrote: On 07.05.22 21:19, Oleksandr Tyshchenko wrote: Hello Boris, Stefano From: Juergen Gross For support of virtio via grant mappings in rare cases larger mappings using consecutive grants are

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-11 Thread Boris Ostrovsky
On 5/11/22 2:00 PM, Oleksandr wrote: On 07.05.22 21:19, Oleksandr Tyshchenko wrote: Hello Boris, Stefano From: Juergen Gross For support of virtio via grant mappings in rare cases larger mappings using consecutive grants are needed. Support those by adding a bitmap of free grants. As

Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants

2022-05-11 Thread Oleksandr
On 07.05.22 21:19, Oleksandr Tyshchenko wrote: Hello Boris, Stefano From: Juergen Gross For support of virtio via grant mappings in rare cases larger mappings using consecutive grants are needed. Support those by adding a bitmap of free grants. As consecutive grants will be needed only