if (svm_allocate_nested(svm))
                                return 1;
 
-                       vmcb12 = map.hva;
-
-                       nested_load_control_from_vmcb12(svm, &vmcb12->control);
-
-                       ret = enter_svm_guest_mode(vcpu, vmcb12_gpa, vmcb12);
                        kvm_vcpu_unmap(vcpu, &map, true);
 
                        /*
                        svm_copy_vmrun_state(&svm->vmcb01.ptr->save,
                                             map_save.hva + 0x400);
 
+                       /*
+                        * Enter the nested guest now
+                        */
+                       vmcb12 = map.hva;
+                       nested_load_control_from_vmcb12(svm, &vmcb12->control);
+                       ret = enter_svm_guest_mode(vcpu, vmcb12_gpa, vmcb12);
+
                        kvm_vcpu_unmap(vcpu, &map_save, true);
                }
        }