parlib: vmm: Allow VM uthreads to have no FP state
[akaros.git] / user / vmm / sched.c
index 288b8d7..26d5d17 100644 (file)
@@ -521,12 +521,8 @@ static struct guest_thread *create_guest_thread(struct virtual_machine *vm,
        }
        gth->uthread.u_ctx.type = ROS_VM_CTX;
        gth->uthread.u_ctx.tf.vm_tf.tf_guest_pcoreid = gpcoreid;
-       /* No need to init the ctlr.  It gets re-init'd each time it starts. */
        uthread_init((struct uthread*)gth, &gth_attr);
        uthread_init((struct uthread*)cth, &cth_attr);
-       /* TODO: give it a correct FP state.  Our current one is probably fine */
-       restore_fp_state(&gth->uthread.as);
-       gth->uthread.flags |= UTHREAD_FPSAVED;
        gth->halt_mtx = uth_mutex_alloc();
        gth->halt_cv = uth_cond_var_alloc();
        return gth;
@@ -592,6 +588,8 @@ int vmm_init(struct virtual_machine *vm, int flags)
                greedy_rnbl_guests = calloc(vm->nr_gpcs, sizeof(struct vmm_thread *));
                assert(greedy_rnbl_guests);
                vcore_request_total(sched_nr_greedy_cores());
+               syscall(SYS_vmm_ctl, VMM_CTL_SET_EXITS,
+                       syscall(SYS_vmm_ctl, VMM_CTL_GET_EXITS) & ~VMM_CTL_EXIT_HALT);
        }
        return 0;
 }