Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


booting geekos up to the timer initialization
Jack Lange [Tue, 6 May 2008 20:39:04 +0000 (20:39 +0000)]
palacios/build/depend.mak
palacios/build/payload_layout.txt
palacios/build/vm_kernel
palacios/src/devices/nvram.c
palacios/src/geekos/mem.c
palacios/src/geekos/vm.c
palacios/src/geekos/vmm_stubs.c
palacios/src/palacios/svm.c
palacios/src/palacios/svm_ctrl_regs.c
palacios/src/palacios/svm_handler.c
palacios/src/palacios/vm_guest_mem.c

index bb62d20..a13f5be 100644 (file)
@@ -1,55 +1,58 @@
 geekos/idt.o: ../src/geekos/idt.c ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/idt.h \
   ../include/geekos/int.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h ../include/geekos/debug.h
 geekos/int.o: ../src/geekos/int.c ../include/geekos/idt.h \
   ../include/geekos/int.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h ../include/geekos/debug.h \
   ../include/geekos/cpu.h
 geekos/trap.o: ../src/geekos/trap.c ../include/geekos/idt.h \
   ../include/geekos/int.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/kthread.h \
   ../include/geekos/list.h ../include/geekos/trap.h \
   ../include/geekos/serial.h ../include/geekos/irq.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h ../include/geekos/debug.h
 geekos/irq.o: ../src/geekos/irq.c ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/idt.h ../include/geekos/int.h \
-  ../include/geekos/defs.h ../include/geekos/io.h ../include/geekos/irq.h
+  ../include/geekos/defs.h ../include/geekos/io.h ../include/geekos/irq.h \
+  ../include/geekos/debug.h ../include/geekos/serial.h \
+  ../include/geekos/string.h ../include/geekos/../libc/string.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
 geekos/io.o: ../src/geekos/io.c ../include/geekos/io.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h
 geekos/blockdev.o: ../src/geekos/blockdev.c ../include/geekos/errno.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/malloc.h ../include/geekos/int.h \
   ../include/geekos/kassert.h ../include/geekos/defs.h \
   ../include/geekos/kthread.h ../include/geekos/list.h \
@@ -59,12 +62,12 @@ geekos/ide.o: ../src/geekos/ide.c ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/int.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h ../include/geekos/errno.h \
   ../include/geekos/malloc.h ../include/geekos/timer.h \
   ../include/geekos/kthread.h ../include/geekos/list.h \
@@ -72,133 +75,133 @@ geekos/ide.o: ../src/geekos/ide.c ../include/geekos/serial.h \
   ../include/geekos/ide.h
 geekos/keyboard.o: ../src/geekos/keyboard.c ../include/geekos/kthread.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/list.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/fmtout.h \
   ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/irq.h ../include/geekos/int.h \
   ../include/geekos/defs.h ../include/geekos/io.h \
   ../include/geekos/keyboard.h
 geekos/screen.o: ../src/geekos/screen.c \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
   ../include/geekos/io.h ../include/geekos/int.h ../include/geekos/defs.h \
   ../include/geekos/debug.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
 geekos/timer.o: ../src/geekos/timer.c \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/limits.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/limits.h \
   ../include/geekos/io.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/int.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/fmtout.h \
   ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/irq.h \
   ../include/geekos/kthread.h ../include/geekos/list.h \
   ../include/geekos/timer.h ../include/geekos/serial.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/debug.h
 geekos/mem.o: ../src/geekos/mem.c ../include/geekos/defs.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/bootinfo.h ../include/geekos/gdt.h \
   ../include/geekos/int.h ../include/geekos/malloc.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/mem.h ../include/geekos/list.h \
   ../include/geekos/paging.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/io.h \
   ../include/geekos/debug.h
 geekos/crc32.o: ../src/geekos/crc32.c ../include/geekos/crc32.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/serial.h ../include/geekos/irq.h \
   ../include/geekos/int.h ../include/geekos/defs.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
   ../include/geekos/io.h ../include/geekos/debug.h
 geekos/gdt.o: ../src/geekos/gdt.c ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/segment.h ../include/geekos/int.h \
   ../include/geekos/defs.h ../include/geekos/tss.h \
   ../include/geekos/gdt.h ../include/libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/debug.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h ../include/geekos/io.h
 geekos/tss.o: ../src/geekos/tss.c ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/gdt.h \
   ../include/geekos/segment.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/tss.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/int.h ../include/geekos/io.h \
   ../include/geekos/debug.h
 geekos/segment.o: ../src/geekos/segment.c ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/tss.h ../include/geekos/segment.h
 geekos/bget.o: ../src/geekos/bget.c ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/bget.h
 geekos/malloc.o: ../src/geekos/malloc.c ../include/geekos/screen.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/int.h ../include/geekos/kassert.h \
   ../include/geekos/defs.h ../include/geekos/bget.h \
   ../include/geekos/malloc.h
 geekos/synch.o: ../src/geekos/synch.c ../include/geekos/kthread.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/list.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/fmtout.h \
   ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/int.h ../include/geekos/defs.h \
   ../include/geekos/synch.h
 geekos/kthread.o: ../src/geekos/kthread.c ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/int.h \
   ../include/geekos/mem.h ../include/geekos/list.h \
   ../include/geekos/paging.h ../include/geekos/bootinfo.h \
   ../include/geekos/symbol.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/kthread.h ../include/geekos/malloc.h \
   ../include/geekos/serial.h ../include/geekos/irq.h \
   ../include/geekos/io.h ../include/geekos/debug.h
