#define __VMM_H__
-//#include <palacios/vm_guest.h>
+/*#include <palacios/vm_guest.h>*/
#include <palacios/vmm_mem.h>
#include <palacios/vmm_types.h>
#ifdef __V3VEE__
-//#include <palacios/vmm_types.h>
+/*#include <palacios/vmm_types.h>*/
#include <palacios/vmm_string.h>
-//#include <palacios/vmm_paging.h>
+/*#include <palacios/vmm_paging.h>*/
/* utility definitions */
var; \
})
-// We need to check the hook structure at runtime to ensure its SAFE
+/* We need to check the hook structure at runtime to ensure its SAFE */
#define V3_Free(addr) \
do { \
extern struct v3_os_hooks * os_hooks; \
} \
} while (0)
-// uint_t V3_CPU_KHZ();
+/* uint_t V3_CPU_KHZ(); */
#define V3_CPU_KHZ() ({ \
unsigned int khz = 0; \
extern struct v3_os_hooks * os_hooks; \
typedef enum v3_vm_class {V3_INVALID_VM, V3_PC_VM, V3_CRAY_VM} v3_vm_class_t;
-// Maybe make this a define....
+/* Maybe make this a define.... */
typedef enum v3_cpu_arch {V3_INVALID_CPU, V3_SVM_CPU, V3_SVM_REV3_CPU, V3_VMX_CPU, V3_VMX_EPT_CPU} v3_cpu_arch_t;
int v3_vm_enter(struct guest_info * info);
-#endif //!__V3VEE__
+#endif /* !__V3VEE__ */
-//
-//
-// 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?
+ */
};
-// These are the types of physical memory address regions
-// from the perspective of the HOST
+/* These are the types of physical memory address regions
+ * from the perspective of the HOST
+ */
typedef enum shdw_region_type {
- SHDW_REGION_WRITE_HOOK, // This region is mapped as read-only (page faults on write)
- SHDW_REGION_FULL_HOOK, // This region is mapped as not present (always generate page faults)
- SHDW_REGION_ALLOCATED, // Region is a section of host memory
+ SHDW_REGION_WRITE_HOOK, /* This region is mapped as read-only (page faults on write) */
+ SHDW_REGION_FULL_HOOK, /* This region is mapped as not present (always generate page faults) */
+ SHDW_REGION_ALLOCATED, /* Region is a section of host memory */
} v3_shdw_region_type_t;
v3_shdw_region_type_t host_type;
- addr_t host_addr; // This either points to a host address mapping
+ addr_t host_addr; /* This either points to a host address mapping */
- // Called when data is read from a memory page
+ /* Called when data is read from a memory page */
int (*read_hook)(addr_t guest_addr, void * dst, uint_t length, void * priv_data);
- // Called when data is written to a memory page
+ /* Called when data is written to a memory page */
int (*write_hook)(addr_t guest_addr, void * src, uint_t length, void * priv_data);
void * priv_data;
int v3_handle_mem_full_hook(struct guest_info * info, addr_t guest_va, addr_t guest_pa,
struct v3_shadow_region * reg, pf_error_t access_info);
-#endif // ! __V3VEE__
+#endif /* ! __V3VEE__ */
#endif
} __attribute__((packed)) pdpe64_t;
-// We Don't support this
+/* We Don't support this */
typedef struct pdpe64_1GB {
uint_t present : 1;
uint_t writable : 1;
/* *************** */
typedef struct pf_error_code {
- uint_t present : 1; // if 0, fault due to page not present
- uint_t write : 1; // if 1, faulting access was a write
- uint_t user : 1; // if 1, faulting access was in user mode
- uint_t rsvd_access : 1; // if 1, fault from reading a 1 from a reserved field (?)
- uint_t ifetch : 1; // if 1, faulting access was an instr fetch (only with NX)
+ uint_t present : 1; /* if 0, fault due to page not present */
+ uint_t write : 1; /* if 1, faulting access was a write */
+ uint_t user : 1; /* if 1, faulting access was in user mode */
+ uint_t rsvd_access : 1; /* if 1, fault from reading a 1 from a reserved field (?) */
+ uint_t ifetch : 1; /* if 1, faulting access was an instr fetch (only with NX) */
uint_t rsvd : 27;
} __attribute__((packed)) pf_error_t;
void PrintGuestPageTree(struct guest_info * info, addr_t virtual_addr, addr_t cr3);
-#endif // !__V3VEE__
+#endif /* !__V3VEE__ */
#define __VMM_TYPES_H
#ifdef __V3VEE__
-//#include <palacios/vmm_stddef.h>
+/* #include <palacios/vmm_stddef.h> */
typedef ulong_t addr_t;
typedef ullong_t v3_reg_t;
-#endif // ! __V3VEE__
+#endif /* ! __V3VEE__ */
#endif
__rem; \
})
-//#define do_divll do_div
+/*#define do_divll do_div*/
/*
-#endif // ! __V3VEE__
+#endif /* ! __V3VEE__ */
#endif