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 v3_stop_vm prototype and exported it to the host OS interface
[palacios.git] / palacios / include / palacios / vmm.h
index 7a466a9..05510c2 100644 (file)
@@ -21,7 +21,7 @@
 #define __VMM_H__
 
 
-//#include <palacios/vm_guest.h>
+/*#include <palacios/vm_guest.h>*/
 #include <palacios/vmm_mem.h>
 #include <palacios/vmm_types.h>
 
@@ -160,6 +160,9 @@ struct guest_info;
     } while (0)
 
 
+
+
+
 #define V3_Hook_Interrupt(vm, irq) ({                                  \
            int ret = 0;                                                \
            extern struct v3_os_hooks * os_hooks;                       \
@@ -188,6 +191,17 @@ struct guest_info;
     } while (0)
 
 
+
+#define V3_CREATE_THREAD_ON_CPU(cpu, fn, arg, name) ({                 \
+           void * thread = NULL;                                       \
+           extern struct v3_os_hooks * os_hooks;                       \
+           if ((os_hooks) && (os_hooks)->start_thread_on_cpu) {        \
+               thread = (os_hooks)->start_thread_on_cpu(cpu, fn, arg, name); \
+           }                                                           \
+           thread;                                                     \
+       })
+
+
 #define V3_ACK_IRQ(irq)                                                \
     do {                                                       \
        extern struct v3_os_hooks * os_hooks;                   \
@@ -211,7 +225,7 @@ struct guest_info;
            while(1);                                                   \
        }                                                               \
     } while(0)                                                         \
-
+       
 
 
 
@@ -240,7 +254,7 @@ v3_cpu_arch_t v3_get_cpu_type(int cpu_id);
 int v3_vm_enter(struct guest_info * info);
 
 
-#endif //!__V3VEE__
+#endif /*!__V3VEE__ */
 
 
 
@@ -282,16 +296,16 @@ struct v3_os_hooks {
 };
 
 
-//
-//
-// This is the interrupt state that the VMM's interrupt handlers need to see
-//
+/*
+ *
+ * This is the interrupt state that the VMM's interrupt handlers need to see
+ */
 struct v3_interrupt {
     unsigned int irq;
     unsigned int error;
 
-    unsigned int should_ack;  // Should the vmm ack this interrupt, or will
-    // the host OS do it?
+    unsigned int should_ack;  /* Should the vmm ack this interrupt, or will
+                              * the host OS do it? */
 };
 
 
@@ -300,9 +314,9 @@ struct v3_interrupt {
 void Init_V3(struct v3_os_hooks * hooks,  int num_cpus);
 
 
-struct v3_vm_info * v3_create_vm(void * cfg);
+struct v3_vm_info * v3_create_vm(void * cfg, void * priv_data);
 int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask);
-
+int v3_stop_vm(struct v3_vm_info * vm);
 
 int v3_deliver_irq(struct v3_vm_info * vm, struct v3_interrupt * intr);