Remove struct vmctl (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 28 Apr 2016 20:28:55 +0000 (16:28 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 2 May 2016 21:11:15 +0000 (17:11 -0400)
Reinstall your kernel headers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/dev/cons.c
kern/include/ros/vmm.h
user/vmm/decode.c

index a8605a0..757777e 100644 (file)
@@ -1027,7 +1027,6 @@ static long conswrite(struct chan *c, void *va, long n, int64_t off)
        int x;
        uint64_t rip, rsp, cr3, flags, vcpu;
        int ret;
-       struct vmctl vmctl;
 
        a = va;
        offset = off;
index 926d285..9c74762 100644 (file)
 #define        VMM_VMCALL_PRINTF       0x1     /* Enable VMCALL output console hack */
 
 #define VMM_ALL_FLAGS  (VMM_VMCALL_PRINTF)
-
-enum {
-       RESUME,
-       REG_RSP_RIP_CR3,
-       REG_RIP,
-       REG_ALL,
-};
-
-/* eventually, this is a system call. For now, it's #c/vmctl.
- * You fill in the blanks, and write the struct to #c/vmctl.
- * On return, i.e. vmexit, it's updated with the new values.
- */
-struct vmctl {
-       uint64_t command;
-       uint64_t cr3;
-       uint64_t gva;
-       uint64_t gpa;
-       uint64_t exit_qual;
-       uint64_t shutdown;
-       uint64_t ret_code;
-       uint64_t core;
-       uint32_t interrupt;
-       uint32_t intrinfo1;
-       uint32_t intrinfo2;
-       struct hw_trapframe regs;
-};
index ede64cd..3b09a4b 100644 (file)
@@ -273,19 +273,3 @@ int decode(struct guest_thread *vm_thread, uint64_t *gpa, uint8_t *destreg,
        }
        return 0;
 }
-
-#if 0
-// stupid emulator since what we need is so limited.
-int emu(struct vmctl *v, uint64_t gpa, uint8_t destreg, uint64_t *regp, int store, int size, int advance)
-{
-       uint8_t *kva = f->regs.tf_rip;
-
-       if (
-       switch(kva[0]) {
-
-                               val = *(uint64_t*) (lowmem + gpa); 
-                               printf("val %p ", val);
-                               memcpy(regp, &val, size);
-
-}
-#endif