[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking wit
From: |
Jason Gunthorpe |
Subject: |
Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU |
Date: |
Wed, 22 Feb 2023 22:08:33 -0400 |
On Wed, Feb 22, 2023 at 04:34:39PM -0700, Alex Williamson wrote:
> > + /*
> > + * With vIOMMU we try to track the entire IOVA space. As the IOVA
> > space can
> > + * be rather big, devices might not be able to track it due to HW
> > + * limitations. In that case:
> > + * (1) Retry tracking a smaller part of the IOVA space.
> > + * (2) Retry tracking a range in the size of the physical memory.
>
> This looks really sketchy, why do we think there's a "good enough"
> value here? If we get it wrong, the device potentially has access to
> IOVA space that we're not tracking, right?
The idea was the untracked range becomes permanently dirty, so at
worst this means the migration never converges.
#2 is the presumption that the guest is using an identity map.
> I'd think the only viable fallback if the vIOMMU doesn't report its max
> IOVA is the full 64-bit address space, otherwise it seems like we need
> to add a migration blocker.
This is basically saying vIOMMU doesn't work with migration, and we've
heard that this isn't OK. There are cases where vIOMMU is on but the
guest always uses identity maps. eg for virtual interrupt remapping.
We also have future problems that nested translation is incompatible
with device dirty tracking..
Jason
- Re: [PATCH v2 10/20] vfio/common: Record DMA mapped IOVA ranges, (continued)
[PATCH v2 12/20] vfio/common: Extract code from vfio_get_dirty_bitmap() to new function, Avihai Horon, 2023/02/22
[PATCH v2 14/20] vfio/common: Extract vIOMMU code from vfio_sync_dirty_bitmap(), Avihai Horon, 2023/02/22
[PATCH v2 13/20] vfio/common: Add device dirty page bitmap sync, Avihai Horon, 2023/02/22
[PATCH v2 15/20] memory/iommu: Add IOMMU_ATTR_MAX_IOVA attribute, Avihai Horon, 2023/02/22
[PATCH v2 16/20] intel-iommu: Implement get_attr() method, Avihai Horon, 2023/02/22
[PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Avihai Horon, 2023/02/22
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Alex Williamson, 2023/02/22
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU,
Jason Gunthorpe <=
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Alex Williamson, 2023/02/23
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Jason Gunthorpe, 2023/02/23
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/02/23
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Alex Williamson, 2023/02/23
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Jason Gunthorpe, 2023/02/23
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/02/24
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/02/24
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Jason Gunthorpe, 2023/02/24
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Alex Williamson, 2023/02/24
- Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/02/24