@@ -206,25 +209,25 @@ geekos/serial.o: ../src/geekos/serial.c ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/int.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h ../include/geekos/reboot.h \
   ../include/geekos/gdt.h ../include/geekos/idt.h
 geekos/reboot.o: ../src/geekos/reboot.c ../include/geekos/reboot.h \
   ../include/libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
 geekos/paging.o: ../src/geekos/paging.c ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/int.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/idt.h \
   ../include/geekos/kthread.h ../include/geekos/list.h \
   ../include/geekos/mem.h ../include/geekos/paging.h \
@@ -237,25 +240,25 @@ geekos/debug.o: ../src/geekos/debug.c ../include/geekos/debug.h \
   ../include/geekos/serial.h ../include/geekos/irq.h \
   ../include/geekos/int.h ../include/geekos/kassert.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/defs.h ../include/geekos/string.h \
   ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h
 geekos/vmm_stubs.o: ../src/geekos/vmm_stubs.c ../include/geekos/vmm_stubs.h \
   ../include/geekos/mem.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/defs.h ../include/geekos/list.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/paging.h ../include/geekos/bootinfo.h \
   ../include/geekos/malloc.h ../include/geekos/serial.h \
   ../include/geekos/irq.h ../include/geekos/int.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/io.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
@@ -265,15 +268,15 @@ geekos/vmm_stubs.o: ../src/geekos/vmm_stubs.c ../include/geekos/vmm_stubs.h \
   ../include/palacios/vmm_string.h ../include/palacios/vmm_irq.h
 geekos/vm.o: ../src/geekos/vm.c ../include/geekos/vmm_stubs.h \
   ../include/geekos/mem.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/defs.h ../include/geekos/list.h \
   ../include/geekos/kassert.h ../include/geekos/screen.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/paging.h ../include/geekos/bootinfo.h \
   ../include/geekos/malloc.h ../include/palacios/vmm.h \
   ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_shadow_paging.h \
@@ -288,11 +291,11 @@ geekos/vm.o: ../src/geekos/vm.c ../include/geekos/vmm_stubs.h \
   ../include/devices/simple_pic.h ../include/devices/8259a.h
 geekos/main.o: ../src/geekos/main.c ../include/geekos/bootinfo.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/screen.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/geekos/mem.h ../include/geekos/defs.h \
   ../include/geekos/list.h ../include/geekos/kassert.h \
   ../include/geekos/paging.h ../include/geekos/crc32.h \
@@ -305,34 +308,34 @@ geekos/main.o: ../src/geekos/main.c ../include/geekos/bootinfo.h \
   ../include/geekos/debug.h ../include/geekos/vm.h \
   ../include/geekos/gdt.h ../include/geekos/vmm_stubs.h
 common/fmtout.o: ../src/common/fmtout.c \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/geekos/string.h ../include/geekos/../libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/limits.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/limits.h \
   ../include/geekos/fmtout.h ../include/geekos/../libc/fmtout.h
 common/string.o: ../src/common/string.c ../include/libc/fmtout.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdarg.h \
   ../include/libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
 common/memmove.o: ../src/common/memmove.c ../include/libc/string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h
 palacios/vm_guest.o: ../src/palacios/vm_guest.c ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_list.h \
   ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_irq.h
 palacios/svm.o: ../src/palacios/svm.c ../include/palacios/svm.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -344,9 +347,9 @@ palacios/svm_handler.o: ../src/palacios/svm_handler.c \
   ../include/palacios/svm_handler.h ../include/palacios/svm.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -356,10 +359,10 @@ palacios/svm_handler.o: ../src/palacios/svm_handler.c \
   ../include/palacios/svm_ctrl_regs.h ../include/palacios/svm_io.h
 palacios/vmm.o: ../src/palacios/vmm.c ../include/palacios/vmm.h \
   ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -369,9 +372,9 @@ palacios/vmm.o: ../src/palacios/vmm.c ../include/palacios/vmm.h \
   ../include/palacios/vmcs.h ../include/palacios/vmcs_gen.h
 palacios/vmm_util.o: ../src/palacios/vmm_util.c ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -381,21 +384,21 @@ palacios/svm_ctrl_regs.o: ../src/palacios/svm_ctrl_regs.c \
   ../include/palacios/svm_ctrl_regs.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_list.h \
   ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_irq.h ../include/palacios/vmm.h \
   ../include/palacios/vmcb.h ../include/palacios/vmm_emulate.h \
   ../include/palacios/vm_guest_mem.h ../include/palacios/vmm_ctrl_regs.h
 palacios/vmcb.o: ../src/palacios/vmcb.c ../include/palacios/vmcb.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_shadow_paging.h \
