Changeset 39078 in vbox for trunk/src/VBox/VMM/VMMAll/EMAll.cpp
- Timestamp:
- Oct 21, 2011 2:18:22 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 74507
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r39038 r39078 402 402 if (IOM_SUCCESS(rcStrict)) 403 403 pCtxCore->rip += cbOp; 404 NOREF(pVCpu); 404 405 return rcStrict; 405 406 #else 407 NOREF(pVM); NOREF(pVCpu); NOREF(pCtxCore); NOREF(pDis); NOREF(cbOp); 406 408 AssertReleaseMsgFailed(("not implemented\n")); 407 409 return VERR_NOT_IMPLEMENTED; … … 421 423 * instruction and it either flushed the TLB or the CPU reused it. 422 424 */ 425 #else 426 NOREF(pVM); 423 427 #endif 424 428 return PGMPhysInterpretedReadNoHandlers(pVCpu, pCtxCore, pvDst, GCPtrSrc, cb, /*fMayTrap*/ false); … … 430 434 /* Don't use MMGCRamWrite here as it does not respect zero pages, shared 431 435 pages or write monitored pages. */ 436 NOREF(pVM); 432 437 return PGMPhysInterpretedWriteNoHandlers(pVCpu, pCtxCore, GCPtrDst, pvSrc, cb, /*fMayTrap*/ false); 433 438 } … … 508 513 { 509 514 OP_PARAMVAL param1, param2; 515 NOREF(pvFault); 510 516 511 517 /* Source to make DISQueryParamVal read the register value - ugly hack */ … … 642 648 { 643 649 OP_PARAMVAL param1; 650 NOREF(pvFault); 644 651 645 652 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST); … … 711 718 Assert(pDis->mode != CPUMODE_64BIT); /** @todo check */ 712 719 OP_PARAMVAL param1; 720 NOREF(pvFault); 721 713 722 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST); 714 723 if(RT_FAILURE(rc)) … … 791 800 { 792 801 OP_PARAMVAL param1, param2; 802 NOREF(pvFault); 793 803 794 804 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST); … … 887 897 void *pvParam1; 888 898 OP_PARAMVAL param1, param2; 899 NOREF(pvFault); 889 900 890 901 #if HC_ARCH_BITS == 32 && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0) … … 958 969 PFNEMULATEPARAM3 pfnEmulate) 959 970 { 971 NOREF(pvFault); 960 972 OP_PARAMVAL param1, param2; 961 973 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST); … … 1205 1217 static int emInterpretMov(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 1206 1218 { 1219 NOREF(pvFault); 1207 1220 OP_PARAMVAL param1, param2; 1208 1221 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_DEST); … … 1343 1356 uint64_t cTransfers; 1344 1357 int offIncrement; 1358 NOREF(pvFault); 1345 1359 1346 1360 /* Don't support any but these three prefix bytes. */ … … 1493 1507 { 1494 1508 OP_PARAMVAL param1, param2; 1509 NOREF(pvFault); 1495 1510 1496 1511 #if HC_ARCH_BITS == 32 && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL_IN_R0) … … 1564 1579 Assert(pDis->mode != CPUMODE_64BIT); /** @todo check */ 1565 1580 OP_PARAMVAL param1; 1581 NOREF(pvFault); 1566 1582 1567 1583 /* Source to make DISQueryParamVal read the register value - ugly hack */ … … 1619 1635 void *pvParamReg2; 1620 1636 size_t cbParamReg2; 1637 NOREF(pvFault); 1621 1638 1622 1639 /* Source to make DISQueryParamVal read the register value - ugly hack */ … … 1746 1763 { 1747 1764 /* only allow direct calls to EMInterpretIret for now */ 1765 NOREF(pVM); NOREF(pVCpu); NOREF(pDis); NOREF(pRegFrame); NOREF(pvFault); NOREF(pcbSize); 1748 1766 return VERR_EM_INTERPRETER; 1749 1767 } … … 1755 1773 { 1756 1774 /* Nothing to do. */ 1775 NOREF(pVM); NOREF(pVCpu); NOREF(pDis); NOREF(pRegFrame); NOREF(pvFault); NOREF(pcbSize); 1757 1776 return VINF_SUCCESS; 1758 1777 } … … 1774 1793 * (in absence of segment override prefixes)???? 1775 1794 */ 1795 NOREF(pVM); NOREF(pRegFrame); 1776 1796 #ifdef IN_RC 1777 1797 LogFlow(("RC: EMULATE: invlpg %RGv\n", pAddrGC)); … … 1795 1815 OP_PARAMVAL param1; 1796 1816 RTGCPTR addr; 1817 NOREF(pvFault); NOREF(pVM); NOREF(pcbSize); 1797 1818 1798 1819 VBOXSTRICTRC rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE); … … 1843 1864 { 1844 1865 uint32_t iLeaf = pRegFrame->eax; 1866 NOREF(pVM); 1845 1867 1846 1868 /* cpuid clears the high dwords of the affected 64 bits registers. */ … … 1862 1884 static int emInterpretCpuId(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 1863 1885 { 1886 NOREF(pVM); NOREF(pVCpu); NOREF(pDis); NOREF(pRegFrame); NOREF(pvFault); NOREF(pcbSize); 1864 1887 int rc = EMInterpretCpuId(pVM, pVCpu, pRegFrame); 1865 1888 return rc; … … 1883 1906 int rc = CPUMGetGuestCRx(pVCpu, SrcRegCrx, &val64); 1884 1907 AssertMsgRCReturn(rc, ("CPUMGetGuestCRx %d failed\n", SrcRegCrx), VERR_EM_INTERPRETER); 1908 NOREF(pVM); 1885 1909 1886 1910 if (CPUMIsGuestIn64BitCode(pVCpu, pRegFrame)) … … 1909 1933 VMMDECL(int) EMInterpretCLTS(PVM pVM, PVMCPU pVCpu) 1910 1934 { 1935 NOREF(pVM); 1911 1936 uint64_t cr0 = CPUMGetGuestCR0(pVCpu); 1912 1937 if (!(cr0 & X86_CR0_TS)) … … 1920 1945 static int emInterpretClts(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 1921 1946 { 1947 NOREF(pDis); NOREF(pRegFrame); NOREF(pvFault); NOREF(pcbSize); 1922 1948 return EMInterpretCLTS(pVM, pVCpu); 1923 1949 } … … 1940 1966 uint64_t msrEFER; 1941 1967 int rc, rc2; 1968 NOREF(pVM); 1942 1969 1943 1970 /** @todo Clean up this mess. */ … … 2123 2150 OP_PARAMVAL param1; 2124 2151 uint32_t val; 2152 NOREF(pvFault); NOREF(pcbSize); 2125 2153 2126 2154 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE); … … 2202 2230 static int emInterpretMovCRx(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2203 2231 { 2232 NOREF(pvFault); NOREF(pcbSize); 2204 2233 if ((pDis->param1.flags == USE_REG_GEN32 || pDis->param1.flags == USE_REG_GEN64) && pDis->param2.flags == USE_REG_CR) 2205 2234 return EMInterpretCRxRead(pVM, pVCpu, pRegFrame, pDis->param1.base.reg_gen, pDis->param2.base.reg_ctrl); … … 2227 2256 uint64_t val; 2228 2257 int rc; 2258 NOREF(pVM); 2229 2259 2230 2260 if (CPUMIsGuestIn64BitCode(pVCpu, pRegFrame)) … … 2265 2295 { 2266 2296 uint64_t val64; 2297 NOREF(pVM); 2267 2298 2268 2299 int rc = CPUMGetGuestDRx(pVCpu, SrcRegDrx, &val64); … … 2288 2319 { 2289 2320 int rc = VERR_EM_INTERPRETER; 2321 NOREF(pvFault); NOREF(pcbSize); 2290 2322 2291 2323 if((pDis->param1.flags == USE_REG_GEN32 || pDis->param1.flags == USE_REG_GEN64) && pDis->param2.flags == USE_REG_DBG) … … 2312 2344 OP_PARAMVAL param1; 2313 2345 RTSEL sel; 2346 NOREF(pVM); NOREF(pvFault); NOREF(pcbSize); 2314 2347 2315 2348 int rc = DISQueryParamVal(pRegFrame, pDis, &pDis->param1, ¶m1, PARAM_SOURCE); … … 2360 2393 RTGCPTR pParam1; 2361 2394 X86XDTR32 dtr32; 2395 NOREF(pvFault); NOREF(pcbSize); 2362 2396 2363 2397 Log(("Emulate %s at %RGv\n", emGetMnemonic(pDis), (RTGCPTR)pRegFrame->rip)); … … 2404 2438 static int emInterpretSti(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2405 2439 { 2440 NOREF(pcbSize); 2406 2441 PPATMGCSTATE pGCState = PATMQueryGCState(pVM); 2407 2442 … … 2430 2465 emInterpretHlt(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2431 2466 { 2467 NOREF(pVM); NOREF(pVCpu); NOREF(pDis); NOREF(pRegFrame); NOREF(pvFault); NOREF(pcbSize); 2432 2468 return VINF_EM_HALT; 2433 2469 } … … 2456 2492 pRegFrame->rdx = (uTicks >> 32ULL); 2457 2493 2494 NOREF(pVM); 2458 2495 return VINF_SUCCESS; 2459 2496 } … … 2498 2535 static int emInterpretRdtsc(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2499 2536 { 2537 NOREF(pDis); NOREF(pvFault); NOREF(pcbSize); 2500 2538 return EMInterpretRdtsc(pVM, pVCpu, pRegFrame); 2501 2539 } … … 2526 2564 pRegFrame->rdx = 0; 2527 2565 /** @todo We should trigger a #GP here if the cpu doesn't support the index in ecx. */ 2566 2567 NOREF(pVM); 2528 2568 return VINF_SUCCESS; 2529 2569 } … … 2534 2574 static int emInterpretRdpmc(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2535 2575 { 2576 NOREF(pDis); NOREF(pvFault); NOREF(pcbSize); 2536 2577 return EMInterpretRdpmc(pVM, pVCpu, pRegFrame); 2537 2578 } … … 2543 2584 { 2544 2585 uint32_t u32Dummy, u32ExtFeatures, cpl; 2586 NOREF(pVM); 2545 2587 2546 2588 if (pRegFrame->ecx != 0) … … 2568 2610 static int emInterpretMonitor(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2569 2611 { 2612 NOREF(pDis); NOREF(pvFault); NOREF(pcbSize); 2570 2613 return EMInterpretMonitor(pVM, pVCpu, pRegFrame); 2571 2614 } … … 2578 2621 { 2579 2622 uint32_t u32Dummy, u32ExtFeatures, cpl, u32MWaitFeatures; 2623 NOREF(pVM); 2580 2624 2581 2625 /* Get the current privilege level. */ … … 2621 2665 static VBOXSTRICTRC emInterpretMWait(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2622 2666 { 2667 NOREF(pDis); NOREF(pvFault); NOREF(pcbSize); 2623 2668 return EMInterpretMWait(pVM, pVCpu, pRegFrame); 2624 2669 } … … 2734 2779 /** @todo According to the Intel manuals, there's a REX version of RDMSR that is slightly different. 2735 2780 * That version clears the high dwords of both RDX & RAX */ 2781 NOREF(pVM); 2736 2782 2737 2783 /* Get the current privilege level. */ … … 2761 2807 different, so we play safe by completely disassembling the instruction. */ 2762 2808 Assert(!(pDis->prefix & PREFIX_REX)); 2809 NOREF(pDis); NOREF(pvFault); NOREF(pcbSize); 2763 2810 return EMInterpretRdmsr(pVM, pVCpu, pRegFrame); 2764 2811 } … … 2787 2834 LogFlow(("EMInterpretWrmsr %s (%x) val=%RX64\n", emMSRtoString(pRegFrame->ecx), pRegFrame->ecx, 2788 2835 RT_MAKE_U64(pRegFrame->eax, pRegFrame->edx))); 2836 NOREF(pVM); 2789 2837 return rc; 2790 2838 } … … 2796 2844 static int emInterpretWrmsr(PVM pVM, PVMCPU pVCpu, PDISCPUSTATE pDis, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 2797 2845 { 2846 NOREF(pDis); NOREF(pvFault); NOREF(pcbSize); 2798 2847 return EMInterpretWrmsr(pVM, pVCpu, pRegFrame); 2799 2848 }
Note:
See TracChangeset
for help on using the changeset viewer.