[libvirt] [PATCH 3/8] qemu: Always reset TLS in qemuProcessRecoverMigrationOut

Jiri Denemark posted 8 patches 8 years, 10 months ago
[libvirt] [PATCH 3/8] qemu: Always reset TLS in qemuProcessRecoverMigrationOut
Posted by Jiri Denemark 8 years, 10 months ago
qemuProcessRecoverMigrationOut doesn't explicitly call
qemuMigrationResetTLS relying on two things:

    - qemuMigrationCancel resets TLS parameters
    - our migration code resets TLS before entering
      QEMU_MIGRATION_PHASE_PERFORM3_DONE phase

But this is not obvious and the assumptions will be broken soon. Let's
explicitly reset TLS parameters on all paths which do not kill the
domain.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index f2a80ad22..935993f16 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3077,6 +3077,7 @@ qemuProcessRecoverMigrationOut(virQEMUDriverPtr driver,
         }
     }
 
+    qemuMigrationResetTLS(driver, vm, QEMU_ASYNC_JOB_NONE, NULL, NULL);
     return 0;
 }
 
-- 
2.12.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/8] qemu: Always reset TLS in qemuProcessRecoverMigrationOut
Posted by Peter Krempa 8 years, 10 months ago
On Wed, Apr 05, 2017 at 15:09:58 +0200, Jiri Denemark wrote:
> qemuProcessRecoverMigrationOut doesn't explicitly call
> qemuMigrationResetTLS relying on two things:
> 
>     - qemuMigrationCancel resets TLS parameters
>     - our migration code resets TLS before entering
>       QEMU_MIGRATION_PHASE_PERFORM3_DONE phase
> 
> But this is not obvious and the assumptions will be broken soon. Let's
> explicitly reset TLS parameters on all paths which do not kill the
> domain.

We are still fond of the XEN heritage?

> 
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/qemu/qemu_process.c | 1 +
>  1 file changed, 1 insertion(+)

ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list