@@ -404,9 +407,9 @@ palacios/vmcb.o: ../src/palacios/vmcb.c ../include/palacios/vmcb.h \
   ../include/palacios/vmm_irq.h
 palacios/vmm_mem.o: ../src/palacios/vmm_mem.c ../include/palacios/vmm_mem.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -415,19 +418,19 @@ palacios/vmm_mem.o: ../src/palacios/vmm_mem.c ../include/palacios/vmm_mem.h \
 palacios/vmm_paging.o: ../src/palacios/vmm_paging.c \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_shadow_paging.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_list.h \
   ../include/palacios/vmm_irq.h ../include/palacios/vm_guest_mem.h
 palacios/vmm_io.o: ../src/palacios/vmm_io.c ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_mem.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -435,10 +438,10 @@ palacios/vmm_io.o: ../src/palacios/vmm_io.c ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_irq.h
 palacios/vmm_debug.o: ../src/palacios/vmm_debug.c ../include/palacios/vmm_debug.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
@@ -447,21 +450,21 @@ palacios/vmm_debug.o: ../src/palacios/vmm_debug.c ../include/palacios/vmm_debug.
 palacios/svm_io.o: ../src/palacios/svm_io.c ../include/palacios/svm_io.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_mem.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_list.h \
   ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_irq.h ../include/palacios/vmcb.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_ctrl_regs.h \
   ../include/palacios/vmm_emulate.h ../include/palacios/vm_guest_mem.h
 palacios/vmm_intr.o: ../src/palacios/vmm_intr.c ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_shadow_paging.h \
@@ -471,10 +474,10 @@ palacios/vmm_irq.o: ../src/palacios/vmm_irq.c
 palacios/vmm_shadow_paging.o: ../src/palacios/vmm_shadow_paging.c \
   ../include/palacios/vmm_shadow_paging.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_mem.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_intr.h ../include/palacios/vmm_dev_mgr.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_irq.h \
@@ -483,19 +486,19 @@ palacios/vm_guest_mem.o: ../src/palacios/vm_guest_mem.c \
   ../include/palacios/vm_guest_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
   ../include/palacios/vmm_shadow_paging.h \
   ../include/palacios/vmm_paging.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_list.h \
   ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_irq.h ../include/palacios/vmm.h
 palacios/vm_dev.o: ../src/palacios/vm_dev.c ../include/palacios/vm_dev.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
@@ -504,9 +507,9 @@ palacios/vm_dev.o: ../src/palacios/vm_dev.c ../include/palacios/vm_dev.h \
   ../include/palacios/vmm_irq.h
 palacios/vmm_dev_mgr.o: ../src/palacios/vmm_dev_mgr.c ../include/palacios/vm_dev.h \
   ../include/palacios/vmm_types.h ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vmm_io.h \
   ../include/palacios/vmm_util.h ../include/palacios/vmm_shadow_paging.h \
@@ -515,9 +518,9 @@ palacios/vmm_dev_mgr.o: ../src/palacios/vmm_dev_mgr.c ../include/palacios/vm_dev
 devices/nvram.o: ../src/devices/nvram.c ../include/devices/nvram.h \
   ../include/palacios/vm_dev.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
@@ -527,9 +530,9 @@ devices/nvram.o: ../src/devices/nvram.c ../include/devices/nvram.h \
 devices/timer.o: ../src/devices/timer.c ../include/devices/timer.h \
   ../include/palacios/vm_dev.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm.h \
   ../include/palacios/vmm_mem.h ../include/palacios/vm_guest.h \
   ../include/palacios/vmm_io.h ../include/palacios/vmm_util.h \
@@ -539,9 +542,9 @@ devices/timer.o: ../src/devices/timer.c ../include/devices/timer.h \
 devices/simple_pic.o: ../src/devices/simple_pic.c ../include/devices/simple_pic.h \
   ../include/palacios/vm_dev.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_mem.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
@@ -550,9 +553,9 @@ devices/simple_pic.o: ../src/devices/simple_pic.c ../include/devices/simple_pic.
 devices/8259a.o: ../src/devices/8259a.c ../include/devices/8259a.h \
   ../include/palacios/vm_dev.h ../include/palacios/vmm_types.h \
   ../include/geekos/ktypes.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stdbool.h \
   ../include/palacios/vmm_list.h ../include/palacios/vmm_string.h \
