From: Jack Lange Date: Thu, 23 Apr 2009 03:37:01 +0000 (-0500) Subject: typedef name changes X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=57de08049d9a345445d26741c5ee0f7f9e5c2fcc typedef name changes --- diff --git a/palacios/include/palacios/vm_guest.h b/palacios/include/palacios/vm_guest.h index d23c823..e2c2739 100644 --- a/palacios/include/palacios/vm_guest.h +++ b/palacios/include/palacios/vm_guest.h @@ -150,8 +150,8 @@ struct guest_info { struct v3_host_events host_event_hooks; - v3_vm_cpu_mode_t cpu_mode; - v3_vm_mem_mode_t mem_mode; + v3_cpu_mode_t cpu_mode; + v3_mem_mode_t mem_mode; uint_t addr_width; @@ -187,12 +187,12 @@ struct guest_info { uint_t v3_get_addr_width(struct guest_info * info); -v3_vm_cpu_mode_t v3_get_cpu_mode(struct guest_info * info); -v3_vm_mem_mode_t v3_get_mem_mode(struct guest_info * info); +v3_cpu_mode_t v3_get_cpu_mode(struct guest_info * info); +v3_mem_mode_t v3_get_mem_mode(struct guest_info * info); -const uchar_t * v3_cpu_mode_to_str(v3_vm_cpu_mode_t mode); -const uchar_t * v3_mem_mode_to_str(v3_vm_mem_mode_t mode); +const uchar_t * v3_cpu_mode_to_str(v3_cpu_mode_t mode); +const uchar_t * v3_mem_mode_to_str(v3_mem_mode_t mode); void v3_print_segments(struct guest_info * info); diff --git a/palacios/include/palacios/vmm_types.h b/palacios/include/palacios/vmm_types.h index 1c2f958..0dee998 100644 --- a/palacios/include/palacios/vmm_types.h +++ b/palacios/include/palacios/vmm_types.h @@ -30,8 +30,8 @@ typedef enum {SHADOW_PAGING, NESTED_PAGING} v3_paging_mode_t; typedef enum {VM_RUNNING, VM_STOPPED, VM_SUSPENDED, VM_ERROR, VM_EMULATING} v3_vm_operating_mode_t; -typedef enum {REAL, /*UNREAL,*/ PROTECTED, PROTECTED_PAE, LONG, LONG_32_COMPAT, LONG_16_COMPAT} v3_vm_cpu_mode_t; -typedef enum {PHYSICAL_MEM, VIRTUAL_MEM} v3_vm_mem_mode_t; +typedef enum {REAL, /*UNREAL,*/ PROTECTED, PROTECTED_PAE, LONG, LONG_32_COMPAT, LONG_16_COMPAT} v3_cpu_mode_t; +typedef enum {PHYSICAL_MEM, VIRTUAL_MEM} v3_mem_mode_t; diff --git a/palacios/src/palacios/vm_guest.c b/palacios/src/palacios/vm_guest.c index c981a3c..0d7418a 100644 --- a/palacios/src/palacios/vm_guest.c +++ b/palacios/src/palacios/vm_guest.c @@ -26,7 +26,7 @@ #include -v3_vm_cpu_mode_t v3_get_cpu_mode(struct guest_info * info) { +v3_cpu_mode_t v3_get_cpu_mode(struct guest_info * info) { struct cr0_32 * cr0; struct efer_64 * efer; struct cr4_32 * cr4 = (struct cr4_32 *)&(info->ctrl_regs.cr4); @@ -101,7 +101,7 @@ static const uchar_t LONG_STR[] = "Long"; static const uchar_t LONG_32_COMPAT_STR[] = "32bit Compat"; static const uchar_t LONG_16_COMPAT_STR[] = "16bit Compat"; -const uchar_t * v3_cpu_mode_to_str(v3_vm_cpu_mode_t mode) { +const uchar_t * v3_cpu_mode_to_str(v3_cpu_mode_t mode) { switch (mode) { case REAL: return REAL_STR; @@ -120,7 +120,7 @@ const uchar_t * v3_cpu_mode_to_str(v3_vm_cpu_mode_t mode) { } } -v3_vm_mem_mode_t v3_get_mem_mode(struct guest_info * info) { +v3_mem_mode_t v3_get_mem_mode(struct guest_info * info) { struct cr0_32 * cr0; if (info->shdw_pg_mode == SHADOW_PAGING) { @@ -143,7 +143,7 @@ v3_vm_mem_mode_t v3_get_mem_mode(struct guest_info * info) { static const uchar_t PHYS_MEM_STR[] = "Physical Memory"; static const uchar_t VIRT_MEM_STR[] = "Virtual Memory"; -const uchar_t * v3_mem_mode_to_str(v3_vm_mem_mode_t mode) { +const uchar_t * v3_mem_mode_to_str(v3_mem_mode_t mode) { switch (mode) { case PHYSICAL_MEM: return PHYS_MEM_STR; diff --git a/palacios/src/palacios/vmm_ctrl_regs.c b/palacios/src/palacios/vmm_ctrl_regs.c index 98a9e53..6f99e39 100644 --- a/palacios/src/palacios/vmm_ctrl_regs.c +++ b/palacios/src/palacios/vmm_ctrl_regs.c @@ -431,7 +431,7 @@ int v3_handle_cr4_write(struct guest_info * info) { int ret; int flush_tlb=0; struct x86_instr dec_instr; - v3_vm_cpu_mode_t cpu_mode = v3_get_cpu_mode(info); + v3_cpu_mode_t cpu_mode = v3_get_cpu_mode(info); if (info->mem_mode == PHYSICAL_MEM) { ret = read_guest_pa_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); diff --git a/palacios/src/palacios/vmm_direct_paging.c b/palacios/src/palacios/vmm_direct_paging.c index 1f2c6e6..257efa3 100644 --- a/palacios/src/palacios/vmm_direct_paging.c +++ b/palacios/src/palacios/vmm_direct_paging.c @@ -50,7 +50,7 @@ int v3_init_passthrough_pts(struct guest_info * info) { } int v3_reset_passthrough_pts(struct guest_info * info) { - v3_vm_cpu_mode_t mode = v3_get_cpu_mode(info); + v3_cpu_mode_t mode = v3_get_cpu_mode(info); // Delete the old direct map page tables switch(mode) { @@ -88,7 +88,7 @@ int v3_activate_passthrough_pt(struct guest_info * info) { int v3_handle_passthrough_pagefault(struct guest_info * info, addr_t fault_addr, pf_error_t error_code) { - v3_vm_cpu_mode_t mode = v3_get_cpu_mode(info); + v3_cpu_mode_t mode = v3_get_cpu_mode(info); switch(mode) { case REAL: @@ -112,7 +112,7 @@ int v3_handle_passthrough_pagefault(struct guest_info * info, addr_t fault_addr, int v3_handle_nested_pagefault(struct guest_info * info, addr_t fault_addr, pf_error_t error_code) { // THIS IS VERY BAD - v3_vm_cpu_mode_t mode = LONG; + v3_cpu_mode_t mode = LONG; PrintDebug("Nested PageFault: fault_addr=%p, error_code=%u\n",(void*)fault_addr, *(uint_t *)&error_code); @@ -137,7 +137,7 @@ int v3_handle_nested_pagefault(struct guest_info * info, addr_t fault_addr, pf_e } int v3_invalidate_passthrough_addr(struct guest_info * info, addr_t inv_addr) { - v3_vm_cpu_mode_t mode = v3_get_cpu_mode(info); + v3_cpu_mode_t mode = v3_get_cpu_mode(info); switch(mode) { case REAL: @@ -159,7 +159,7 @@ int v3_invalidate_passthrough_addr(struct guest_info * info, addr_t inv_addr) { int v3_invalidate_nested_addr(struct guest_info * info, addr_t inv_addr) { - v3_vm_cpu_mode_t mode = LONG; + v3_cpu_mode_t mode = LONG; switch(mode) { case REAL: diff --git a/palacios/src/palacios/vmm_mem.c b/palacios/src/palacios/vmm_mem.c index 3a9b16d..5d9b4ea 100644 --- a/palacios/src/palacios/vmm_mem.c +++ b/palacios/src/palacios/vmm_mem.c @@ -210,7 +210,7 @@ struct v3_shadow_region * insert_shadow_region(struct guest_info * info, // flush virtual page tables // 3 cases shadow, shadow passthrough, and nested if (info->shdw_pg_mode == SHADOW_PAGING) { - v3_vm_mem_mode_t mem_mode = v3_get_mem_mode(info); + v3_mem_mode_t mem_mode = v3_get_mem_mode(info); if (mem_mode == PHYSICAL_MEM) { addr_t cur_addr; @@ -338,7 +338,7 @@ void v3_delete_shadow_region(struct guest_info * info, struct v3_shadow_region * // flush virtual page tables // 3 cases shadow, shadow passthrough, and nested if (info->shdw_pg_mode == SHADOW_PAGING) { - v3_vm_mem_mode_t mem_mode = v3_get_mem_mode(info); + v3_mem_mode_t mem_mode = v3_get_mem_mode(info); if (mem_mode == PHYSICAL_MEM) { addr_t cur_addr;