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.


added more selective debugging directives
Jack Lange [Thu, 16 Oct 2008 21:37:15 +0000 (16:37 -0500)]
build/Makefile
palacios/build/Makefile
palacios/include/palacios/vmm.h
palacios/src/devices/ramdisk.c
palacios/src/palacios/svm_handler.c
palacios/src/palacios/vmm_dev_mgr.c

index cae3ceb..65a0aa3 100644 (file)
@@ -168,6 +168,14 @@ DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_HALT=0
 endif
 endif
 
+ifeq ($(DEBUG_DEV_MGR),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=1
+else 
+ifeq ($(DEBUG_DEV_MGR),0) 
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=0
+endif
+endif
+
 
 # ----------------------------------------------------------------------
 # Targets -
@@ -187,6 +195,10 @@ palacios-full:
        (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS) world)
 
 
+palacios-lean:
+       (cd $(PALACIOS_BUILD_DIR) && make LEAN_AND_MEAN=1 world)
+
+
 geekos: 
        cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
        cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
@@ -203,6 +215,8 @@ geekos-full:
 
 world: palacios-full geekos-full
 
+lean-and-mean: palacios-lean geekos-full
+
 
 
 # make ready to boot over PXE
index 51d0096..40593da 100644 (file)
@@ -52,11 +52,18 @@ VPATH := $(PROJECT_ROOT)/src
 # DEBUG=1 means VMM_DEBUG, VMM_INFO, and VMM_TRACE are enabled
 # as are SERIAL_PRINT_DEBUG
 # 
+
+ifeq ($(LEAN_AND_MEAN),1) 
+DEBUG=0
+DEBUG_SECTIONS=
+else
 DEBUG=1
 DEBUG_SECTIONS= 
+endif
+
 
 ifeq ($(DEBUG_ALL),1)
-  DEBUG_SECTIONS:= $(DEBUG_SECTIONS) -DDEBUG_SHADOW_PAGING -DDEBUG_CTRL_REGS -DDEBUG_INTERRUPTS -DDEBUG_IO -DDEBUG_KEYBOARD -DDEBUG_PIC -DDEBUG_PIT -DDEBUG_NVRAM -DDEBUG_EMULATOR -DDEBUG_GENERIC -DDEBUG_RAMDISK
+  DEBUG_SECTIONS:= $(DEBUG_SECTIONS) -DDEBUG_SHADOW_PAGING -DDEBUG_CTRL_REGS -DDEBUG_INTERRUPTS -DDEBUG_IO -DDEBUG_KEYBOARD -DDEBUG_PIC -DDEBUG_PIT -DDEBUG_NVRAM -DDEBUG_EMULATOR -DDEBUG_GENERIC -DDEBUG_RAMDISK -DDEBUG_XED -DDEBUG_HALT -DDEBUG_DEV_MGR
 endif
 
 ifeq ($(DEBUG_SHADOW_PAGING),1)
@@ -171,14 +178,20 @@ DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_HALT
 endif
 endif
 
+ifeq ($(DEBUG_DEV_MGR),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DDEBUG_DEV_MGR
+else 
+ifeq ($(DEBUG_DEV_MGR),0)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_DEV_MGR
+endif
+endif
 
 #DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DTEST_NE2K
 
 ifeq ($(DEBUG),1)
-  JRLDEBUG= -DSERIAL_PRINT_DEBUG=1 -DSERIAL_PRINT_DEBUG_LEVEL=10 -DSERIAL_PRINT=1 -DVMM_DEBUG=1 -DVMM_INFO=1 -DVMM_TRACE=1 $(DEBUG_SECTIONS)
-
+  JRLDEBUG=  -DVMM_DEBUG -DVMM_INFO -DVMM_TRACE $(DEBUG_SECTIONS)
 else
-  JRLDEBUG= -DSERIAL_PRINT_DEBUG=0 -DSERIAL_PRINT_DEBUG_LEVEL=999999 -DSERIAL_PRINT=0 -DVMM_DEBUG=0 -DVMM_INFO=0 -DVMM_TRACE=0
+
 endif
 
 
index ecad47f..ebd0d90 100644 (file)
@@ -34,7 +34,7 @@
 
 /* utility definitions */
 
-#if VMM_DEBUG
+#ifdef VMM_DEBUG
 #define PrintDebug(fmt, args...)                       \
   do {                                                 \
     extern struct vmm_os_hooks * os_hooks;             \
@@ -58,7 +58,7 @@
 
 
 
-#if VMM_INFO
+#ifdef VMM_INFO
 #define PrintInfo(fmt, args...)                        \
   do {                                                 \
     extern struct vmm_os_hooks * os_hooks;             \
@@ -71,7 +71,7 @@
 #endif
 
 
-#if VMM_TRACE
+#ifdef VMM_TRACE
 #define PrintTrace(fmt, args...)                                       \
   do {                                                                 \
     extern struct vmm_os_hooks * os_hooks;                             \
index 1eef6d6..0ae7d0a 100644 (file)
@@ -1361,7 +1361,7 @@ static void rd_raise_interrupt(struct vm_device * dev, struct channel_t * channe
 
     v3_raise_irq(dev->vm, channel->irq);
   } else {
-    PrintError("\t\tRaising irq but irq is disabled\n");
+    PrintDebug("\t\tRaising irq but irq is disabled\n");
   }
   
   return;
index 159cb53..74c397c 100644 (file)
@@ -236,7 +236,9 @@ int handle_svm_exit(struct guest_info * info) {
     break;
 
   case VMEXIT_HLT: {
+#ifdef DEBUG_HALT
     PrintDebug("Guest halted\n");
+#endif
     if (handle_svm_halt(info) == -1) {
       return -1;
     }
@@ -244,7 +246,7 @@ int handle_svm_exit(struct guest_info * info) {
     break;
 
   case VMEXIT_PAUSE: {
-    PrintDebug("Guest paused\n");
+    //PrintDebug("Guest paused\n");
     if (handle_svm_pause(info) == -1) { 
       return -1;
     }
index 258e858..df66d27 100644 (file)
 #include <palacios/vmm_decoder.h>
 
 
-
-#ifndef NULL
-#define NULL 0
+#ifndef DEBUG_DEV_MGR
+#undef PrintDebug
+#define PrintDebug(fmt, args...)
 #endif
 
+
+
 int dev_mgr_init(struct guest_info * info) {
   struct vmm_dev_mgr * mgr = &(info->dev_mgr);
   INIT_LIST_HEAD(&(mgr->dev_list));
@@ -264,6 +266,7 @@ int dev_mgr_unhook_mem(struct vm_device   *dev,
 
 
 
+#ifdef DEBUG_DEV_MGR
 
 void PrintDebugDevMgr(struct guest_info * info) {
   struct vmm_dev_mgr * mgr = &(info->dev_mgr);
@@ -300,3 +303,10 @@ void PrintDebugDevIO(struct vm_device * dev) {
 
   return;
 }
+
+#else 
+void PrintDebugDevMgr(struct guest_info * info) {}
+void PrintDebugDev(struct vm_device * dev) {}
+void PrintDebugDevMgrIO(struct vmm_dev_mgr * mgr) {}
+void PrintDebugDevIO(struct vm_device * dev) {}
+#endif