- // This is clearly ugly but I (Adrien) need more time to do something cleaner (actually we should copy the whole ms structure at the begining and free it at the end of each function)
- msg_vm_t vm = ms->vm;
- msg_host_t src_pm = ms->src_pm;
- msg_host_t dst_pm = ms-> dst_pm;
- msg_host_priv_t priv = sg_host_msg(vm);
-
-// // TODO: we have an issue, if the DST node is turning off during the three next calls, then the VM is in an inconsistent state
-// // I should check with Takahiro in order to make this portion of code atomic
-// /* deinstall the current affinity setting for the CPU */
-// simcall_vm_set_affinity(vm, src_pm, 0);
-//
-// /* Update the vm location */
-// simcall_vm_migrate(vm, dst_pm);
-//
-// /* Resume the VM */
-// simcall_vm_resume(vm);
-//
- simcall_vm_migratefrom_resumeto(vm, src_pm, dst_pm);
-
- /* install the affinity setting of the VM on the destination pm */
- {
-
- unsigned long affinity_mask = (unsigned long)(uintptr_t) xbt_dict_get_or_null_ext(priv->affinity_mask_db, (char *)dst_pm, sizeof(msg_host_t));
- simcall_vm_set_affinity(vm, dst_pm, affinity_mask);
- XBT_DEBUG("set affinity(0x%04lx@%s) for %s", affinity_mask, MSG_host_get_name(dst_pm), MSG_host_get_name(vm));
- }
+ // This is clearly ugly but I (Adrien) need more time to do something cleaner (actually we should copy the whole ms
+ // structure at the beginning and free it at the end of each function)
+ simgrid::s4u::VirtualMachine* vm = static_cast<simgrid::s4u::VirtualMachine*>(ms->vm);
+ msg_host_t src_pm = ms->src_pm;
+ msg_host_t dst_pm = ms->dst_pm;
+
+ // TODO: we have an issue, if the DST node is turning off during the three next calls, then the VM is in an
+ // inconsistent
+ // state. I should check with Takahiro in order to make this portion of code atomic
+ //
+ // /* Update the vm location */
+ // simcall_vm_migrate(vm, dst_pm);
+ //
+ // /* Resume the VM */
+ // simcall_vm_resume(vm);
+ //
+ simcall_vm_migratefrom_resumeto(vm, src_pm, dst_pm);