• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/ppc/

Lines Matching defs:act

68 **		act - pointer to current thread activation
76 thread_t act,
84 if (act->machine.vmmControl == 0) return NULL; /* No control table means no vmm */
87 CTable = act->machine.vmmControl; /* Make the address a bit more convienient */
102 ** act - pointer to current thread activation
110 static pmap_t vmm_get_adsp(thread_t act, vmm_thread_index_t index)
114 if (act->machine.vmmControl == 0) return NULL; /* No control table means no vmm */
117 pmap = act->machine.vmmControl->vmmAdsp[index - 1]; /* Get the pmap */
225 thread_t act,
228 vmmCntrlTable *CTable = act->machine.vmmControl; /* Get VMM control table */
233 panic("vmm_activate_gsa: VMM control table not present; act = %p, idx = %lu\n",
234 act, index);
237 CEntry = vmm_get_entry(act, index); /* Get context from index */
239 panic("vmm_activate_gsa: Unexpected failure of vmm_get_entry; act = %p, idx = %lu\n",
240 act, index);
244 hpmap = act->map->pmap; /* Get host pmap */
245 gpmap = vmm_get_adsp(act, index); /* Get guest pmap */
247 panic("vmm_activate_gsa: Unexpected failure of vmm_get_adsp; act = %p, idx = %lu\n",
248 act, index);
278 thread_t act,
281 vmmCntrlEntry *CEntry = vmm_get_entry(act, index); /* Get context from index */
284 panic("vmm_deactivate_gsa: Unexpected failure of vmm_get_entry; act = %p, idx = %lu\n",
285 act, index);
288 gpmap = vmm_get_adsp(act, index); /* Get guest pmap */
290 panic("vmm_deactivate_gsa: Unexpected failure of vmm_get_adsp; act = %p, idx = %lu\n",
291 act, index);
307 thread_t act,
315 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
317 panic("vmm_flush_context: Unexpected failure of vmm_get_entry; act = %p, idx = %lu\n",
318 act, index);
332 vmm_unmap_all_pages(act, index); /* Blow away all mappings for this context */
334 CTable = act->machine.vmmControl; /* Get the control table address */
425 vmm_max_addr(__unused thread_t act)
442 ** act - pointer to current thread activation structure
451 thread_t act,
456 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
471 ** act - pointer to current thread activation
485 thread_t act;
517 act = current_thread(); /* Pick up our activation */
546 if(gact && (gact != act)) { /* Check if another thread is a vmm or trying to be */
553 if(!gact) act->machine.vmmControl = (vmmCntrlTable *)1; /* Temporarily mark that we are the vmm thread */
557 CTable = act->machine.vmmControl; /* Get the control table address */
560 act->machine.vmmControl = NULL; /* Unmark us as vmm 'cause we failed */
567 act->machine.vmmControl = CTable; /* Initialize the table anchor */
581 act->map,
591 conphys = pmap_find_phys(act->map->pmap, (addr64_t)((uintptr_t)vmm_user_state));
596 (void) vm_map_unwire(act->map, /* No, unwire the context area */
630 CTable->vmmc[cvi].vmmFacCtx.facAct = act; /* Point back to the activation */
634 hpmap = act->map->pmap; /* Get host pmap */
639 vmm_activate_gsa(act, cvi+1); /* Activate GSA */
656 act->machine.vmmControl = NULL; /* Unmark us as vmm 'cause we failed */
671 ** act - pointer to current thread activation structure
685 thread_t act,
694 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
712 gpmap = act->machine.vmmControl->vmmAdsp[index - 1];
722 act->machine.vmmControl->vmmAdsp[index - 1] = NULL; /* Clean it up */
726 act->map,
733 CTable = act->machine.vmmControl; /* Get the control table address */
761 if(!act->machine.vmmControl->vmmAdsp[index - 1]) continue; /* Nothing to remove here */
762 mapping_remove(act->machine.vmmControl->vmmAdsp[index - 1], 0xFFFFFFFFFFFFF000LL); /* Remove final page explicitly because we might have mapped it */
763 pmap_remove(act->machine.vmmControl->vmmAdsp[index - 1], 0, 0xFFFFFFFFFFFFF000LL); /* Remove all entries from this map */
764 pmap_destroy(act->machine.vmmControl->vmmAdsp[index - 1]); /* Toss the pmap for this context */
765 act->machine.vmmControl->vmmAdsp[index - 1] = NULL; /* Clear just in case */
768 pmap = act->map->pmap; /* Get our pmap */
777 act->machine.vmmControl = NULL; /* Unmark us as vmm */
799 ** act - pointer to current thread activation structure
809 thread_t act,
819 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
824 vmm_flush_context(act, index); /* Flush the context */
831 result = vmm_activate_gsa(act, index); /* Activate guest shadow assist */
844 thread_t act,
854 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
859 vmm_flush_context(act, index); /* Flush the context */
866 vmm_deactivate_gsa(act, index); /* Deactivate guest shadow assist */
892 void vmm_tear_down_all(thread_t act) {
900 if(act->machine.specFlags & runningVM) { /* Are we actually in a context right now? */
901 save = find_user_regs(act); /* Find the user state context */
909 vmm_force_exit(act, save); /* Force and exit from VM state */
913 if(act->machine.vmmControl) { /* Do we have a vmm control block? */
914 CTable = act->machine.vmmControl;
917 ret = vmm_tear_down_context(act, cvi); /* Take down the found context */
919 panic("vmm_tear_down_all: vmm_tear_down_context failed; ret=%08X, act = %p, cvi = %d\n",
920 ret, act, cvi);
928 if(act->machine.vmmControl) { /* Did we find one? */
952 ** act - pointer to current thread activation
972 thread_t act,
984 pmap = vmm_get_adsp(act, index); /* Get the guest pmap for this address space */
1080 act->machine.vmmControl->vmmLastMap = ava & 0xFFFFFFFFFFFFF000ULL; /* Remember the last mapping we made */
1081 act->machine.vmmControl->vmmGFlags = (act->machine.vmmControl->vmmGFlags & ~vmmLastAdSp) | index; /* Remember last address space */
1109 thread_t act,
1122 CEntry = vmm_get_entry(act, cndx); /* Get and validate the index */
1125 if (((getPerProc()->spcFlags) & FamVMmode) && (CEntry != act->machine.vmmCEntry))
1131 ret = vmm_map_page(act, adsp, cva, ava, prot); /* Go try to map the page on in */
1135 act->machine.vmmControl->vmmLastMap = ava & 0xFFFFFFFFFFFFF000ULL; /* Remember the last mapping we made */
1136 act->machine.vmmControl->vmmGFlags = (act->machine.vmmControl->vmmGFlags & ~vmmLastAdSp) | cndx; /* Remember last address space */
1137 vmm_execute_vm(act, cndx); /* Return was ok, launch the VM */
1150 ** act - pointer to current thread activation
1164 thread_t act,
1179 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
1204 ret = vmm_map_page(act, index, cva, ava, prot); /* Go try to map the page on in */
1219 ** act - pointer to current thread activation
1235 thread_t act,
1244 pmap = vmm_get_adsp(act, index); /* Get and validate the index */
1276 ** act - pointer to current thread activation
1286 thread_t act,
1293 pmap = vmm_get_adsp(act, index); /* Get and validate the index */
1297 hw_susp_map_gv(act->map->pmap, pmap, va); /* Suspend the mapping */
1313 ** act - pointer to current thread activation
1325 thread_t act,
1339 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
1368 pmap = act->machine.vmmControl->vmmAdsp[adsp]; /* Get the pmap for this request */
1374 hw_susp_map_gv(act->map->pmap, pmap, gva);
1392 ** act - pointer to current thread activation
1403 thread_t act,
1408 pmap = vmm_get_adsp(act, index); /* Convert index to entry */
1430 ** act - pointer to current thread activation
1445 thread_t act,
1453 pmap = vmm_get_adsp(act, index); /* Convert index to entry */
1457 RC = hw_test_rc_gv(act->map->pmap, pmap, va, reset);/* Fetch the RC bits and clear if requested */
1487 ** act - pointer to current thread activation
1500 thread_t act,
1509 pmap = vmm_get_adsp(act, index); /* Convert index to entry */
1533 act->machine.vmmControl->vmmLastMap = va & 0xFFFFFFFFFFFFF000ULL; /* Remember the last mapping we made */
1534 act->machine.vmmControl->vmmGFlags = (act->machine.vmmControl->vmmGFlags & ~vmmLastAdSp) | index; /* Remember last address space */
1559 thread_t act,
1570 CEntry = vmm_get_entry(act, cndx); /* Get and validate the index */
1576 if (((getPerProc()->spcFlags) & FamVMmode) && (CEntry != act->machine.vmmCEntry))
1579 ret = vmm_protect_page(act, adsp, va, prot); /* Go try to change access */
1582 act->machine.vmmControl->vmmLastMap = va & 0xFFFFFFFFFFFFF000ULL; /* Remember the last mapping we made */
1583 act->machine.vmmControl->vmmGFlags = (act->machine.vmmControl->vmmGFlags & ~vmmLastAdSp) | cndx; /* Remember last address space */
1584 vmm_execute_vm(act, cndx); /* Return was ok, launch the VM */
1600 ** act - pointer to current thread activation structure
1608 thread_t act,
1615 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
1618 act->machine.specFlags &= ~floatCng; /* Clear the special flag */
1645 ** act - pointer to current thread activation structure
1653 thread_t act,
1661 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
1666 act->machine.specFlags &= ~vectorCng; /* Clear the special flag */
1715 ** act - pointer to current thread activation structure
1725 thread_t act,
1732 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
1737 vmm_timer_pop(act); /* Go adjust all of the timer stuff */
1754 ** act - pointer to current thread activation structure
1763 thread_t act,
1768 CEntry = vmm_get_entry(act, index); /* Convert index to entry */
1794 ** act - pointer to current thread activation structure
1801 thread_t act)
1808 if(!((unsigned int)act->machine.vmmControl & 0xFFFFFFFE)) { /* Are there any virtual machines? */
1809 panic("vmm_timer_pop: No virtual machines defined; act = %p\n", act);
1816 CTable = act->machine.vmmControl; /* Make this easier */
1832 if((unsigned int)&CTable->vmmc[cvi] == (unsigned int)act->machine.vmmCEntry) { /* Is this the running VM? */
1833 sv = find_user_regs(act); /* Get the user state registers */
1835 panic("vmm_timer_pop: no user context; act = %p\n", act);
1838 vmm_force_exit(act, sv); /* Intercept a running VM */
1854 if (act->machine.qactTimer == 0 || soonest <= act->machine.qactTimer)
1855 act->machine.qactTimer = soonest; /* Set lowest timer */
1886 thread_t act;
1901 act = NULL; /* Pretend we didn't find it yet */
1905 act = fact; /* Yeah... */
1911 if(!((unsigned int)act)) { /* See if we have VMMs yet */
1917 thread_reference(act);
1921 thread_mtx_lock(act);
1923 CTable = act->machine.vmmControl; /* Get the pointer to the table */
1926 thread_mtx_unlock(act); /* Unlock the activation */
1927 thread_deallocate(act);
1933 thread_mtx_unlock(act); /* Unlock the activation */
1934 thread_deallocate(act);
1947 if(hw_compare_and_store(0, 1, &act->machine.emPendRupts)) { /* See if there is already a stop pending and lock out others if not */
1948 thread_mtx_unlock(act); /* Already one pending, unlock the activation */
1949 thread_deallocate(act);
1956 act->machine.emPendRupts = 0; /* No memory, say we have given up request */
1957 thread_mtx_unlock(act); /* Unlock the activation */
1958 thread_deallocate(act);
1968 stopapc->next = act->handlers; /* Put our interrupt at the start of the list */
1969 act->handlers = stopapc; /* Point to us */
1971 act_set_apc(act); /* Set an APC AST */
1974 thread_mtx_unlock(act); /* Unlock the activation */
1975 thread_deallocate(act);
1992 ** thread_t act - the activation
1998 void vmm_interrupt(ReturnHandler *rh, thread_t act) {
2010 act->machine.emPendRupts = 0; /* Say that there are no more interrupts pending */
2011 CTable = act->machine.vmmControl; /* Get the pointer to the table */
2015 if(act->machine.vmmCEntry && (act->machine.vmmCEntry->vmmFlags & vmmXStop)) { /* Do we need to stop the running guy? */
2016 sv = find_user_regs(act); /* Get the user state registers */
2018 panic("vmm_interrupt: no user context; act = %p\n", act);
2021 vmm_force_exit(act, sv); /* Intercept a running VM */