ret; \
}) \
+#define V3_Yield(addr) \
+ do { \
+ extern struct vmm_os_hooks * os_hooks; \
+ if ((os_hooks) && (os_hooks)->yield_cpu) { \
+ (os_hooks)->yield_cpu(); \
+ } \
+ } while (0) \
+
+
+
+
/* ** */
void (*start_kernel_thread)(); // include pointer to function
+ void (*yield_cpu)();
+};
+
+struct v3_vm_config {
+ void * vm_kernel;
+ int use_ramdisk;
+ void * ramdisk;
+ int ramdisk_size;
};
+
/* This will contain Function pointers that control the VMs */
struct vmm_ctrl_ops {
struct guest_info *(*allocate_guest)();
- int (*config_guest)(struct guest_info * info, void * config_ptr);
+ int (*config_guest)(struct guest_info * info, struct v3_vm_config * config_ptr);
int (*init_guest)(struct guest_info * info);
int (*start_guest)(struct guest_info * info);
// int (*stop_vm)(uint_t vm_id);