VirtualBox

Changeset 63429 in vbox for trunk


Ignore:
Timestamp:
Aug 13, 2016 11:39:36 PM (8 years ago)
Author:
vboxsync
Message:

VMM: warnings

Location:
trunk/src/VBox/VMM/VMMR3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMLdr.cpp

    r62643 r63429  
    6565*   Internal Functions                                                                                                           *
    6666*********************************************************************************************************************************/
     67#ifdef VBOX_WITH_RAW_MODE
    6768static DECLCALLBACK(int) pdmR3GetImportRC(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser);
     69static char    *pdmR3FileRC(const char *pszFile, const char *pszSearchPath);
     70#endif
    6871static int      pdmR3LoadR0U(PUVM pUVM, const char *pszFilename, const char *pszName, const char *pszSearchPath);
    69 static char    *pdmR3FileRC(const char *pszFile, const char *pszSearchPath);
    7072static char    *pdmR3FileR0(const char *pszFile, const char *pszSearchPath);
    7173static char    *pdmR3File(const char *pszFile, const char *pszDefaultExt, const char *pszSearchPath, bool fShared);
     
    107109            return rc;
    108110    }
     111#else
     112    RT_NOREF(pUVM);
    109113#endif
    110114    return VINF_SUCCESS;
     
    910914{
    911915#if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE)
     916    RT_NOREF(pVM, pszModule, pszSymbol);
    912917    Assert(!HMIsEnabled(pVM));
    913918    *pRCPtrValue = NIL_RTRCPTR;
     
    979984{
    980985#if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE)
     986    RT_NOREF(pVM, pszModule, pszSearchPath, pszSymbol);
    981987    Assert(!HMIsEnabled(pVM));
    982988    *pRCPtrValue = NIL_RTRCPTR;
  • trunk/src/VBox/VMM/VMMR3/PGMMap.cpp

    r62478 r63429  
    495495    for (PPGMMAPPING pCur = pVM->pgm.s.pMappingsR3; pCur; pCur = pCur->pNextR3)
    496496        cb += pCur->cb;
     497#else
     498    RT_NOREF(pVM);
    497499#endif
    498500
     
    534536        return pgmR3MappingsFixInternal(pVM, GCPtrBase, cb);
    535537    }
    536 #endif /* !PGM_WITHOUT_MAPPINGS */
     538
     539#else  /* PGM_WITHOUT_MAPPINGS */
     540    RT_NOREF(pVM, GCPtrBase, cb);
     541#endif /* PGM_WITHOUT_MAPPINGS */
    537542
    538543    Assert(HMIsEnabled(pVM));
  • trunk/src/VBox/VMM/VMMR3/SELM.cpp

    r62644 r63429  
    365365        AssertRC(rc);
    366366    }
    367 #endif /* VBOX_WITH_RAW_MODE */
     367#else  /* !VBOX_WITH_RAW_MODE */
     368    RT_NOREF(pVM);
     369#endif /* !VBOX_WITH_RAW_MODE */
    368370    return VINF_SUCCESS;
    369371}
     
    632634     */
    633635    PVMCPU pVCpu = VMMGetCpu(pVM); NOREF(pVCpu);
    634     int rc = VINF_SUCCESS;
    635636    if (pVM->selm.s.GuestGdtr.pGdt != RTRCPTR_MAX && pVM->selm.s.fGDTRangeRegistered)
    636637    {
    637638#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*/);
    639640        AssertRC(rc);
    640641#endif
     
    646647    {
    647648#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*/);
    649650        AssertRC(rc);
    650651#endif
     
    654655    {
    655656#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*/);
    657658        AssertRC(rc);
    658659#endif
     
    818819        VMCPU_FF_SET(pVCpu, VMCPU_FF_SELM_SYNC_TSS);
    819820    }
    820 #endif /*VBOX_WITH_RAW_MODE*/
     821
     822#else  /* !VBOX_WITH_RAW_MODE */
     823    RT_NOREF(pVM, pSSM);
     824#endif /* !VBOX_WITH_RAW_MODE */
    821825    return VINF_SUCCESS;
    822826}
  • trunk/src/VBox/VMM/VMMR3/TRPM.cpp

    r62645 r63429  
    742742    pVM->trpm.s.paStatHostIrqRC += offDelta;
    743743# 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 */
    745748}
    746749
     
    895898    }
    896899    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));
    899902    SSMR3PutMem(pSSM,       &pTrpm->au32IdtPatched[0], sizeof(pTrpm->au32IdtPatched));
    900903    SSMR3PutU32(pSSM, UINT32_MAX);          /* separator. */
     
    14861489VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent)
    14871490{
     1491#ifdef VBOX_WITH_RAW_MODE
    14881492    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu);
    1489 #ifdef VBOX_WITH_RAW_MODE
    14901493    Assert(!PATMIsPatchGCAddr(pVM, pCtx->eip));
    14911494#endif
     
    15601563
    15611564#else  /* !TRPM_FORWARD_TRAPS_IN_GC || IEM_VERIFICATION_MODE */
     1565    RT_NOREF(pVM, enmEvent);
    15621566    uint8_t u8Interrupt = 0;
    15631567    int rc = PDMGetInterrupt(pVCpu, &u8Interrupt);
  • trunk/src/VBox/VMM/VMMR3/VMMSwitcher.cpp

    r62478 r63429  
    4545*   Global Variables                                                                                                             *
    4646*********************************************************************************************************************************/
     47#if defined(VBOX_WITH_RAW_MODE) || (HC_ARCH_BITS != 64)
    4748/** Array of switcher definitions.
    4849 * The type and index shall match!
     
    5152{
    5253    NULL, /* invalid entry */
    53 #ifdef VBOX_WITH_RAW_MODE
    54 # ifndef RT_ARCH_AMD64
     54# ifdef VBOX_WITH_RAW_MODE
     55#  ifndef RT_ARCH_AMD64
    5556    &vmmR3Switcher32BitTo32Bit_Def,
    5657    &vmmR3Switcher32BitToPAE_Def,
     
    6263    NULL,   //&vmmR3SwitcherAMD64ToPAE_Def,
    6364    NULL,   //&vmmR3SwitcherAMD64ToAMD64_Def,
    64 # else  /* RT_ARCH_AMD64 */
     65#  else  /* RT_ARCH_AMD64 */
    6566    NULL,   //&vmmR3Switcher32BitTo32Bit_Def,
    6667    NULL,   //&vmmR3Switcher32BitToPAE_Def,
     
    7273    &vmmR3SwitcherAMD64ToPAE_Def,
    7374    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_AMD64
     75#  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
    8788    &vmmR3SwitcherX86Stub_Def,
    8889    NULL,
    89 #else
     90# else
    9091    NULL,
    9192    &vmmR3SwitcherAMD64Stub_Def,
    92 #endif
     93# endif
    9394};
     95#endif /* VBOX_WITH_RAW_MODE || (HC_ARCH_BITS != 64) */
     96
    9497
    9598/** Array of switcher definitions.
     
    214217{
    215218#if !defined(VBOX_WITH_RAW_MODE) && (HC_ARCH_BITS == 64)
     219    RT_NOREF(pVM);
    216220    return VINF_SUCCESS;
    217221#else
  • trunk/src/VBox/VMM/VMMR3/VMMTests.cpp

    r62647 r63429  
    4444#include <iprt/x86.h>
    4545
     46
     47#ifdef VBOX_WITH_RAW_MODE
     48
    4649static void vmmR3TestClearStack(PVMCPU pVCpu)
    4750{
     
    5154}
    5255
    53 
    54 #ifdef VBOX_WITH_RAW_MODE
    5556
    5657static int vmmR3ReportMsrRange(PVM pVM, uint32_t uMsr, uint64_t cMsrs, PRTSTREAM pReportStrm, uint32_t *pcMsrsFound)
     
    213214    rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    214215
    215 #if 1
     216# if 1
    216217    /* flush the raw-mode logs. */
    217 # ifdef LOG_ENABLED
     218#  ifdef LOG_ENABLED
    218219    PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
    219220    if (   pLogger
    220221        && pLogger->offScratch > 0)
    221222        RTLogFlushRC(NULL, pLogger);
    222 # endif
    223 # ifdef VBOX_WITH_RC_RELEASE_LOGGING
     223#  endif
     224#  ifdef VBOX_WITH_RC_RELEASE_LOGGING
    224225    PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    225226    if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    226227        RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
     228#  endif
    227229# endif
    228 #endif
    229230
    230231    Log(("vmmR3DoGCTest: rc=%Rrc iLastGZRc=%Rrc\n", rc, pVCpu->vmm.s.iLastGZRc));
     
    601602        rc = VINF_SUCCESS;
    602603
    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). */
    604605        /*
    605606         * A quick MSR report.
    606607         */
    607608        vmmR3DoMsrQuickReport(pVM, NULL, true);
    608 #endif
     609# endif
    609610    }
    610611    else
    611612        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 */
    613616    return rc;
    614617}
     
    820823    return rc;
    821824#else
     825    RT_NOREF(pVM);
    822826    return VERR_NOT_SUPPORTED;
    823827#endif
     
    846850    return rc;
    847851#else
     852    RT_NOREF(pVM);
    848853    return VERR_NOT_SUPPORTED;
    849854#endif
     
    877882    uint32_t uMsr   = 0x00000277;
    878883    uint64_t uValue = UINT64_C(0x0007010600070106);
    879 #if 0
     884# if 0
    880885    uValue &= ~(RT_BIT_64(17) | RT_BIT_64(16) | RT_BIT_64(15) | RT_BIT_64(14) | RT_BIT_64(13));
    881886    uValue |= RT_BIT_64(13);
     
    884889    RTPrintf("uMsr=%#010x before=%#018llx written=%#018llx after=%#018llx rc=%Rrc\n",
    885890             uMsr, pauValues[0], uValue, pauValues[1], rc);
    886 #elif 1
     891# elif 1
    887892    const uint64_t uOrgValue = uValue;
    888893    uint32_t       cChanges = 0;
     
    906911    }
    907912    RTPrintf("%u change(s)\n", cChanges);
    908 #else
     913# else
    909914    uint64_t fWriteable = 0;
    910915    for (uint32_t i = 0; i <= 63; i++)
     
    941946             uMsr, pauValues[0], uValue, pauValues[1], rc);
    942947
    943 #endif
     948# endif
    944949
    945950    /*
     
    949954    return rc;
    950955#else
     956    RT_NOREF(pVM);
    951957    return VERR_NOT_SUPPORTED;
    952958#endif
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