VirtualBox

Changeset 4376 in vbox for trunk


Ignore:
Timestamp:
Aug 27, 2007 8:25:07 AM (17 years ago)
Author:
vboxsync
Message:

Removed obsolete and incorrect remR3SetPage.

Location:
trunk/src/recompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/VBoxRecompiler.c

    r4245 r4376  
    13651365    }
    13661366    //RAWEx_ProfileStart(env, STATS_QEMU_TOTAL);
    1367 }
    1368 
    1369 /**
    1370  * Set page table/dir entry. (called from tlb_set_page)
    1371  *
    1372  * @param   env         Pointer to cpu environment.
    1373  */
    1374 void remR3SetPage(CPUState *env, CPUTLBEntry *pTLBEntry,  CPUTLBEntry *pTLBEntryIgnored, int prot, int is_user)
    1375 {
    1376     target_ulong virt_addr;
    1377     if (env->pVM->rem.s.fIgnoreSetPage || env->pVM->rem.s.fIgnoreAll)
    1378         return;
    1379     Assert(env->pVM->rem.s.fInREM || env->pVM->rem.s.fInStateSync);
    1380 
    1381 #ifndef PGM_DYNAMIC_RAM_ALLOC
    1382     if(!is_user && !(env->state & CPU_RAW_RING0))
    1383         return; /* We are currently not interested in kernel pages */
    1384 #endif
    1385 
    1386 #if !defined(PGM_DYNAMIC_RAM_ALLOC) && !defined(REM_PHYS_ADDR_IN_TLB)
    1387     Log2(("tlb_set_page_raw (r=%x|w=%x)-%x prot %x is_user %d phys base %x\n",
    1388           pTLBEntry->addr_read, pTLBEntry->addr_write, pTLBEntry->addend, prot, is_user, phys_ram_base));
    1389 #else /* PGM_DYNAMIC_RAM_ALLOC */
    1390     Log2(("tlb_set_page_raw (r=%x|w=%x)-%x prot %x is_user %d\n",
    1391           pTLBEntry->addr_read, pTLBEntry->addr_write, pTLBEntry->addend, prot, is_user));
    1392 #endif/* PGM_DYNAMIC_RAM_ALLOC */
    1393 
    1394     /*
    1395      * Extract the virtual address.
    1396      */
    1397     if (prot & PAGE_WRITE)
    1398         virt_addr = pTLBEntry->addr_write;
    1399     else if (prot & PAGE_READ)
    1400         virt_addr = pTLBEntry->addr_read;
    1401     else
    1402         AssertMsgFailedReturnVoid(("tlb_set_page_raw unexpected protection flags %x\n", prot));
    1403     virt_addr &= TARGET_PAGE_MASK;
    1404 
    1405     /*
    1406      * Update the control registers before calling PGMFlushPage.
    1407      */
    1408     PCPUMCTX pCtx = (PCPUMCTX)env->pVM->rem.s.pCtx;
    1409     pCtx->cr0 = env->cr[0];
    1410     pCtx->cr3 = env->cr[3];
    1411     pCtx->cr4 = env->cr[4];
    1412 
    1413     /*
    1414      * Let PGM do the rest.
    1415      */
    1416     int rc = PGMInvalidatePage(env->pVM, (RTGCPTR)virt_addr);
    1417     if (VBOX_FAILURE(rc))
    1418     {
    1419 #ifdef VBOX_STRICT
    1420         target_ulong addend = pTLBEntry->addend;
    1421         target_ulong phys_addr;
    1422 
    1423         if (!(addend & IO_MEM_ROM))
    1424 # ifdef REM_PHYS_ADDR_IN_TLB
    1425             phys_addr = virt_addr + addend;
    1426 # elif defined(PGM_DYNAMIC_RAM_ALLOC)
    1427             phys_addr = remR3HCVirt2GCPhysInlined(env->pVM, (void *)(virt_addr + addend));
    1428 # else
    1429             phys_addr = virt_addr - (uintptr_t)phys_ram_base + addend;
    1430 # endif
    1431         else
    1432             phys_addr = addend;
    1433         AssertMsgFailed(("RAWEx_SetPageEntry %x %x %x %d failed!!\n", virt_addr, phys_addr, prot, is_user));
    1434 #endif /* VBOX_STRICT */
    1435         VM_FF_SET(env->pVM, VM_FF_PGM_SYNC_CR3);
    1436     }
    14371367}
    14381368
  • trunk/src/recompiler/exec.c

    r2422 r4376  
    16781678#ifdef VBOX
    16791679        /* inform raw mode about TLB page change */
    1680         /** @todo double check and fix this interface. OLD: remR3SetPage(env, &env->tlb_read[is_user][index], &env->tlb_write[is_user][index], prot, is_user); */
    1681         remR3SetPage(env, te, te, prot, is_user);
     1680        remR3FlushPage(env, vaddr);
    16821681#endif
    16831682    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette