X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=cf02258e6041c9a5a53ebcb472efc8c818a1e2f8;hb=f4b430cdef58c5d13260c57f46a077c07c72864e;hp=7d8e69cf47ae4af9131c4c2e6fa10a513f5e5e66;hpb=6c28cc8753bb0e1b17b5c6c2ee296eb60e09079c;p=palacios.git diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 7d8e69c..cf02258 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -1,3 +1,6 @@ +/* (c) 2008, Jack Lange */ +/* (c) 2008, The V3VEE Project */ + #ifndef __VMM_H #define __VMM_H @@ -121,7 +124,7 @@ #define V3_Hook_Interrupt(irq, opaque) \ ({ \ - int ret = 0; \ + int ret = 0; \ extern struct vmm_os_hooks * os_hooks; \ if ((os_hooks) && (os_hooks)->hook_interrupt) { \ ret = (os_hooks)->hook_interrupt(irq, opaque); \ @@ -149,18 +152,24 @@ #define VMM_VMX_CPU 1 #define VMM_SVM_CPU 2 + +// Maybe make this a define.... +typedef enum v3_cpu_arch {V3_INVALID_CPU, V3_SVM_CPU, V3_SVM_REV3_CPU, V3_VMX_CPU} v3_cpu_arch_t; + + #endif //!__V3VEE__ + // // // This is the interrupt state that the VMM's interrupt handlers need to see // struct vmm_intr_state { - uint_t irq; - uint_t error; + unsigned int irq; + unsigned int error; - uint_t should_ack; // Should the vmm ack this interrupt, or will + unsigned int should_ack; // Should the vmm ack this interrupt, or will // the host OS do it? // This is the value given when the interrupt is hooked. @@ -188,7 +197,7 @@ struct vmm_os_hooks { // int (*hook_interrupt)(struct guest_info *s, int irq); - int (*hook_interrupt)(uint_t irq, void *opaque); + int (*hook_interrupt)(unsigned int irq, void *opaque); int (*ack_irq)(int irq); @@ -197,17 +206,24 @@ struct vmm_os_hooks { void (*start_kernel_thread)(); // include pointer to function -}; +}; + + /* This will contain Function pointers that control the VMs */ struct vmm_ctrl_ops { - int (*init_guest)(struct guest_info* info); + struct guest_info *(*allocate_guest)(); + + int (*config_guest)(struct guest_info * info, void * config_ptr); + int (*init_guest)(struct guest_info * info); int (*start_guest)(struct guest_info * info); // int (*stop_vm)(uint_t vm_id); int (*has_nested_paging)(); + + // v3_cpu_arch_t (*get_cpu_arch)(); };