X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fvmm_mem.h;h=e52ae7c092e8fff7b7c77261bf6afa67d5e65c85;hb=5ad0c835a5bd7181a7a342478bd398ad73712306;hp=35c872479c8e4b31b2b816c80ff42b08985baf1a;hpb=ebf600fd1dc3b43e8100be168452c6e03b8a2dda;p=palacios-OLD.git diff --git a/palacios/include/geekos/vmm_mem.h b/palacios/include/geekos/vmm_mem.h index 35c8724..e52ae7c 100644 --- a/palacios/include/geekos/vmm_mem.h +++ b/palacios/include/geekos/vmm_mem.h @@ -20,19 +20,20 @@ typedef ulong_t addr_t; // These are the types of physical memory address regions // from the perspective of the guest typedef enum guest_region_type { - GUEST_REGION_PHYSICAL_MEMORY, GUEST_REGION_NOTHING, + GUEST_REGION_PHYSICAL_MEMORY, GUEST_REGION_MEMORY_MAPPED_DEVICE} guest_region_type_t; // These are the types of physical memory address regions // from the perspective of the HOST typedef enum host_region_type { - HOST_REGION_PHYSICAL_MEMORY, - HOST_REGION_UNALLOCATED, - HOST_REGION_NOTHING, - HOST_REGION_MEMORY_MAPPED_DEVICE, - HOST_REGION_REMOTE, - HOST_REGION_SWAPPED, + HOST_REGION_INVALID, // This region is INVALID (this is a return type, to denote errors) + HOST_REGION_NOTHING, // This region is mapped as not present (always generate page faults) + HOST_REGION_PHYSICAL_MEMORY, // Region is a section of host memory + HOST_REGION_MEMORY_MAPPED_DEVICE, // Region is allocated for DMA + HOST_REGION_UNALLOCATED, // Region is mapped on demand + HOST_REGION_REMOTE, // Region is located on a remote machine + HOST_REGION_SWAPPED, // Region is swapped } host_region_type_t; @@ -81,9 +82,7 @@ shadow_region_t * get_shadow_region_by_addr(shadow_map_t * map, addr_t guest_add shadow_region_t * get_shadow_region_by_index(shadow_map_t * map, uint_t index); -int guest_paddr_to_host_paddr(shadow_region_t * entry, - addr_t guest_addr, - addr_t * host_addr); +host_region_type_t lookup_shadow_map_addr(shadow_map_t * map, addr_t guest_addr, addr_t * host_addr); // Semantics: @@ -103,5 +102,4 @@ void print_shadow_map(shadow_map_t * map); - #endif