From: Erik van der Kouwe Date: Tue, 23 Feb 2010 19:56:37 +0000 (-0600) Subject: updated comments for compiler compatibility X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=5a354421360c38d0f4d90f03c25296b2b35eec0e updated comments for compiler compatibility --- diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index b05871f..4640c01 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -21,7 +21,7 @@ #define __VMM_H__ -//#include +/*#include */ #include #include @@ -30,11 +30,11 @@ struct guest_info; #ifdef __V3VEE__ -//#include +/*#include */ #include -//#include +/*#include */ /* utility definitions */ @@ -118,7 +118,7 @@ struct guest_info; 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; \ @@ -127,7 +127,7 @@ struct guest_info; } \ } 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; \ @@ -189,7 +189,7 @@ struct guest_info; 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; @@ -210,7 +210,7 @@ v3_cpu_arch_t v3_get_cpu_type(int cpu_id); int v3_vm_enter(struct guest_info * info); -#endif //!__V3VEE__ +#endif /* !__V3VEE__ */ @@ -257,16 +257,17 @@ 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? + */ }; diff --git a/palacios/include/palacios/vmm_mem.h b/palacios/include/palacios/vmm_mem.h index f6338df..5484007 100644 --- a/palacios/include/palacios/vmm_mem.h +++ b/palacios/include/palacios/vmm_mem.h @@ -35,12 +35,13 @@ struct guest_info; -// 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; @@ -52,12 +53,12 @@ struct v3_shadow_region { 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; @@ -131,7 +132,7 @@ int v3_handle_mem_wr_hook(struct guest_info * info, addr_t guest_va, addr_t gues 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 diff --git a/palacios/include/palacios/vmm_paging.h b/palacios/include/palacios/vmm_paging.h index d1f93f2..e494e96 100644 --- a/palacios/include/palacios/vmm_paging.h +++ b/palacios/include/palacios/vmm_paging.h @@ -370,7 +370,7 @@ typedef struct pdpe64 { } __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; @@ -445,11 +445,11 @@ typedef struct pte64 { /* *************** */ 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; @@ -592,7 +592,7 @@ void PrintHostPageTree(struct guest_info * info, addr_t virtual_addr, addr_t cr3 void PrintGuestPageTree(struct guest_info * info, addr_t virtual_addr, addr_t cr3); -#endif // !__V3VEE__ +#endif /* !__V3VEE__ */ diff --git a/palacios/include/palacios/vmm_types.h b/palacios/include/palacios/vmm_types.h index 9a3fe61..8f898dc 100644 --- a/palacios/include/palacios/vmm_types.h +++ b/palacios/include/palacios/vmm_types.h @@ -21,7 +21,7 @@ #define __VMM_TYPES_H #ifdef __V3VEE__ -//#include +/* #include */ @@ -76,6 +76,6 @@ typedef char sint8_t; typedef ulong_t addr_t; typedef ullong_t v3_reg_t; -#endif // ! __V3VEE__ +#endif /* ! __V3VEE__ */ #endif diff --git a/palacios/include/palacios/vmm_util.h b/palacios/include/palacios/vmm_util.h index c6111d2..f3319b6 100644 --- a/palacios/include/palacios/vmm_util.h +++ b/palacios/include/palacios/vmm_util.h @@ -84,7 +84,7 @@ void v3_dump_mem(uint8_t * start, int n); __rem; \ }) -//#define do_divll do_div +/*#define do_divll do_div*/ /* @@ -150,6 +150,6 @@ void v3_dump_mem(uint8_t * start, int n); -#endif // ! __V3VEE__ +#endif /* ! __V3VEE__ */ #endif