[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr()
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr() |
Date: |
Wed, 25 Jan 2017 18:40:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 25/01/2017 18:36, Alex Williamson wrote:
>> You probably should also put a comment about why VFIO does *not* need to
>> keep a reference between vfio_dma_map and vfio_dma_unmap (which doesn't
>> sound easy to do either). Would any well-behaved guest invalidate the
>> IOMMU page tables before a memory hot-unplug?
>
> Hmm, we do take a reference in vfio_listener_region_add(), but this is
> of course to the iommu region not to the RAM region we're translating.
> In the non-vIOMMU case we would be holding a reference to the memory
> region backing a DMA mapping. I would expect a well behaved guest to
> evacuate DMA mappings targeting a hotplug memory region before it gets
> ejected, but how much do we want to rely on well behaved guests.
It depends of what happens if they aren't. I think it's fine (see other
message), but taking a reference for each mapping entry isn't so easy
because the unmap case doesn't know the old memory region.
Paolo
> Perhaps we should be taking a reference for each mapping entry, though
> this makes Peter's plans to invalidate the entire address space much
> more difficult. Thanks,
- [Qemu-devel] [PATCH v5 00/18] VT-d: vfio enablement and misc enhances, Peter Xu, 2017/01/24
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Paolo Bonzini, 2017/01/25
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Alex Williamson, 2017/01/25
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(),
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Alex Williamson, 2017/01/25
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Paolo Bonzini, 2017/01/25
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Alex Williamson, 2017/01/25
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Peter Xu, 2017/01/26
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Peter Xu, 2017/01/26
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Paolo Bonzini, 2017/01/26
- Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr(), Peter Xu, 2017/01/26
[Qemu-devel] [PATCH v5 03/18] vfio: allow to notify unmap for very large region, Peter Xu, 2017/01/24