-  /home/pdinda/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
+  /home/jarusl/vmm-dev/devtools/i386/lib/gcc/i386-elf/3.4.6/include/stddef.h \
   ../include/palacios/vmm_dev_mgr.h ../include/palacios/vmm_intr.h \
   ../include/palacios/vmm.h ../include/palacios/vmm_mem.h \
   ../include/palacios/vm_guest.h ../include/palacios/vmm_io.h \
index 1931d93..719cbdb 100755 (executable)
Binary files a/palacios/build/vm_kernel and b/palacios/build/vm_kernel differ
index b1d31e5..e59b2f3 100644 (file)
@@ -36,6 +36,8 @@ typedef enum {NVRAM_READY, NVRAM_REG_POSTED} nvram_state_t;
 #define NVRAM_REG_DIAGNOSTIC_STATUS       0x0e  
 #define NVRAM_REG_SHUTDOWN_STATUS         0x0f
 
+#define NVRAM_IBM_HD_DATA                 0x12
+
 #define NVRAM_REG_FLOPPY_TYPE             0x10
 #define NVRAM_REG_EQUIPMENT_BYTE          0x14
 
@@ -114,6 +116,8 @@ static int set_nvram_defaults(struct vm_device *dev)
   nvram_state->mem_state[NVRAM_REG_AMI_BIG_MEMORY_LOW]= 0x00;
 
   
+  // This is the harddisk type.... Set accordingly...
+  nvram_state->mem_state[NVRAM_IBM_HD_DATA] = 0x20;
 
   return 0;
 
