aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2022-05-13 08:20:08 -0600
committerAlex Williamson <alex.williamson@redhat.com>2022-05-13 08:20:11 -0600
commite4082063e47e9731dbeb1c26174c17f6038f577f (patch)
treefca7d5c3f029a4c53bd2171d2a8f06eed5c64221 /hw/vfio
parent9de5f2b40860c5f8295e73fea9922df6f0b8d89a (diff)
downloadqemu-e4082063e47e9731dbeb1c26174c17f6038f577f.zip
qemu-e4082063e47e9731dbeb1c26174c17f6038f577f.tar.gz
qemu-e4082063e47e9731dbeb1c26174c17f6038f577f.tar.bz2
linux-headers: Update to v5.18-rc6
Update to c5eb0a61238d ("Linux 5.18-rc6"). Mechanical search and replace of vfio defines with white space massaging. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r--hw/vfio/common.c6
-rw-r--r--hw/vfio/migration.c27
2 files changed, 18 insertions, 15 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 159f910..29982c7 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -355,7 +355,7 @@ static bool vfio_devices_all_dirty_tracking(VFIOContainer *container)
}
if ((vbasedev->pre_copy_dirty_page_tracking == ON_OFF_AUTO_OFF)
- && (migration->device_state & VFIO_DEVICE_STATE_RUNNING)) {
+ && (migration->device_state & VFIO_DEVICE_STATE_V1_RUNNING)) {
return false;
}
}
@@ -381,8 +381,8 @@ static bool vfio_devices_all_running_and_saving(VFIOContainer *container)
return false;
}
- if ((migration->device_state & VFIO_DEVICE_STATE_SAVING) &&
- (migration->device_state & VFIO_DEVICE_STATE_RUNNING)) {
+ if ((migration->device_state & VFIO_DEVICE_STATE_V1_SAVING) &&
+ (migration->device_state & VFIO_DEVICE_STATE_V1_RUNNING)) {
continue;
} else {
return false;
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index ff6b45d..a6ad1f8 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -432,7 +432,7 @@ static int vfio_save_setup(QEMUFile *f, void *opaque)
}
ret = vfio_migration_set_state(vbasedev, VFIO_DEVICE_STATE_MASK,
- VFIO_DEVICE_STATE_SAVING);
+ VFIO_DEVICE_STATE_V1_SAVING);
if (ret) {
error_report("%s: Failed to set state SAVING", vbasedev->name);
return ret;
@@ -531,8 +531,8 @@ static int vfio_save_complete_precopy(QEMUFile *f, void *opaque)
uint64_t data_size;
int ret;
- ret = vfio_migration_set_state(vbasedev, ~VFIO_DEVICE_STATE_RUNNING,
- VFIO_DEVICE_STATE_SAVING);
+ ret = vfio_migration_set_state(vbasedev, ~VFIO_DEVICE_STATE_V1_RUNNING,
+ VFIO_DEVICE_STATE_V1_SAVING);
if (ret) {
error_report("%s: Failed to set state STOP and SAVING",
vbasedev->name);
@@ -569,7 +569,7 @@ static int vfio_save_complete_precopy(QEMUFile *f, void *opaque)
return ret;
}
- ret = vfio_migration_set_state(vbasedev, ~VFIO_DEVICE_STATE_SAVING, 0);
+ ret = vfio_migration_set_state(vbasedev, ~VFIO_DEVICE_STATE_V1_SAVING, 0);
if (ret) {
error_report("%s: Failed to set state STOPPED", vbasedev->name);
return ret;
@@ -609,7 +609,7 @@ static int vfio_load_setup(QEMUFile *f, void *opaque)
}
ret = vfio_migration_set_state(vbasedev, ~VFIO_DEVICE_STATE_MASK,
- VFIO_DEVICE_STATE_RESUMING);
+ VFIO_DEVICE_STATE_V1_RESUMING);
if (ret) {
error_report("%s: Failed to set state RESUMING", vbasedev->name);
if (migration->region.mmaps) {
@@ -717,20 +717,20 @@ static void vfio_vmstate_change(void *opaque, bool running, RunState state)
* In both the above cases, set _RUNNING bit.
*/
mask = ~VFIO_DEVICE_STATE_MASK;
- value = VFIO_DEVICE_STATE_RUNNING;
+ value = VFIO_DEVICE_STATE_V1_RUNNING;
} else {
/*
* Here device state could be either _RUNNING or _SAVING|_RUNNING. Reset
* _RUNNING bit
*/
- mask = ~VFIO_DEVICE_STATE_RUNNING;
+ mask = ~VFIO_DEVICE_STATE_V1_RUNNING;
/*
* When VM state transition to stop for savevm command, device should
* start saving data.
*/
if (state == RUN_STATE_SAVE_VM) {
- value = VFIO_DEVICE_STATE_SAVING;
+ value = VFIO_DEVICE_STATE_V1_SAVING;
} else {
value = 0;
}
@@ -768,8 +768,9 @@ static void vfio_migration_state_notifier(Notifier *notifier, void *data)
case MIGRATION_STATUS_FAILED:
bytes_transferred = 0;
ret = vfio_migration_set_state(vbasedev,
- ~(VFIO_DEVICE_STATE_SAVING | VFIO_DEVICE_STATE_RESUMING),
- VFIO_DEVICE_STATE_RUNNING);
+ ~(VFIO_DEVICE_STATE_V1_SAVING |
+ VFIO_DEVICE_STATE_V1_RESUMING),
+ VFIO_DEVICE_STATE_V1_RUNNING);
if (ret) {
error_report("%s: Failed to set state RUNNING", vbasedev->name);
}
@@ -864,8 +865,10 @@ int vfio_migration_probe(VFIODevice *vbasedev, Error **errp)
goto add_blocker;
}
- ret = vfio_get_dev_region_info(vbasedev, VFIO_REGION_TYPE_MIGRATION,
- VFIO_REGION_SUBTYPE_MIGRATION, &info);
+ ret = vfio_get_dev_region_info(vbasedev,
+ VFIO_REGION_TYPE_MIGRATION_DEPRECATED,
+ VFIO_REGION_SUBTYPE_MIGRATION_DEPRECATED,
+ &info);
if (ret) {
goto add_blocker;
}