[PATCH v2 2/2] util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions

2020-09-29 Thread Eric Auger
Introduce the qemu_vfio_find_fixed/temp_iova helpers which respectively allocate IOVAs from the bottom/top parts of the usable IOVA range, without picking within host IOVA reserved windows. The allocation remains basic: if the size is too big for the remaining of the current usable IOVA range, we j

Re: [PATCH v2 2/2] util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions

2020-09-29 Thread Stefan Hajnoczi
On Tue, Sep 29, 2020 at 10:55:50AM +0200, Eric Auger wrote: > diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c > index ba0ee6e21c..71145970f3 100644 > --- a/util/vfio-helpers.c > +++ b/util/vfio-helpers.c > @@ -667,6 +667,50 @@ static bool qemu_vfio_verify_mappings(QEMUVFIOState *s) > re

Re: [PATCH v2 2/2] util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions

2020-09-29 Thread Auger Eric
Hi Stefan, On 9/29/20 5:59 PM, Stefan Hajnoczi wrote: > On Tue, Sep 29, 2020 at 10:55:50AM +0200, Eric Auger wrote: >> diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c >> index ba0ee6e21c..71145970f3 100644 >> --- a/util/vfio-helpers.c >> +++ b/util/vfio-helpers.c >> @@ -667,6 +667,50 @@ sta

Re: [PATCH v2 2/2] util/vfio-helpers: Rework the IOVA allocator to avoid IOVA reserved regions

2020-09-30 Thread Stefan Hajnoczi
On Tue, Sep 29, 2020 at 09:44:48PM +0200, Auger Eric wrote: > Hi Stefan, > > On 9/29/20 5:59 PM, Stefan Hajnoczi wrote: > > On Tue, Sep 29, 2020 at 10:55:50AM +0200, Eric Auger wrote: > >> diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c > >> index ba0ee6e21c..71145970f3 100644 > >> --- a/ut