X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=05510c2a4bc2c7a66a80e95b49a63e7aa47c99bc;hb=506ce8412af316f361b7629a87af6672a87585dd;hp=7a466a9b6b34025976bca4b967b87afe13113ca6;hpb=9fe50ef21a3ea8eeabb660ccacb53288967aa600;p=palacios.git diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 7a466a9..05510c2 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -21,7 +21,7 @@ #define __VMM_H__ -//#include +/*#include */ #include #include @@ -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);