- Timestamp:
- Aug 13, 2016 11:39:36 PM (8 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 6 edited
-
PDMLdr.cpp (modified) (4 diffs)
-
PGMMap.cpp (modified) (2 diffs)
-
SELM.cpp (modified) (5 diffs)
-
TRPM.cpp (modified) (4 diffs)
-
VMMSwitcher.cpp (modified) (5 diffs)
-
VMMTests.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDMLdr.cpp
r62643 r63429 65 65 * Internal Functions * 66 66 *********************************************************************************************************************************/ 67 #ifdef VBOX_WITH_RAW_MODE 67 68 static DECLCALLBACK(int) pdmR3GetImportRC(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser); 69 static char *pdmR3FileRC(const char *pszFile, const char *pszSearchPath); 70 #endif 68 71 static int pdmR3LoadR0U(PUVM pUVM, const char *pszFilename, const char *pszName, const char *pszSearchPath); 69 static char *pdmR3FileRC(const char *pszFile, const char *pszSearchPath);70 72 static char *pdmR3FileR0(const char *pszFile, const char *pszSearchPath); 71 73 static char *pdmR3File(const char *pszFile, const char *pszDefaultExt, const char *pszSearchPath, bool fShared); … … 107 109 return rc; 108 110 } 111 #else 112 RT_NOREF(pUVM); 109 113 #endif 110 114 return VINF_SUCCESS; … … 910 914 { 911 915 #if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE) 916 RT_NOREF(pVM, pszModule, pszSymbol); 912 917 Assert(!HMIsEnabled(pVM)); 913 918 *pRCPtrValue = NIL_RTRCPTR; … … 979 984 { 980 985 #if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE) 986 RT_NOREF(pVM, pszModule, pszSearchPath, pszSymbol); 981 987 Assert(!HMIsEnabled(pVM)); 982 988 *pRCPtrValue = NIL_RTRCPTR; -
trunk/src/VBox/VMM/VMMR3/PGMMap.cpp
r62478 r63429 495 495 for (PPGMMAPPING pCur = pVM->pgm.s.pMappingsR3; pCur; pCur = pCur->pNextR3) 496 496 cb += pCur->cb; 497 #else 498 RT_NOREF(pVM); 497 499 #endif 498 500 … … 534 536 return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb); 535 537 } 536 #endif /* !PGM_WITHOUT_MAPPINGS */ 538 539 #else /* PGM_WITHOUT_MAPPINGS */ 540 RT_NOREF(pVM, GCPtrBase, cb); 541 #endif /* PGM_WITHOUT_MAPPINGS */ 537 542 538 543 Assert(HMIsEnabled(pVM)); -
trunk/src/VBox/VMM/VMMR3/SELM.cpp
r62644 r63429 365 365 AssertRC(rc); 366 366 } 367 #endif /* VBOX_WITH_RAW_MODE */ 367 #else /* !VBOX_WITH_RAW_MODE */ 368 RT_NOREF(pVM); 369 #endif /* !VBOX_WITH_RAW_MODE */ 368 370 return VINF_SUCCESS; 369 371 } … … 632 634 */ 633 635 PVMCPU pVCpu = VMMGetCpu(pVM); NOREF(pVCpu); 634 int rc = VINF_SUCCESS;635 636 if (pVM->selm.s.GuestGdtr.pGdt != RTRCPTR_MAX && pVM->selm.s.fGDTRangeRegistered) 636 637 { 637 638 #ifdef SELM_TRACK_GUEST_GDT_CHANGES 638 rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GuestGdtr.pGdt, false /*fHypervisor*/);639 int rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GuestGdtr.pGdt, false /*fHypervisor*/); 639 640 AssertRC(rc); 640 641 #endif … … 646 647 { 647 648 #ifdef SELM_TRACK_GUEST_LDT_CHANGES 648 rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestLdt, false /*fHypervisor*/);649 int rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestLdt, false /*fHypervisor*/); 649 650 AssertRC(rc); 650 651 #endif … … 654 655 { 655 656 #ifdef SELM_TRACK_GUEST_TSS_CHANGES 656 rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestTss, false /*fHypervisor*/);657 int rc = PGMHandlerVirtualDeregister(pVM, pVCpu, pVM->selm.s.GCPtrGuestTss, false /*fHypervisor*/); 657 658 AssertRC(rc); 658 659 #endif … … 818 819 VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS); 819 820 } 820 #endif /*VBOX_WITH_RAW_MODE*/ 821 822 #else /* !VBOX_WITH_RAW_MODE */ 823 RT_NOREF(pVM, pSSM); 824 #endif /* !VBOX_WITH_RAW_MODE */ 821 825 return VINF_SUCCESS; 822 826 } -
trunk/src/VBox/VMM/VMMR3/TRPM.cpp
r62645 r63429 742 742 pVM->trpm.s.paStatHostIrqRC += offDelta; 743 743 # endif 744 #endif /* VBOX_WITH_RAW_MODE */ 744 745 #else /* !VBOX_WITH_RAW_MODE */ 746 RT_NOREF(pVM, offDelta); 747 #endif /* !VBOX_WITH_RAW_MODE */ 745 748 } 746 749 … … 895 898 } 896 899 SSMR3PutBool(pSSM, HMIsEnabled(pVM)); 897 PVMCPU pVCpu = &pVM->aCpus[0];/* raw mode implies 1 VCPU */898 SSMR3PutUInt(pSSM, VM_WHEN_RAW_MODE(VMCPU_FF_IS_SET(pVCpu , VMCPU_FF_TRPM_SYNC_IDT), 0));900 PVMCPU pVCpu0 = &pVM->aCpus[0]; NOREF(pVCpu0); /* raw mode implies 1 VCPU */ 901 SSMR3PutUInt(pSSM, VM_WHEN_RAW_MODE(VMCPU_FF_IS_SET(pVCpu0, VMCPU_FF_TRPM_SYNC_IDT), 0)); 899 902 SSMR3PutMem(pSSM, &pTrpm->au32IdtPatched[0], sizeof(pTrpm->au32IdtPatched)); 900 903 SSMR3PutU32(pSSM, UINT32_MAX); /* separator. */ … … 1486 1489 VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent) 1487 1490 { 1491 #ifdef VBOX_WITH_RAW_MODE 1488 1492 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1489 #ifdef VBOX_WITH_RAW_MODE1490 1493 Assert(!PATMIsPatchGCAddr(pVM, pCtx->eip)); 1491 1494 #endif … … 1560 1563 1561 1564 #else /* !TRPM_FORWARD_TRAPS_IN_GC || IEM_VERIFICATION_MODE */ 1565 RT_NOREF(pVM, enmEvent); 1562 1566 uint8_t u8Interrupt = 0; 1563 1567 int rc = PDMGetInterrupt(pVCpu, &u8Interrupt); -
trunk/src/VBox/VMM/VMMR3/VMMSwitcher.cpp
r62478 r63429 45 45 * Global Variables * 46 46 *********************************************************************************************************************************/ 47 #if defined(VBOX_WITH_RAW_MODE) || (HC_ARCH_BITS != 64) 47 48 /** Array of switcher definitions. 48 49 * The type and index shall match! … … 51 52 { 52 53 NULL, /* invalid entry */ 53 # ifdef VBOX_WITH_RAW_MODE54 # ifndef RT_ARCH_AMD6454 # ifdef VBOX_WITH_RAW_MODE 55 # ifndef RT_ARCH_AMD64 55 56 &vmmR3Switcher32BitTo32Bit_Def, 56 57 &vmmR3Switcher32BitToPAE_Def, … … 62 63 NULL, //&vmmR3SwitcherAMD64ToPAE_Def, 63 64 NULL, //&vmmR3SwitcherAMD64ToAMD64_Def, 64 # else /* RT_ARCH_AMD64 */65 # else /* RT_ARCH_AMD64 */ 65 66 NULL, //&vmmR3Switcher32BitTo32Bit_Def, 66 67 NULL, //&vmmR3Switcher32BitToPAE_Def, … … 72 73 &vmmR3SwitcherAMD64ToPAE_Def, 73 74 NULL, //&vmmR3SwitcherAMD64ToAMD64_Def, 74 # endif /* RT_ARCH_AMD64 */75 # else /* !VBOX_WITH_RAW_MODE */76 NULL, 77 NULL, 78 NULL, 79 NULL, 80 NULL, 81 NULL, 82 NULL, 83 NULL, 84 NULL, 85 # endif /* !VBOX_WITH_RAW_MODE */86 # ifndef RT_ARCH_AMD6475 # endif /* RT_ARCH_AMD64 */ 76 # else /* !VBOX_WITH_RAW_MODE */ 77 NULL, 78 NULL, 79 NULL, 80 NULL, 81 NULL, 82 NULL, 83 NULL, 84 NULL, 85 NULL, 86 # endif /* !VBOX_WITH_RAW_MODE */ 87 # ifndef RT_ARCH_AMD64 87 88 &vmmR3SwitcherX86Stub_Def, 88 89 NULL, 89 # else90 # else 90 91 NULL, 91 92 &vmmR3SwitcherAMD64Stub_Def, 92 # endif93 # endif 93 94 }; 95 #endif /* VBOX_WITH_RAW_MODE || (HC_ARCH_BITS != 64) */ 96 94 97 95 98 /** Array of switcher definitions. … … 214 217 { 215 218 #if !defined(VBOX_WITH_RAW_MODE) && (HC_ARCH_BITS == 64) 219 RT_NOREF(pVM); 216 220 return VINF_SUCCESS; 217 221 #else -
trunk/src/VBox/VMM/VMMR3/VMMTests.cpp
r62647 r63429 44 44 #include <iprt/x86.h> 45 45 46 47 #ifdef VBOX_WITH_RAW_MODE 48 46 49 static void vmmR3TestClearStack(PVMCPU pVCpu) 47 50 { … … 51 54 } 52 55 53 54 #ifdef VBOX_WITH_RAW_MODE55 56 56 57 static int vmmR3ReportMsrRange(PVM pVM, uint32_t uMsr, uint64_t cMsrs, PRTSTREAM pReportStrm, uint32_t *pcMsrsFound) … … 213 214 rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0); 214 215 215 # if 1216 # if 1 216 217 /* flush the raw-mode logs. */ 217 # ifdef LOG_ENABLED218 # ifdef LOG_ENABLED 218 219 PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3; 219 220 if ( pLogger 220 221 && pLogger->offScratch > 0) 221 222 RTLogFlushRC(NULL, pLogger); 222 # endif223 # ifdef VBOX_WITH_RC_RELEASE_LOGGING223 # endif 224 # ifdef VBOX_WITH_RC_RELEASE_LOGGING 224 225 PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3; 225 226 if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0)) 226 227 RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger); 228 # endif 227 229 # endif 228 #endif229 230 230 231 Log(("vmmR3DoGCTest: rc=%Rrc iLastGZRc=%Rrc\n", rc, pVCpu->vmm.s.iLastGZRc)); … … 601 602 rc = VINF_SUCCESS; 602 603 603 # if 0 /* drop this for now as it causes trouble on AMDs (Opteron 2384 and possibly others). */604 # if 0 /* drop this for now as it causes trouble on AMDs (Opteron 2384 and possibly others). */ 604 605 /* 605 606 * A quick MSR report. 606 607 */ 607 608 vmmR3DoMsrQuickReport(pVM, NULL, true); 608 # endif609 # endif 609 610 } 610 611 else 611 612 AssertMsgFailed(("Failed to resolved VMMRC.rc::VMMRCEntry(), rc=%Rrc\n", rc)); 612 #endif 613 #else /* !VBOX_WITH_RAW_MODE */ 614 RT_NOREF(pVM); 615 #endif /* !VBOX_WITH_RAW_MODE */ 613 616 return rc; 614 617 } … … 820 823 return rc; 821 824 #else 825 RT_NOREF(pVM); 822 826 return VERR_NOT_SUPPORTED; 823 827 #endif … … 846 850 return rc; 847 851 #else 852 RT_NOREF(pVM); 848 853 return VERR_NOT_SUPPORTED; 849 854 #endif … … 877 882 uint32_t uMsr = 0x00000277; 878 883 uint64_t uValue = UINT64_C(0x0007010600070106); 879 # if 0884 # if 0 880 885 uValue &= ~(RT_BIT_64(17) | RT_BIT_64(16) | RT_BIT_64(15) | RT_BIT_64(14) | RT_BIT_64(13)); 881 886 uValue |= RT_BIT_64(13); … … 884 889 RTPrintf("uMsr=%#010x before=%#018llx written=%#018llx after=%#018llx rc=%Rrc\n", 885 890 uMsr, pauValues[0], uValue, pauValues[1], rc); 886 # elif 1891 # elif 1 887 892 const uint64_t uOrgValue = uValue; 888 893 uint32_t cChanges = 0; … … 906 911 } 907 912 RTPrintf("%u change(s)\n", cChanges); 908 # else913 # else 909 914 uint64_t fWriteable = 0; 910 915 for (uint32_t i = 0; i <= 63; i++) … … 941 946 uMsr, pauValues[0], uValue, pauValues[1], rc); 942 947 943 # endif948 # endif 944 949 945 950 /* … … 949 954 return rc; 950 955 #else 956 RT_NOREF(pVM); 951 957 return VERR_NOT_SUPPORTED; 952 958 #endif
Note:
See TracChangeset
for help on using the changeset viewer.

