#define __VMM_H__
-//#include <palacios/vm_guest.h>
+/*#include <palacios/vm_guest.h>*/
#include <palacios/vmm_mem.h>
#include <palacios/vmm_types.h>
} while (0)
+
+
+
#define V3_Hook_Interrupt(vm, irq) ({ \
int ret = 0; \
extern struct v3_os_hooks * os_hooks; \
} 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; \
while(1); \
} \
} while(0) \
-
+
int v3_vm_enter(struct guest_info * info);
-#endif //!__V3VEE__
+#endif /*!__V3VEE__ */
void *(*vaddr_to_paddr)(void *addr);
int (*hook_interrupt)(struct v3_vm_info * vm, unsigned int irq);
-
int (*ack_irq)(int irq);
unsigned int (*get_cpu_khz)(void);
};
-//
-//
-// 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? */
};
void Init_V3(struct v3_os_hooks * hooks, int num_cpus);
+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);
-struct v3_vm_info * v3_create_vm(void * cfg);
+int v3_stop_vm(struct v3_vm_info * vm);
int v3_deliver_irq(struct v3_vm_info * vm, struct v3_interrupt * intr);