@@ -164,6 +168,7 @@ int nvram_write_reg_port(ushort_t port,
   struct nvram_internal *data = (struct nvram_internal *) dev->private_data;
 
   memcpy(&(data->thereg), src, 1);
+  PrintDebug("Writing To NVRAM reg: 0x%x\n", data->thereg);
 
 
   return 1;
@@ -180,7 +185,7 @@ int nvram_read_data_port(ushort_t port,
 
   memcpy(dst, &(data->mem_state[data->thereg]), 1);
 
-  SerialPrint("nvram_read_data_port(%x)=%x\n",data->thereg,data->mem_state[data->thereg]);
+  PrintDebug("nvram_read_data_port(0x%x)=0x%x\n", data->thereg, data->mem_state[data->thereg]);
 
   return 1;
 }
@@ -194,7 +199,7 @@ int nvram_write_data_port(ushort_t port,
 
   memcpy(&(data->mem_state[data->thereg]), src, 1);
 
-  SerialPrint("nvram_write_data_port(%x)=%x\n",data->thereg,data->mem_state[data->thereg]);
+  PrintDebug("nvram_write_data_port(0x%x)=0x%x\n", data->thereg, data->mem_state[data->thereg]);
 
   return 1;
 }
index 4f284f1..6b3263d 100644 (file)
@@ -2,7 +2,7 @@
  * Physical memory allocation
  * Copyright (c) 2001,2003,2004 David H. Hovemeyer <daveho@cs.umd.edu>
  * Copyright (c) 2003, Jeffrey K. Hollingsworth <hollings@cs.umd.edu>
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
  * 
  * This is free software.  You are permitted to use,
  * redistribute, and modify it as specified in the file "COPYING".
@@ -206,8 +206,9 @@ void Init_Mem(struct Boot_Info* bootInfo)
     Add_Page_Range(heapAddr, heapEnd, PAGE_HEAP);                     // Heap
     Add_Page_Range(pageListAddr, pageListEnd, PAGE_KERN);              // Page List 
     Add_Page_Range(pageListEnd, vmmMemEnd, PAGE_AVAIL);                // Available VMM memory
-    Add_Page_Range(vmmMemEnd, endOfMem, PAGE_VM);                      // Memory allocated to the VM
-
+    //    Add_Page_Range(vmmMemEnd, endOfMem, PAGE_VM);                      // Memory allocated to the VM
+    // Until we get a more intelligent memory allocator
+    Add_Page_Range(vmmMemEnd, endOfMem, PAGE_AVAIL);                      // Memory allocated to the VM
 
 
     /* Initialize the kernel heap */
@@ -228,7 +229,7 @@ void Init_Mem(struct Boot_Info* bootInfo)
     PrintBoth("%x to %x - KERNEL HEAP\n", heapAddr, heapEnd - 1);
     PrintBoth("%lx to %lx - PAGE LIST\n", pageListAddr, pageListEnd - 1);
     PrintBoth("%lx to %x - FREE\n", pageListEnd, vmmMemEnd - 1);
-    PrintBoth("%lx to %x - GUEST_MEMORY\n", vmmMemEnd, endOfMem - 1);
+    PrintBoth("%lx to %x - GUEST_MEMORY (also free)\n", vmmMemEnd, endOfMem - 1);
 }
 
 /*
index 300ac56..f2c0343 100644 (file)
@@ -275,6 +275,10 @@ int RunVMM(struct Boot_Info * bootInfo) {
       add_shadow_region_passthrough(&vm_info, 0xa0000, 0xc0000, 0xa0000); 
       
 
+
+      // TEMP
+       add_shadow_region_passthrough(&vm_info, 0xc0000, 0xc8000, 0xc0000);
+
       if (1) {
        add_shadow_region_passthrough(&vm_info, 0xc7000, 0xc8000, (addr_t)Allocate_VMM_Pages(1));
        if (add_shadow_region_passthrough(&vm_info, 0xc8000, 0xf0000, (addr_t)Allocate_VMM_Pages(40)) == -1) {
@@ -286,6 +290,9 @@ int RunVMM(struct Boot_Info * bootInfo) {
       }
 
 
+      add_shadow_region_passthrough(&vm_info, 0x100000, 0x2000000, (addr_t)Allocate_VMM_Pages(8192));
+
+
       print_shadow_map(&(vm_info.mem_map));
 
       hook_io_port(&(vm_info.io_map), 0x61, &IO_Read, &IO_Write, NULL);
index 28f1126..47e8886 100644 (file)
@@ -7,7 +7,7 @@ void * Identity(void *addr) { return addr; };
 
 void * Allocate_VMM_Pages(int num_pages) {
   void * start_page = Alloc_Page();
-  //SerialPrint("Allocating Page: %x (%d of %d)\n",start_page, 1, num_pages); 
+  //SerialPrint("Starting by Allocating Page: %x (%d of %d)\n",start_page, 1, num_pages); 
   int i = 1;
 
   while (i < num_pages) {
@@ -21,7 +21,7 @@ void * Allocate_VMM_Pages(int num_pages) {
        i--;
       }
       start_page = Alloc_Page();
-      //SerialPrint("Allocating Page: %x (%d of %d)\n",start_page, 1, num_pages);
+      //SerialPrint("Starting over by Allocating Page: %x (%d of %d)\n",start_page, 1, num_pages);
       i = 1;
       continue;
     }
index ee7ff6d..73d85a9 100644 (file)
@@ -9,6 +9,7 @@
 #include <palacios/vmm_debug.h>
 #include <palacios/vm_guest_mem.h>
 
+#include <palacios/vmm_emulate.h>
 
 
 extern struct vmm_os_hooks * os_hooks;
@@ -142,7 +143,7 @@ int start_svm_guest(struct guest_info *info) {
     CLGI();
 
     //PrintDebug("SVM Launch Args (vmcb=%x), (info=%x), (vm_regs=%x)\n", info->vmm_data,  &(info->vm_regs));
-    //PrintDebug("Launching to RIP: %x\n", info->rip);
+    PrintDebug("Launching to RIP: %x\n", info->rip);
     safe_svm_launch((vmcb_t*)(info->vmm_data), &(info->vm_regs));
     //launch_svm((vmcb_t*)(info->vmm_data));
     //PrintDebug("SVM Returned\n");
@@ -153,7 +154,30 @@ int start_svm_guest(struct guest_info *info) {
 
      
     if (handle_svm_exit(info) != 0) {
-      PrintDebug("SVM ERROR!!\n");
+      vmcb_saved_state_t * guest_state = GET_VMCB_SAVE_STATE_AREA((vmcb_t*)(info->vmm_data));
+      addr_t host_addr;
+      addr_t linear_addr = 0;
+
+      PrintDebug("SVM ERROR!!\n"); 
+      
+
+      PrintDebug("RIP: %x\n", guest_state->rip);
+
+      if (info->cpu_mode == REAL) {
+       linear_addr = get_addr_linear(info, guest_state->rip, guest_state->cs.selector);
+      } else {
+       linear_addr = get_addr_linear(info, guest_state->rip, guest_state->cs.base);
+      }
+
+      PrintDebug("RIP Linear: %x\n", linear_addr);
+
+      guest_pa_to_host_pa(info, linear_addr, &host_addr);
+
+      PrintDebug("Host Address of rip = 0x%x\n", host_addr);
+
+      PrintDebug("Instr (15 bytes) at %x:\n", host_addr);
+      PrintTraceMemDump((char*)host_addr, 15);
+
       break;
     }
   }
index 198c09c..3586205 100644 (file)
@@ -42,7 +42,7 @@ int handle_cr0_write(struct guest_info * info) {
  
       addr_t first_operand;
       addr_t second_operand;
-      struct cr0_real *old_cr0;
+      struct cr0_real *real_cr0;
       struct cr0_real *new_cr0;
       operand_type_t addr_type;
       char new_cr0_val = 0;
@@ -50,8 +50,7 @@ int handle_cr0_write(struct guest_info * info) {
       // decode mod/RM
       index += 2;
  
-      old_cr0 = (struct cr0_real*)&(guest_state->cr0);
-
+      real_cr0 = (struct cr0_real*)&(guest_state->cr0);
 
       addr_type = decode_operands16(&(info->vm_regs), instr + index, &index, &first_operand, &second_operand, REG16);
 
@@ -72,9 +71,9 @@ int handle_cr0_write(struct guest_info * info) {
        return -1;
       }
                 
-      if ((new_cr0->pe == 1) && (old_cr0->pe == 0)) {
+      if ((new_cr0->pe == 1) && (real_cr0->pe == 0)) {
        info->cpu_mode = PROTECTED;
-      } else if ((new_cr0->pe == 0) && (old_cr0->pe == 1)) {
+      } else if ((new_cr0->pe == 0) && (real_cr0->pe == 1)) {
        info->cpu_mode = REAL;
       }
       
@@ -82,29 +81,89 @@ int handle_cr0_write(struct guest_info * info) {
 
 
       if (info->page_mode == SHADOW_PAGING) {
-       struct cr0_real * virt_cr0 = (struct cr0_real*)&(info->shdw_pg_state.guest_cr0);
+       struct cr0_real * shadow_cr0 = (struct cr0_real*)&(info->shdw_pg_state.guest_cr0);
 
+       PrintDebug("Old CR0=%x, Old Shadow CR0=%x\n", *real_cr0, *shadow_cr0);  
        /* struct cr0_real is only 4 bits wide, 
-        * so we can overwrite the old_cr0 without worrying about the shadow fields
+        * so we can overwrite the real_cr0 without worrying about the shadow fields
         */
