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 initial global shutdown functionality
[palacios-OLD.git] / palacios / src / palacios / vmm.c
index 0e1b905..9fc99fd 100644 (file)
@@ -67,6 +67,29 @@ static void init_cpu(void * arg) {
     }
 }
 
+#if 0
+static void deinit_cpu(void * arg) {
+//    uint32_t cpu_id = (uint32_t)(addr_t)arg;
+
+ #ifdef CONFIG_SVM
+    if (v3_is_svm_capable()) {
+        PrintDebug("Machine is SVM Capable\n");
+        //v3_deinit_svm_cpu(cpu_id);
+
+    } else 
+#endif
+#ifdef CONFIG_VMX
+    if (v3_is_vmx_capable()) {
+       PrintDebug("Machine is VMX Capable\n");
+       //v3_deinit_vmx_cpu(cpu_id);
+
+    } else 
+#endif
+    {
+       PrintError("CPU has no virtualization Extensions\n");
+    }
+}
+#endif
 
 
 void Init_V3(struct v3_os_hooks * hooks, int num_cpus) {
@@ -118,8 +141,39 @@ void Init_V3(struct v3_os_hooks * hooks, int num_cpus) {
 }
 
 
-void Deinit_V3() {
-    
+void Shutdown_V3() {
+    //  int i;
+
+    V3_deinit_devices();
+    V3_deinit_shdw_paging();
+
+#if 0
+
+#ifdef CONFIG_SYMMOD
+    V3_deinit_symmod();
+#endif
+
+#ifdef CONFIG_INSTRUMENT_VMM
+    v3_deinit_instrumentation();
+#endif
+
+#ifdef CONFIG_VNET
+    v3_deinit_vnet();
+#endif
+
+#ifdef CONFIG_MULTITHREAD_OS
+    if ((hooks) && (hooks->call_on_cpu)) {
+       for (i = 0; i < CONFIG_MAX_CPUS; i++) {
+           if (v3_cpu_types[i] != V3_INVALID_CPU) {
+               deinit_cpu(i);
+           }
+       }
+    }
+#else 
+    deinit_cpu(0);
+#endif
+
+#endif
 
 }