[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 15/15] vfio/common: Block migration with vIOMMUs without addre
|
From: |
Joao Martins |
|
Subject: |
[PATCH v3 15/15] vfio/common: Block migration with vIOMMUs without address width limits |
|
Date: |
Tue, 30 May 2023 18:59:37 +0100 |
Only block the case when the underlying vIOMMU model does not report any
address space limits, in addition to DMA translation being off, or no
vIOMMU being present. The limits are needed such that can define the IOVA
limits to arm the device dirty tracker.
Additionally, reword the migration blocker error message to clarify that
we the configured vIOMMU does not support migration, as opposed to
implying that just being there blocks migration.
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
---
hw/vfio/common.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 5b211380306a..b0cf86559032 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -474,15 +474,17 @@ static int vfio_viommu_get_max_iova(hwaddr *max_iova)
int vfio_block_giommu_migration(Error **errp)
{
+ hwaddr max;
int ret;
if (giommu_migration_blocker ||
- !vfio_viommu_preset()) {
+ !vfio_viommu_preset() ||
+ (vfio_viommu_preset() && !vfio_viommu_get_max_iova(&max))) {
return 0;
}
error_setg(&giommu_migration_blocker,
- "Migration is currently not supported with vIOMMU enabled");
+ "Migration is currently not supported with the configured
vIOMMU");
ret = migrate_add_blocker(giommu_migration_blocker, errp);
if (ret < 0) {
error_free(giommu_migration_blocker);
--
2.39.3
- [PATCH v3 05/15] vfio/common: Track the IOMMU MR behind the device in addition to the AS, (continued)
- [PATCH v3 05/15] vfio/common: Track the IOMMU MR behind the device in addition to the AS, Joao Martins, 2023/05/30
- [PATCH v3 06/15] memory/iommu: Add IOMMU_ATTR_DMA_TRANSLATION attribute, Joao Martins, 2023/05/30
- [PATCH v3 07/15] intel-iommu: Implement get_attr() method, Joao Martins, 2023/05/30
- [PATCH v3 08/15] vfio/common: Relax vIOMMU detection when DMA translation is off, Joao Martins, 2023/05/30
- [PATCH v3 09/15] memory/iommu: Add IOMMU_ATTR_MAX_IOVA attribute, Joao Martins, 2023/05/30
- [PATCH v3 10/15] intel-iommu: Implement IOMMU_ATTR_MAX_IOVA get_attr() attribute, Joao Martins, 2023/05/30
- [PATCH v3 11/15] vfio/common: Move dirty tracking ranges update to helper, Joao Martins, 2023/05/30
- [PATCH v3 12/15] vfio/common: Support device dirty page tracking with vIOMMU, Joao Martins, 2023/05/30
- [PATCH v3 13/15] vfio/common: Extract vIOMMU code from vfio_sync_dirty_bitmap(), Joao Martins, 2023/05/30
- [PATCH v3 14/15] vfio/common: Optimize device dirty page tracking with vIOMMU, Joao Martins, 2023/05/30
- [PATCH v3 15/15] vfio/common: Block migration with vIOMMUs without address width limits,
Joao Martins <=