-       *(char*)old_cr0 &= 0xf0;
-       *(char*)old_cr0 |= new_cr0_val;
+       *(char*)real_cr0 &= 0xf0;
+       *(char*)real_cr0 |= new_cr0_val;
        
-       *(char*)virt_cr0 &= 0xf0;
-       *(char*)virt_cr0 |= new_cr0_val;
+       *(char*)shadow_cr0 &= 0xf0;
+       *(char*)shadow_cr0 |= new_cr0_val;
+
+       PrintDebug("New CR0=%x, New Shadow CR0=%x\n", *real_cr0, *shadow_cr0);  
       } else {
+       PrintDebug("Old CR0=%x\n", *real_cr0);  
        // for now we just pass through....
-       *(char*)old_cr0 &= 0xf0;
-       *(char*)old_cr0 |= new_cr0_val;
+       *(char*)real_cr0 &= 0xf0;
+       *(char*)real_cr0 |= new_cr0_val;
+
+       PrintDebug("New CR0=%x\n", *real_cr0);  
       }
 
-      PrintDebug("index = %d, rip = %x\n", index, (ulong_t)(info->rip));
+
       info->rip += index;
-      PrintDebug("new_rip = %x\n", (ulong_t)(info->rip));
+
     } else if ((instr[index] == cr_access_byte) && 
               (instr[index + 1] == clts_byte)) {
       // CLTS
+
+
+    } else if ((instr[index] == cr_access_byte) && 
+              (instr[index + 1] = mov_to_cr_byte)) {
+      addr_t first_operand;
+      addr_t second_operand;
+      struct cr0_32 *real_cr0;
+      struct cr0_32 *new_cr0;
+      operand_type_t addr_type;
+     
+      
+      index += 2;
+      real_cr0 = (struct cr0_32*)&(guest_state->cr0);
+
+      addr_type = decode_operands16(&(info->vm_regs), instr + index, &index, &first_operand, &second_operand, REG32);
+
+      if (addr_type != REG_OPERAND) {
+       /* Mov to CR0 Can only be a 32 bit register */
+       // FIX ME
+       return -1;
+      }
+
+      new_cr0 = (struct cr0_32 *)first_operand;
+
+      if (new_cr0->pe == 1) {
+       PrintDebug("Entering Protected Mode\n");
+       info->cpu_mode = PROTECTED;
+      }
+
+      if (new_cr0->pg == 1) {
+       // GPF the guest??
+       return -1;
+      }
+
+      if (info->page_mode == SHADOW_PAGING) {
+       struct cr0_32 * shadow_cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
+       
+       PrintDebug("Old CR0=%x, Old Shadow CR0=%x\n", *real_cr0, *shadow_cr0);  
+       *real_cr0 = *new_cr0;
+       real_cr0->pg = 1;
+
+       *shadow_cr0 = *new_cr0;
+
+       PrintDebug("New CR0=%x, New Shadow CR0=%x\n", *real_cr0, *shadow_cr0);  
+      } else {
+       PrintDebug("Old CR0=%x\n", *real_cr0);  
+       *real_cr0 = *new_cr0;
+       PrintDebug("New CR0=%x\n", *real_cr0);  
+      }
+
+      info->rip += index;
+
     } else {
+      PrintDebug("Unsupported Instruction\n");
       // unsupported instruction, UD the guest
       return -1;
     }
