@@ -2732,23 +2732,6 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
27322732 ) ;
27332733 debug " VM.migrate: Synchronisation point 1"
27342734 in
2735- let pause_src_vm () =
2736- debug
2737- " VM.migrate: pause src vm before allowing destination to proceed" ;
2738- (* cleanup tmp src VM *)
2739- let atomics =
2740- [
2741- VM_hook_script_stable
2742- ( id
2743- , Xenops_hooks. VM_pre_destroy
2744- , Xenops_hooks. reason__suspend
2745- , new_src_id
2746- )
2747- ]
2748- @ atomics_of_operation (VM_shutdown (new_src_id, None ))
2749- in
2750- perform_atomics atomics t
2751- in
27522735 let final_handshake () =
27532736 Handshake. send vm_fd Handshake. Success ;
27542737 debug " VM.migrate: Synchronisation point 3" ;
@@ -2789,10 +2772,7 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
27892772 the main VM migration sequence. *)
27902773 match VGPU_DB. ids id with
27912774 | [] ->
2792- first_handshake () ;
2793- save () ;
2794- pause_src_vm () ;
2795- final_handshake ()
2775+ first_handshake () ; save () ; final_handshake ()
27962776 | (_vm_id , dev_id ) :: _ ->
27972777 let url =
27982778 make_url " /migrate/vgpu/"
@@ -2809,12 +2789,20 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
28092789 first_handshake () ;
28102790 save ~vgpu_fd: (FD vgpu_fd) ()
28112791 ) ;
2812- pause_src_vm () ;
28132792 final_handshake ()
28142793 ) ;
2815- let cleanup_src_vm () =
2816- let atomics =
2817- [
2794+ (* cleanup tmp src VM *)
2795+ let atomics =
2796+ [
2797+ VM_hook_script_stable
2798+ ( id
2799+ , Xenops_hooks. VM_pre_destroy
2800+ , Xenops_hooks. reason__suspend
2801+ , new_src_id
2802+ )
2803+ ]
2804+ @ atomics_of_operation (VM_shutdown (new_src_id, None ))
2805+ @ [
28182806 VM_hook_script_stable
28192807 ( id
28202808 , Xenops_hooks. VM_post_destroy
@@ -2823,10 +2811,8 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
28232811 )
28242812 ; VM_remove new_src_id
28252813 ]
2826- in
2827- perform_atomics atomics t
28282814 in
2829- cleanup_src_vm ()
2815+ perform_atomics atomics t
28302816 | VM_receive_memory
28312817 {
28322818 vmr_id= id
0 commit comments