Re: [PATCH v2 fixed 02/16] util: vfio-helpers: Fix qemu_vfio_close()

2020-02-18 Thread Peter Xu
On Wed, Feb 12, 2020 at 02:42:40PM +0100, David Hildenbrand wrote: > qemu_vfio_undo_mapping() will decrement the number of mappings and > reshuffle the array elements to fit into the reduced size. > > Iterating over all elements like this does not work as expected, let's make > sure to remove all

[PATCH v2 fixed 02/16] util: vfio-helpers: Fix qemu_vfio_close()

2020-02-12 Thread David Hildenbrand
qemu_vfio_undo_mapping() will decrement the number of mappings and reshuffle the array elements to fit into the reduced size. Iterating over all elements like this does not work as expected, let's make sure to remove all mappings properly. Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo Hab