@@ -118,7 +177,7 @@ int handle_cr0_write(struct guest_info * info) {
 
     // The real rip address is actually a combination of the rip + CS base 
     ret = read_guest_pa_memory(info, get_addr_linear(info, guest_state->rip, guest_state->cs.base), 15, instr);
-    if (ret != 0) {
+    if (ret != 15) {
       // I think we should inject a GPF into the guest
       PrintDebug("Could not read instruction (ret=%d)\n", ret);
       return -1;
@@ -135,55 +194,55 @@ int handle_cr0_write(struct guest_info * info) {
     
       addr_t first_operand;
       addr_t second_operand;
-      struct cr0_32 *old_cr0;
+      struct cr0_32 *real_cr0;
       struct cr0_32 *new_cr0;
       operand_type_t addr_type;
 
       index += 2;
  
-      old_cr0 = (struct cr0_32*)&(guest_state->cr0);
+      real_cr0 = (struct cr0_32*)&(guest_state->cr0);
 
       addr_type = decode_operands32(&(info->vm_regs), instr + index, &index, &first_operand, &second_operand, REG32);
 
-
-      if (addr_type == REG_OPERAND) {
-       new_cr0 = (struct cr0_32 *)first_operand;
-      } else if (addr_type == MEM_OPERAND) {
-       addr_t host_addr;
-
-       if (guest_pa_to_host_va(info, first_operand + guest_state->ds.base, &host_addr) == -1) {
-         // gpf the guest
-         return -1;
-       }
-
-       new_cr0 = (struct cr0_32 *)host_addr;
-      } else {
-       // error... don't know what to do
+      if (addr_type != REG_OPERAND) {
        return -1;
       }
 
+      new_cr0 = (struct cr0_32 *)first_operand;
+
 
       if (info->page_mode == SHADOW_PAGING) {
-       struct cr0_32 * virt_cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
+       struct cr0_32 * shadow_cr0 = (struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
 
-       if ((new_cr0->pg == 1) && (virt_cr0->pg == 0)){
+       if (new_cr0->pg == 1){
          info->cpu_mode = PROTECTED_PG;
+         
+         *shadow_cr0 = *new_cr0;
+         *real_cr0 = *new_cr0;
 
+         //
          // Activate Shadow Paging
+         //
+
+       } else if (new_cr0->pe == 0) {
+         info->cpu_mode = REAL;
+
+         *shadow_cr0 = *new_cr0;
+         *real_cr0 = *new_cr0;
+         real_cr0->pg = 1;
        }
 
-       *virt_cr0 = *new_cr0;
-       *old_cr0 = *new_cr0;
+
       } else {
-       // fill in
+       *real_cr0 = *new_cr0;
       }
 
       info->rip += index;
     }
     
-  } else {
+  } else { 
     PrintDebug("Unknown Mode write to CR0\n");
-    while(1);
+    return -1;
   }
   return 0;
 }
@@ -250,15 +309,39 @@ int handle_cr0_read(struct guest_info * info) {
       PrintDebug("index = %d, rip = %x\n", index, (ulong_t)(info->rip));
       info->rip += index;
       PrintDebug("new_rip = %x\n", (ulong_t)(info->rip));
-    } else {
-      addr_t host_addr;
+    } else if ((instr[index] == cr_access_byte) &&
+              (instr[index+1] == mov_from_cr_byte)) {
+      /* Mov from CR0
+       * This can only take a 32 bit register argument in anything less than 64 bit mode.
+       */
+      addr_t first_operand;
+      addr_t second_operand;
+      operand_type_t addr_type;
 
-      PrintDebug("Unknown read instr to CR0\n");
-      guest_pa_to_host_pa(info, get_addr_linear(info, guest_state->rip, guest_state->cs.selector), &host_addr);
-      
-      PrintDebug("Instr (15 bytes) at %x:\n", host_addr);
-      PrintTraceMemDump((char*)host_addr, 15);
+      struct cr0_32 * real_cr0 = (struct cr0_32 *)&(guest_state->cr0);
+
+      index += 2;
+
+      addr_type = decode_operands16(&(info->vm_regs), instr + index, &index, &first_operand, &second_operand, REG32);
+     
+      struct cr0_32 * virt_cr0 = (struct cr0_32 *)first_operand;
+  
+      if (addr_type != REG_OPERAND) {
+       // invalid opcode to guest
+       PrintDebug("Invalid operand type in mov from CR0\n");
+       return -1;
+      }
+
+      if (info->page_mode == SHADOW_PAGING) {
+       *virt_cr0 = *(struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
+      } else {
+       *virt_cr0 = *real_cr0;
+      }
+
+      info->rip += index;
 
+    } else {
+      PrintDebug("Unknown read instr from CR0\n");
       return -1;
     }
 
@@ -279,6 +362,41 @@ int handle_cr0_read(struct guest_info * info) {
     }
 
 
+    if ((instr[index] == cr_access_byte) &&
+       (instr[index+1] == mov_from_cr_byte)) {
+      addr_t first_operand;
+      addr_t second_operand;
+      operand_type_t addr_type;
+      struct cr0_32 * virt_cr0;
+      struct cr0_32 * real_cr0 = (struct cr0_32 *)&(guest_state->cr0);
+
+      index += 2;
+
+      addr_type = decode_operands32(&(info->vm_regs), instr + index, &index, &first_operand, &second_operand, REG32);
+
+      if (addr_type != REG_OPERAND) {
+       PrintDebug("Invalid operand type in mov from CR0\n");
+       return -1;
+      }
+      
+      virt_cr0 = (struct cr0_32 *)first_operand;
+
+      if (info->page_mode == SHADOW_PAGING) {
+       *virt_cr0 = *(struct cr0_32 *)&(info->shdw_pg_state.guest_cr0);
+      } else {
+       *virt_cr0 = *real_cr0;
+      }
+      
+      info->rip += index;
+
+    } else { 
+      PrintDebug("Unknown read instruction from CR0\n");
+      return -1;
+    }
+
+  } else {
+    PrintDebug("Unknown mode read from CR0\n");
+    return -1;
   }
 
 
index 8277335..ab2faae 100644 (file)
@@ -93,10 +93,16 @@ int handle_svm_exit(struct guest_info * info) {
     PrintDebug("Guest halted\n");
     return -1;
   } else {
-    addr_t rip_addr = get_addr_linear(info, guest_state->rip, guest_state->cs.selector);
+    addr_t rip_addr;
     char buf[15];
     addr_t host_addr;
 
+    if (info->cpu_mode == REAL) {
+      rip_addr = get_addr_linear(info, guest_state->rip, guest_state->cs.selector);
+    } else {
+      rip_addr = get_addr_linear(info, guest_state->rip, guest_state->cs.base);
+    }
+
 
     PrintDebug("SVM Returned:(VMCB=%x)\n", info->vmm_data); 
     PrintDebug("RIP: %x\n", guest_state->rip);
@@ -141,6 +147,7 @@ int handle_svm_exit(struct guest_info * info) {
       guest_ctrl->EVENTINJ.vector = get_intr_number(&(info->intr_state));
       guest_ctrl->EVENTINJ.valid = 1;
       guest_ctrl->EVENTINJ.type = SVM_INJECTION_EXTERNAL_INTR;
+      
       break;
     case NMI:
       guest_ctrl->EVENTINJ.type = SVM_INJECTION_NMI;
@@ -163,7 +170,7 @@ int handle_svm_exit(struct guest_info * info) {
     }
 
 
-    PrintDebug("Injecting Interrupt %d\n", guest_ctrl->EVENTINJ.vector);
+    PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->EVENTINJ.vector, info->rip);
  
 
     // IMPORTANT TODO
@@ -173,10 +180,16 @@ int handle_svm_exit(struct guest_info * info) {
 
   }
 
+
+
   guest_state->rax = info->vm_regs.rax;
   guest_state->rip = info->rip;
   guest_state->rsp = info->vm_regs.rsp;
 
+  if (exit_code == VMEXIT_INTR) {
+    PrintDebug("INTR ret IP = %x\n", guest_state->rip);
+  }
+
   return 0;
 }
 
@@ -206,19 +219,8 @@ int handle_svm_intr(struct guest_info * info) {
 
   PrintDebug("SVM Returned: Exit Code: %x\n",guest_ctrl->exit_code); 
   PrintDebug("V_INTR_VECTOR: 0x%x\n", guest_ctrl->guest_ctrl.V_INTR_VECTOR);
-  
-
-
 
   while(1);
-
-                                    
-
-
-
-  
     
   return 0;
 }
index eb7687e..f3ab427 100644 (file)
@@ -324,11 +324,12 @@ int read_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int co
     }
 
     
-    PrintDebug("Trying to read %d bytes\n", bytes_to_copy);
-    PrintDebug("Dist to page edge=%d\n", dist_to_pg_edge);
-    PrintDebug("PAGE_ADDR=0x%x\n", PAGE_ADDR(cursor));
-    PrintDebug("guest_pa=0x%x\n", guest_pa);
-    
+    /*
+      PrintDebug("Trying to read %d bytes\n", bytes_to_copy);
+      PrintDebug("Dist to page edge=%d\n", dist_to_pg_edge);
+      PrintDebug("PAGE_ADDR=0x%x\n", PAGE_ADDR(cursor));
+      PrintDebug("guest_pa=0x%x\n", guest_pa);
+    */
     
     memcpy(dest + bytes_read, (void*)host_addr, bytes_to_copy);