Lines Matching refs:ext
131 pmap_vmm_ext *ext; /* VMM pmap extension we're building */
143 ret = kmem_alloc_wired(kernel_map, (vm_offset_t *)&ext, PAGE_SIZE);
146 bzero((char *)ext, PAGE_SIZE); /* Zero the entire extension block page */
148 extPP = pmap_find_phys(kernel_pmap, (vm_offset_t)ext);
151 panic("vmm_build_shadow_hash: could not translate pmap_vmm_ext vaddr %p\n", ext);
154 ext->vmxSalt = (addr64_t)(vm_offset_t)ext ^ ptoa_64(extPP);
156 ext->vmxHostPmapPhys = (addr64_t)(vm_offset_t)pmap ^ pmap->pmapvr;
158 ext->vmxHostPmap = pmap; /* Set host pmap's effective address */
159 ext->vmxHashPgIdx = (addr64_t *)((vm_offset_t)ext + VMX_HPIDX_OFFSET);
161 ext->vmxHashPgList = (vm_offset_t *)((vm_offset_t)ext + VMX_HPLIST_OFFSET);
163 ext->vmxActiveBitmap = (vm_offset_t *)((vm_offset_t)ext + VMX_ACTMAP_OFFSET);
172 ret = kmem_alloc_wired(kernel_map, &ext->vmxHashPgList[idx], PAGE_SIZE);
175 bzero((char *)ext->vmxHashPgList[idx], PAGE_SIZE); /* Zero the page */
176 ext->vmxHashPgIdx[idx] = ptoa_64(pmap_find_phys(kernel_pmap, (addr64_t)ext->vmxHashPgList[idx]));
178 if (!ext->vmxHashPgIdx[idx]) { /* Hash-table page's LRA failed */
179 panic("vmm_build_shadow_hash: could not translate hash-table vaddr %08X\n", ext->vmxHashPgList[idx]);
181 map = (mapping_t *)ext->vmxHashPgList[idx];
188 return (ext); /* Return newly-minted VMM pmap extension */
192 if (ext->vmxHashPgList[idx]) {
193 kmem_free(kernel_map, ext->vmxHashPgList[idx], PAGE_SIZE);
196 kmem_free(kernel_map, (vm_offset_t)ext, PAGE_SIZE); /* Release the VMM pmap extension page */
207 static void vmm_release_shadow_hash(pmap_vmm_ext *ext)
212 kmem_free(kernel_map, ext->vmxHashPgList[idx], PAGE_SIZE);
215 kmem_free(kernel_map, (vm_offset_t)ext, PAGE_SIZE); /* Release the VMM pmap extension page */