vthread: x86: set the reserved bits in rflags
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 11 Apr 2019 20:47:06 +0000 (16:47 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 11 Apr 2019 21:13:54 +0000 (17:13 -0400)
This fix is the same as commit 8dc899e19d0f ("vmm: x86: Set the reserved
bits in rflags"), which fixed vmrunkernel.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/vmm/vthread.c

index aef0c2e..5262e60 100644 (file)
@@ -160,6 +160,7 @@ void vthread_init_ctx(struct vthread *vth, uintptr_t entry_pt, uintptr_t arg,
        vm_tf->tf_rip = entry_pt;
        vm_tf->tf_rdi = arg;
        vm_tf->tf_rsp = stacktop;
        vm_tf->tf_rip = entry_pt;
        vm_tf->tf_rdi = arg;
        vm_tf->tf_rsp = stacktop;
+       vm_tf->tf_rflags = FL_RSVD_1;
 }
 
 void vthread_run(struct vthread *vthread)
 }
 
 void vthread_run(struct vthread *vthread)