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.


ported the profiler over to the telemetry interface
[palacios.git] / palacios / src / palacios / vmm_config.c
index b9c60c8..af45a0a 100644 (file)
 #include <palacios/vmm_debug.h>
 #include <palacios/vmm_msr.h>
 #include <palacios/vmm_decoder.h>
-#include <palacios/vmm_profiler.h>
+#include <palacios/vmm_telemetry.h>
 #include <palacios/vmm_mem.h>
 #include <palacios/vmm_hypercall.h>
 #include <palacios/vmm_dev_mgr.h>
 
+#ifdef CONFIG_SYMBIOTIC_SWAP
+#include <palacios/vmm_sym_swap.h>
+#endif
+
 
 #include <devices/generic.h>
 #include <devices/ide.h>
 #include <devices/video.h>
 
 
+
+
 #include <palacios/vmm_host_events.h>
 
-#define USE_GENERIC 1
 
 
 #include <palacios/vmm_socket.h>
@@ -70,8 +75,19 @@ int v3_pre_config_guest(struct guest_info * info, struct v3_vm_config * config_p
     // Amount of ram the Guest will have, rounded to a 4K page boundary
     info->mem_size = config_ptr->mem_size & ~(addr_t)0xfff;
 
+    /*
+     * Initialize the subsystem data strutures
+     */
+#ifdef CONFIG_TELEMETRY
+    // This should go first, because other subsystems will depend on the guest_info flag
+    if (config_ptr->enable_telemetry) {
+       info->enable_telemetry = 1;
+       v3_init_telemetry(info);
+    } else {
+       info->enable_telemetry = 0;
+    }
+#endif
 
-    // Initialize the subsystem data strutures
     v3_init_time(info);
     v3_init_io_map(info);
     v3_init_msr_map(info);
@@ -85,6 +101,11 @@ int v3_pre_config_guest(struct guest_info * info, struct v3_vm_config * config_p
     
     v3_init_hypercall_map(info);
 
+#ifdef CONFIG_SYMBIOTIC_SWAP
+    v3_init_sym_swap(info);
+#endif
+
+
 
     // Initialize the memory map
     v3_init_shadow_map(info);
@@ -99,14 +120,7 @@ int v3_pre_config_guest(struct guest_info * info, struct v3_vm_config * config_p
        info->shdw_pg_mode = SHADOW_PAGING;
     }
 
-#ifdef CONFIG_PROFILE_VMM
-    if (config_ptr->enable_profiling) {
-       info->enable_profiler = 1;
-       v3_init_profiler(info);
-    } else {
-       info->enable_profiler = 0;
-    }
-#endif
+
 
     if (config_ptr->schedule_freq == 0) {
        // set the schedule frequency to 100 HZ
@@ -229,7 +243,7 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_
     v3_create_device(info, "IOAPIC", "LAPIC");
     v3_create_device(info, "VMNET", NULL);
     
-    int use_generic = USE_GENERIC;
+
 
     if (config_ptr->enable_pci == 1) {
        struct ide_cfg ide_config = {"PCI", "PIIX3"};
@@ -331,9 +345,9 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_
 
 
 
-    if (use_generic) {
+#ifdef CONFIG_GENERIC
        configure_generic(info, config_ptr);
-    }
+#endif
 
     // This should go last because it requires information about the Harddrives
     v3_create_device(info, "NVRAM", "IDE");
@@ -345,7 +359,7 @@ static int setup_devices(struct guest_info * info, struct v3_vm_config * config_
 
 
 
-
+#ifdef CONFIG_GENERIC
 static int configure_generic(struct guest_info * info, struct v3_vm_config * config_ptr) {
     PrintDebug("Creating Generic Device\n");
     v3_create_device(info, "GENERIC", NULL);
@@ -461,3 +475,4 @@ static int configure_generic(struct guest_info * info, struct v3_vm_config * con
     
     return 0;
 }
+#endif