vmm: x86: Set the reserved bits in rflags
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 24 Jul 2018 20:46:01 +0000 (16:46 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 25 Jul 2018 15:25:57 +0000 (11:25 -0400)
Previously, the kernel was doing this for us, since it thought we were
attempting to give it a bad trapframe.

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

index e7bb89e..a55522a 100644 (file)
@@ -696,6 +696,7 @@ int main(int argc, char **argv)
        vm_tf->tf_rip = entry;
        vm_tf->tf_rsp = 0xe0000;
        vm_tf->tf_rsi = (uint64_t) bp;
+       vm_tf->tf_rflags = FL_RSVD_1;
        vm->up_gpcs = 1;
        fprintf(stderr, "Start guest: cr3 %p rip %p\n", vm_tf->tf_cr3, entry);
        start_guest_thread(gpcid_to_gth(vm, 0));