On 28.02.20 22:01, Peter Xu wrote:
> On Fri, Feb 28, 2020 at 09:16:28PM +0100, David Hildenbrand wrote:
>>
>
> [...]
>
@@ -631,7 +658,7 @@ int qemu_vfio_dma_map(QEMUVFIOState *s, void *host,
size_t size,
qemu_vfio_remove_mapping(s, mapping);
go
On Fri, Feb 28, 2020 at 09:16:28PM +0100, David Hildenbrand wrote:
>
[...]
> >> @@ -631,7 +658,7 @@ int qemu_vfio_dma_map(QEMUVFIOState *s, void *host,
> >> size_t size,
> >> qemu_vfio_remove_mapping(s, mapping);
> >> goto out;
> >> }
> >> -
> Am 28.02.2020 um 21:49 schrieb Peter Xu :
>
> On Fri, Feb 28, 2020 at 03:19:45PM -0500, David Hildenbrand wrote:
>>
>>
Am 28.02.2020 um 20:55 schrieb Peter Xu :
>>>
>>> On Thu, Feb 27, 2020 at 11:12:02AM +0100, David Hildenbrand wrote:
+static void qemu_vfio_dma_map_resize(QEMU
On Fri, Feb 28, 2020 at 03:19:45PM -0500, David Hildenbrand wrote:
>
>
> > Am 28.02.2020 um 20:55 schrieb Peter Xu :
> >
> > On Thu, Feb 27, 2020 at 11:12:02AM +0100, David Hildenbrand wrote:
> >> +static void qemu_vfio_dma_map_resize(QEMUVFIOState *s, void *host,
> >> +
> Am 28.02.2020 um 20:55 schrieb Peter Xu :
>
> On Thu, Feb 27, 2020 at 11:12:02AM +0100, David Hildenbrand wrote:
>> +static void qemu_vfio_dma_map_resize(QEMUVFIOState *s, void *host,
>> + size_t old_size, size_t new_size)
>> +{
>> +IOVAMapping *m;
>> +
> Am 28.02.2020 um 20:43 schrieb Peter Xu :
>
> On Thu, Feb 27, 2020 at 11:12:02AM +0100, David Hildenbrand wrote:
>> Let's implement ram_block_resized(), allowing resizeable mappings.
>>
>> For resizeable mappings, we reserve $max_size IOVA address space, but only
>> map $size of it. When re
On Thu, Feb 27, 2020 at 11:12:02AM +0100, David Hildenbrand wrote:
> +static void qemu_vfio_dma_map_resize(QEMUVFIOState *s, void *host,
> + size_t old_size, size_t new_size)
> +{
> +IOVAMapping *m;
> +int index = 0;
> +
> +qemu_mutex_lock(&s->lock);
On Thu, Feb 27, 2020 at 11:12:02AM +0100, David Hildenbrand wrote:
> Let's implement ram_block_resized(), allowing resizeable mappings.
>
> For resizeable mappings, we reserve $max_size IOVA address space, but only
> map $size of it. When resizing, unmap the old part and remap the new
> part. We'l
Let's implement ram_block_resized(), allowing resizeable mappings.
For resizeable mappings, we reserve $max_size IOVA address space, but only
map $size of it. When resizing, unmap the old part and remap the new
part. We'll need a new ioctl to do this atomically (e.g., to resize
while the guest is