aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-05-13 09:45:17 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-05-13 09:45:17 -0700
commit48de9b0916ef60d5a6bd6ca9288832deff8ee1ee (patch)
treefca7d5c3f029a4c53bd2171d2a8f06eed5c64221 /hw
parent9de5f2b40860c5f8295e73fea9922df6f0b8d89a (diff)
parente4082063e47e9731dbeb1c26174c17f6038f577f (diff)
downloadqemu-48de9b0916ef60d5a6bd6ca9288832deff8ee1ee.zip
qemu-48de9b0916ef60d5a6bd6ca9288832deff8ee1ee.tar.gz
qemu-48de9b0916ef60d5a6bd6ca9288832deff8ee1ee.tar.bz2
Merge tag 'linux-headers-v5.18-rc6' of https://gitlab.com/alex.williamson/qemu into staging
* Linux header update to v5.18-rc6 and vfio file massaging (Alex Williamson) # -----BEGIN PGP SIGNATURE----- # # iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmJ+ajgbHGFsZXgud2ls # bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsiqVUQAJV8iZ7UrgX9LpCo/kBg # VuPdzv8NVoaxe33FkkMlJYIcm1wCIC+lc/nKczkJg5rdfD4/E0oNyv8DER+2q2jC # Q94nq3CoSwnbNeRaAc6dcA/Hg9VL5VAwE8S/raDt+DbCBndR0o7zejm2CHZIYPxF # GZXgexNThYcSjNsfkP2Sju/SwjWSFRHXFeTg5P6BOm2qWVGMNmvlnarPTffWOC0Y # 6sT2VUykzahVSro5WxyuLdH114KI8QRZzSybMkLMpt3uaxZsFoAhO4FYZX4owiUn # rSoHS0am86KCRG3msD8UjKKy/R4dP0hXW41xAr4HwRZWouNtwGJVtd1mA6kF5euL # 23dQwSQeHvgFx0gY0FiFih/shZ24qvTDZDz8hNqgi3q42Tv8upghAyWL7v/aPpsy # 94RH3eNSBkNEvWdK/e40LpuN14voRMLov4XcVirP2kbBFWoU4SSIZmASSLG/OeQn # tQLatE53SMiXBabMRKeVCiyMxnoUtOd8fe97XFEONFIEU0NOABt5Zoldtbq4kwoQ # tcUydKB66df3uWccb6Tpl3V7h6b8sBL8trfBUD1qANjcDbEzQVUVBTmg+DRwzs8d # HQ4f6YQaJoyZlVDgC8GVA268ubAam8FEz1piro4gz8MaZJCeCdx5Teec0yCwjBL+ # IlNS08zjV5fHFZuMPd/qswjk # =gegh # -----END PGP SIGNATURE----- # gpg: Signature made Fri 13 May 2022 07:24:56 AM PDT # gpg: using RSA key 42F6C04E540BD1A99E7B8A90239B9B6E3BB08B22 # gpg: issuer "alex.williamson@redhat.com" # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [undefined] # gpg: aka "Alex Williamson <alex@shazbot.org>" [undefined] # gpg: aka "Alex Williamson <alwillia@redhat.com>" [undefined] # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * tag 'linux-headers-v5.18-rc6' of https://gitlab.com/alex.williamson/qemu: linux-headers: Update to v5.18-rc6 Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw')
-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;
}