VirtualBox

Changeset 80019 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 26, 2019 6:34:14 PM (5 years ago)
Author:
vboxsync
Message:

VMM: Kicking out raw-mode (work in progress) - more VMM. bugref:9517

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r80003 r80019  
    14391439                            VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED);
    14401440                        }
    1441                         STAM_COUNTER_INC(&pVM->vmm.s.StatRunRC);
     1441                        STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC);
    14421442
    14431443                        /*
     
    15381538            int rc = vmmR0CallRing3SetJmp2(&pVCpu->vmm.s.CallRing3JmpBufR0, NEMR0RunGuestCode, pGVM, idCpu);
    15391539            VMM_CHECK_SMAP_CHECK2(pVM, RT_NOTHING);
    1540             STAM_COUNTER_INC(&pVM->vmm.s.StatRunRC);
     1540            STAM_COUNTER_INC(&pVM->vmm.s.StatRunGC);
    15411541
    15421542            pVCpu->vmm.s.iLastGZRc = rc;
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r80010 r80019  
    465465     * Statistics.
    466466     */
    467     STAM_REG(pVM, &pVM->vmm.s.StatRunRC,                    STAMTYPE_COUNTER, "/VMM/RunRC",                     STAMUNIT_OCCURENCES, "Number of context switches.");
     467    STAM_REG(pVM, &pVM->vmm.s.StatRunGC,                    STAMTYPE_COUNTER, "/VMM/RunGC",                     STAMUNIT_OCCURENCES, "Number of context switches.");
    468468    STAM_REG(pVM, &pVM->vmm.s.StatRZRetNormal,              STAMTYPE_COUNTER, "/VMM/RZRet/Normal",              STAMUNIT_OCCURENCES, "Number of VINF_SUCCESS returns.");
    469469    STAM_REG(pVM, &pVM->vmm.s.StatRZRetInterrupt,           STAMTYPE_COUNTER, "/VMM/RZRet/Interrupt",           STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT returns.");
     
    652652
    653653
    654 #ifdef VBOX_WITH_RAW_MODE
    655 /**
    656  * Initializes the RC VMM.
    657  *
    658  * @returns VBox status code.
    659  * @param   pVM         The cross context VM structure.
    660  */
    661 VMMR3_INT_DECL(int) VMMR3InitRC(PVM pVM)
    662 {
    663     PVMCPU pVCpu = VMMGetCpu(pVM);
    664     Assert(pVCpu && pVCpu->idCpu == 0);
    665 
    666     /* In VMX mode, there's no need to init RC. */
    667     if (!VM_IS_RAW_MODE_ENABLED(pVM))
    668         return VINF_SUCCESS;
    669 
    670     AssertReturn(pVM->cCpus == 1, VERR_RAW_MODE_INVALID_SMP);
    671 
    672     /*
    673      * Call VMMRCInit():
    674      *      -# resolve the address.
    675      *      -# setup stackframe and EIP to use the trampoline.
    676      *      -# do a generic hypervisor call.
    677      */
    678     RTRCPTR RCPtrEP;
    679     int rc = PDMR3LdrGetSymbolRC(pVM, VMMRC_MAIN_MODULE_NAME, "VMMRCEntry", &RCPtrEP);
    680     if (RT_SUCCESS(rc))
    681     {
    682         CPUMSetHyperESP(pVCpu, pVCpu->vmm.s.pbEMTStackBottomRC); /* Clear the stack. */
    683         uint64_t u64TS = RTTimeProgramStartNanoTS();
    684         CPUMPushHyper(pVCpu, RT_HI_U32(u64TS));           /* Param 4: The program startup TS - Hi. */
    685         CPUMPushHyper(pVCpu, RT_LO_U32(u64TS));           /* Param 4: The program startup TS - Lo. */
    686         CPUMPushHyper(pVCpu, vmmGetBuildType());          /* Param 3: Version argument. */
    687         CPUMPushHyper(pVCpu, VMMGetSvnRev());             /* Param 2: Version argument. */
    688         CPUMPushHyper(pVCpu, VMMRC_DO_VMMRC_INIT);        /* Param 1: Operation. */
    689         CPUMPushHyper(pVCpu, pVM->pVMRC);                 /* Param 0: pVM */
    690         CPUMPushHyper(pVCpu, 6 * sizeof(RTRCPTR));        /* trampoline param: stacksize.  */
    691         CPUMPushHyper(pVCpu, RCPtrEP);                    /* Call EIP. */
    692         CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC);
    693         Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
    694 
    695         for (;;)
    696         {
    697 #ifdef NO_SUPCALLR0VMM
    698             //rc = VERR_GENERAL_FAILURE;
    699             rc = VINF_SUCCESS;
    700 #else
    701             rc = SUPR3CallVMMR0(pVM->pVMR0, 0 /* VCPU 0 */, VMMR0_DO_CALL_HYPERVISOR, NULL);
    702 #endif
    703 #ifdef LOG_ENABLED
    704             PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
    705             if (    pLogger
    706                 &&  pLogger->offScratch > 0)
    707                 RTLogFlushRC(NULL, pLogger);
    708 #endif
    709 #ifdef VBOX_WITH_RC_RELEASE_LOGGING
    710             PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    711             if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    712                 RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    713 #endif
    714             if (rc != VINF_VMM_CALL_HOST)
    715                 break;
    716             rc = vmmR3ServiceCallRing3Request(pVM, pVCpu);
    717             if (RT_FAILURE(rc) || (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST))
    718                 break;
    719         }
    720 
    721         /* Don't trigger assertions or guru if raw-mode is unavailable. */
    722         if (rc != VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT)
    723         {
    724             if (RT_FAILURE(rc) || (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST))
    725             {
    726                 VMMR3FatalDump(pVM, pVCpu, rc);
    727                 if (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST)
    728                     rc = VERR_IPE_UNEXPECTED_INFO_STATUS;
    729             }
    730             AssertRC(rc);
    731         }
    732     }
    733     return rc;
    734 }
    735 #endif /* VBOX_WITH_RAW_MODE */
    736 
    737 
    738654/**
    739655 * Called when an init phase completes.
     
    10971013
    10981014
    1099 #ifdef VBOX_WITH_RAW_MODE
    1100 /**
    1101  * Resolve a builtin RC symbol.
    1102  *
    1103  * Called by PDM when loading or relocating RC modules.
    1104  *
    1105  * @returns VBox status
    1106  * @param   pVM             The cross context VM structure.
    1107  * @param   pszSymbol       Symbol to resolve.
    1108  * @param   pRCPtrValue     Where to store the symbol value.
    1109  *
    1110  * @remark  This has to work before VMMR3Relocate() is called.
    1111  */
    1112 VMMR3_INT_DECL(int) VMMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue)
    1113 {
    1114     if (!strcmp(pszSymbol, "g_Logger"))
    1115     {
    1116         if (pVM->vmm.s.pRCLoggerR3)
    1117             pVM->vmm.s.pRCLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCLoggerR3);
    1118         *pRCPtrValue = pVM->vmm.s.pRCLoggerRC;
    1119     }
    1120     else if (!strcmp(pszSymbol, "g_RelLogger"))
    1121     {
    1122 # ifdef VBOX_WITH_RC_RELEASE_LOGGING
    1123         if (pVM->vmm.s.pRCRelLoggerR3)
    1124             pVM->vmm.s.pRCRelLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCRelLoggerR3);
    1125         *pRCPtrValue = pVM->vmm.s.pRCRelLoggerRC;
    1126 # else
    1127         *pRCPtrValue = NIL_RTRCPTR;
    1128 # endif
    1129     }
    1130     else
    1131         return VERR_SYMBOL_NOT_FOUND;
    1132     return VINF_SUCCESS;
    1133 }
    1134 #endif /* VBOX_WITH_RAW_MODE */
    1135 
    1136 
    11371015/**
    11381016 * Suspends the CPU yielder.
     
    12261104    TMTimerSetMillies(pTimer, pVM->vmm.s.cYieldEveryMillies);
    12271105}
    1228 
    1229 
    1230 #ifdef VBOX_WITH_RAW_MODE
    1231 /**
    1232  * Executes guest code in the raw-mode context.
    1233  *
    1234  * @param   pVM         The cross context VM structure.
    1235  * @param   pVCpu       The cross context virtual CPU structure.
    1236  */
    1237 VMMR3_INT_DECL(int) VMMR3RawRunGC(PVM pVM, PVMCPU pVCpu)
    1238 {
    1239     Log2(("VMMR3RawRunGC: (cs:eip=%04x:%08x)\n", CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
    1240 
    1241     AssertReturn(pVM->cCpus == 1, VERR_RAW_MODE_INVALID_SMP);
    1242 
    1243     /*
    1244      * Set the hypervisor to resume executing a CPUM resume function
    1245      * in CPUMRCA.asm.
    1246      */
    1247     CPUMSetHyperState(pVCpu,
    1248                         CPUMGetGuestEFlags(pVCpu) & X86_EFL_VM
    1249                       ? pVM->vmm.s.pfnCPUMRCResumeGuestV86
    1250                       : pVM->vmm.s.pfnCPUMRCResumeGuest,  /* eip */
    1251                       pVCpu->vmm.s.pbEMTStackBottomRC,    /* esp */
    1252                       0,                                  /* eax */
    1253                       VM_RC_ADDR(pVM, &pVCpu->cpum)       /* edx */);
    1254 
    1255     /*
    1256      * We hide log flushes (outer) and hypervisor interrupts (inner).
    1257      */
    1258     for (;;)
    1259     {
    1260 #ifdef VBOX_STRICT
    1261         if (RT_UNLIKELY(!CPUMGetHyperCR3(pVCpu) || CPUMGetHyperCR3(pVCpu) != PGMGetHyperCR3(pVCpu)))
    1262             EMR3FatalError(pVCpu, VERR_VMM_HYPER_CR3_MISMATCH);
    1263         PGMMapCheck(pVM);
    1264 # ifdef VBOX_WITH_SAFE_STR
    1265         SELMR3CheckShadowTR(pVM);
    1266 # endif
    1267 #endif
    1268         int rc;
    1269         do
    1270         {
    1271 #ifdef NO_SUPCALLR0VMM
    1272             rc = VERR_GENERAL_FAILURE;
    1273 #else
    1274             rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    1275             if (RT_LIKELY(rc == VINF_SUCCESS))
    1276                 rc = pVCpu->vmm.s.iLastGZRc;
    1277 #endif
    1278         } while (rc == VINF_EM_RAW_INTERRUPT_HYPER);
    1279 
    1280         /*
    1281          * Flush the logs.
    1282          */
    1283 #ifdef LOG_ENABLED
    1284         PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
    1285         if (    pLogger
    1286             &&  pLogger->offScratch > 0)
    1287             RTLogFlushRC(NULL, pLogger);
    1288 #endif
    1289 #ifdef VBOX_WITH_RC_RELEASE_LOGGING
    1290         PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    1291         if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    1292             RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    1293 #endif
    1294         if (rc != VINF_VMM_CALL_HOST)
    1295         {
    1296             Log2(("VMMR3RawRunGC: returns %Rrc (cs:eip=%04x:%08x)\n", rc, CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
    1297             return rc;
    1298         }
    1299         rc = vmmR3ServiceCallRing3Request(pVM, pVCpu);
    1300         if (RT_FAILURE(rc))
    1301             return rc;
    1302         /* Resume GC */
    1303     }
    1304 }
    1305 #endif /* VBOX_WITH_RAW_MODE */
    13061106
    13071107
     
    24942294}
    24952295
    2496 #ifdef VBOX_WITH_RAW_MODE
    2497 
    2498 /**
    2499  * Calls a RC function.
    2500  *
    2501  * @param   pVM         The cross context VM structure.
    2502  * @param   RCPtrEntry  The address of the RC function.
    2503  * @param   cArgs       The number of arguments in the ....
    2504  * @param   ...         Arguments to the function.
    2505  */
    2506 VMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...)
    2507 {
    2508     va_list args;
    2509     va_start(args, cArgs);
    2510     int rc = VMMR3CallRCV(pVM, RCPtrEntry, cArgs, args);
    2511     va_end(args);
    2512     return rc;
    2513 }
    2514 
    2515 
    2516 /**
    2517  * Calls a RC function.
    2518  *
    2519  * @param   pVM         The cross context VM structure.
    2520  * @param   RCPtrEntry  The address of the RC function.
    2521  * @param   cArgs       The number of arguments in the ....
    2522  * @param   args        Arguments to the function.
    2523  */
    2524 VMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args)
    2525 {
    2526     /* Raw mode implies 1 VCPU. */
    2527     AssertReturn(pVM->cCpus == 1, VERR_RAW_MODE_INVALID_SMP);
    2528     PVMCPU pVCpu = &pVM->aCpus[0];
    2529 
    2530     Log2(("VMMR3CallGCV: RCPtrEntry=%RRv cArgs=%d\n", RCPtrEntry, cArgs));
    2531 
    2532     /*
    2533      * Setup the call frame using the trampoline.
    2534      */
    2535     CPUMSetHyperState(pVCpu,
    2536                       pVM->vmm.s.pfnCallTrampolineRC, /* eip */
    2537                       pVCpu->vmm.s.pbEMTStackBottomRC - cArgs * sizeof(RTGCUINTPTR32),  /* esp */
    2538                       RCPtrEntry,  /* eax */
    2539                       cArgs        /* edx */
    2540                       );
    2541 
    2542 #if 0
    2543     memset(pVCpu->vmm.s.pbEMTStackR3, 0xaa, VMM_STACK_SIZE); /* Clear the stack. */
    2544 #endif
    2545     PRTGCUINTPTR32 pFrame = (PRTGCUINTPTR32)(pVCpu->vmm.s.pbEMTStackR3 + VMM_STACK_SIZE) - cArgs;
    2546     int i = cArgs;
    2547     while (i-- > 0)
    2548         *pFrame++ = va_arg(args, RTGCUINTPTR32);
    2549 
    2550     CPUMPushHyper(pVCpu, cArgs * sizeof(RTGCUINTPTR32));                          /* stack frame size */
    2551     CPUMPushHyper(pVCpu, RCPtrEntry);                                             /* what to call */
    2552 
    2553     /*
    2554      * We hide log flushes (outer) and hypervisor interrupts (inner).
    2555      */
    2556     for (;;)
    2557     {
    2558         int rc;
    2559         Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
    2560         do
    2561         {
    2562 #ifdef NO_SUPCALLR0VMM
    2563             rc = VERR_GENERAL_FAILURE;
    2564 #else
    2565             rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    2566             if (RT_LIKELY(rc == VINF_SUCCESS))
    2567                 rc = pVCpu->vmm.s.iLastGZRc;
    2568 #endif
    2569         } while (rc == VINF_EM_RAW_INTERRUPT_HYPER);
    2570 
    2571         /*
    2572          * Flush the loggers.
    2573          */
    2574 #ifdef LOG_ENABLED
    2575         PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
    2576         if (    pLogger
    2577             &&  pLogger->offScratch > 0)
    2578             RTLogFlushRC(NULL, pLogger);
    2579 #endif
    2580 #ifdef VBOX_WITH_RC_RELEASE_LOGGING
    2581         PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    2582         if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    2583             RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    2584 #endif
    2585         if (rc == VERR_TRPM_PANIC || rc == VERR_TRPM_DONT_PANIC)
    2586             VMMR3FatalDump(pVM, pVCpu, rc);
    2587         if (rc != VINF_VMM_CALL_HOST)
    2588         {
    2589             Log2(("VMMR3CallGCV: returns %Rrc (cs:eip=%04x:%08x)\n", rc, CPUMGetGuestCS(pVCpu), CPUMGetGuestEIP(pVCpu)));
    2590             return rc;
    2591         }
    2592         rc = vmmR3ServiceCallRing3Request(pVM, pVCpu);
    2593         if (RT_FAILURE(rc))
    2594             return rc;
    2595     }
    2596 }
    2597 
    2598 #endif /* VBOX_WITH_RAW_MODE */
    25992296
    26002297/**
     
    26572354    return rc;
    26582355}
    2659 
    2660 
    2661 #ifdef VBOX_WITH_RAW_MODE
    2662 /**
    2663  * Resumes executing hypervisor code when interrupted by a queue flush or a
    2664  * debug event.
    2665  *
    2666  * @returns VBox status code.
    2667  * @param   pVM         The cross context VM structure.
    2668  * @param   pVCpu       The cross context virtual CPU structure.
    2669  */
    2670 VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM, PVMCPU pVCpu)
    2671 {
    2672     Log(("VMMR3ResumeHyper: eip=%RRv esp=%RRv\n", CPUMGetHyperEIP(pVCpu), CPUMGetHyperESP(pVCpu)));
    2673     AssertReturn(pVM->cCpus == 1, VERR_RAW_MODE_INVALID_SMP);
    2674 
    2675     /*
    2676      * We hide log flushes (outer) and hypervisor interrupts (inner).
    2677      */
    2678     for (;;)
    2679     {
    2680         int rc;
    2681         Assert(CPUMGetHyperCR3(pVCpu) && CPUMGetHyperCR3(pVCpu) == PGMGetHyperCR3(pVCpu));
    2682         do
    2683         {
    2684 # ifdef NO_SUPCALLR0VMM
    2685             rc = VERR_GENERAL_FAILURE;
    2686 # else
    2687             rc = SUPR3CallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN, 0);
    2688             if (RT_LIKELY(rc == VINF_SUCCESS))
    2689                 rc = pVCpu->vmm.s.iLastGZRc;
    2690 # endif
    2691         } while (rc == VINF_EM_RAW_INTERRUPT_HYPER);
    2692 
    2693         /*
    2694          * Flush the loggers.
    2695          */
    2696 # ifdef LOG_ENABLED
    2697         PRTLOGGERRC pLogger = pVM->vmm.s.pRCLoggerR3;
    2698         if (    pLogger
    2699             &&  pLogger->offScratch > 0)
    2700             RTLogFlushRC(NULL, pLogger);
    2701 # endif
    2702 # ifdef VBOX_WITH_RC_RELEASE_LOGGING
    2703         PRTLOGGERRC pRelLogger = pVM->vmm.s.pRCRelLoggerR3;
    2704         if (RT_UNLIKELY(pRelLogger && pRelLogger->offScratch > 0))
    2705             RTLogFlushRC(RTLogRelGetDefaultInstance(), pRelLogger);
    2706 # endif
    2707         if (rc == VERR_TRPM_PANIC || rc == VERR_TRPM_DONT_PANIC)
    2708             VMMR3FatalDump(pVM, pVCpu, rc);
    2709         if (rc != VINF_VMM_CALL_HOST)
    2710         {
    2711             Log(("VMMR3ResumeHyper: returns %Rrc\n", rc));
    2712             return rc;
    2713         }
    2714         rc = vmmR3ServiceCallRing3Request(pVM, pVCpu);
    2715         if (RT_FAILURE(rc))
    2716             return rc;
    2717     }
    2718 }
    2719 #endif /* VBOX_WITH_RAW_MODE */
    27202356
    27212357
     
    30182654        PRINT_FLAG(VMCPU_FF_,TO_R3);
    30192655        PRINT_FLAG(VMCPU_FF_,IOM);
    3020 #ifdef VBOX_WITH_RAW_MODE
    3021         PRINT_FLAG(VMCPU_FF_,TRPM_SYNC_IDT);
    3022         PRINT_FLAG(VMCPU_FF_,SELM_SYNC_TSS);
    3023         PRINT_FLAG(VMCPU_FF_,SELM_SYNC_GDT);
    3024         PRINT_FLAG(VMCPU_FF_,SELM_SYNC_LDT);
    3025         PRINT_FLAG(VMCPU_FF_,CSAM_SCAN_PAGE);
    3026         PRINT_FLAG(VMCPU_FF_,CSAM_PENDING_ACTION);
    3027         PRINT_FLAG(VMCPU_FF_,CPUM);
    3028 #endif
    30292656        if (f)
    30302657            pHlp->pfnPrintf(pHlp, "%s\n    Unknown bits: %#RX64\n", c ? "," : "", f);
  • trunk/src/VBox/VMM/include/VMMInternal.h

    r80003 r80019  
    3232# error "Not in VMM! This is an internal header!"
    3333#endif
    34 #if defined(RT_OS_DARWIN) && HC_ARCH_BITS == 32
    35 # error "32-bit darwin is no longer supported. Go back to 4.3 or earlier!"
     34#if HC_ARCH_BITS == 32
     35# error "32-bit hosts are no longer supported. Go back to 6.0 or earlier!"
    3636#endif
    3737
     
    267267    char                        szRing0AssertMsg2[256];
    268268
    269     /** Number of VMMR0_DO_HM_RUN calls. */
    270     STAMCOUNTER                 StatRunRC;
     269    /** Number of VMMR0_DO_HM_RUN or VMMR0_DO_NEM_RUN calls. */
     270    STAMCOUNTER                 StatRunGC;
    271271
    272272    /** Statistics for each of the RC/R0 return codes.
     
    442442
    443443
    444 /**
    445  * The VMMRCEntry() codes.
    446  */
    447 typedef enum VMMRCOPERATION
    448 {
    449     /** Do GC module init. */
    450     VMMRC_DO_VMMRC_INIT = 1,
    451 
    452     /** The first Trap testcase. */
    453     VMMRC_DO_TESTCASE_TRAP_FIRST = 0x0dead000,
    454     /** Trap 0 testcases, uArg selects the variation. */
    455     VMMRC_DO_TESTCASE_TRAP_0 = VMMRC_DO_TESTCASE_TRAP_FIRST,
    456     /** Trap 1 testcases, uArg selects the variation. */
    457     VMMRC_DO_TESTCASE_TRAP_1,
    458     /** Trap 2 testcases, uArg selects the variation. */
    459     VMMRC_DO_TESTCASE_TRAP_2,
    460     /** Trap 3 testcases, uArg selects the variation. */
    461     VMMRC_DO_TESTCASE_TRAP_3,
    462     /** Trap 4 testcases, uArg selects the variation. */
    463     VMMRC_DO_TESTCASE_TRAP_4,
    464     /** Trap 5 testcases, uArg selects the variation. */
    465     VMMRC_DO_TESTCASE_TRAP_5,
    466     /** Trap 6 testcases, uArg selects the variation. */
    467     VMMRC_DO_TESTCASE_TRAP_6,
    468     /** Trap 7 testcases, uArg selects the variation. */
    469     VMMRC_DO_TESTCASE_TRAP_7,
    470     /** Trap 8 testcases, uArg selects the variation. */
    471     VMMRC_DO_TESTCASE_TRAP_8,
    472     /** Trap 9 testcases, uArg selects the variation. */
    473     VMMRC_DO_TESTCASE_TRAP_9,
    474     /** Trap 0a testcases, uArg selects the variation. */
    475     VMMRC_DO_TESTCASE_TRAP_0A,
    476     /** Trap 0b testcases, uArg selects the variation. */
    477     VMMRC_DO_TESTCASE_TRAP_0B,
    478     /** Trap 0c testcases, uArg selects the variation. */
    479     VMMRC_DO_TESTCASE_TRAP_0C,
    480     /** Trap 0d testcases, uArg selects the variation. */
    481     VMMRC_DO_TESTCASE_TRAP_0D,
    482     /** Trap 0e testcases, uArg selects the variation. */
    483     VMMRC_DO_TESTCASE_TRAP_0E,
    484     /** The last trap testcase (exclusive). */
    485     VMMRC_DO_TESTCASE_TRAP_LAST,
    486     /** Testcase for checking interrupt forwarding. */
    487     VMMRC_DO_TESTCASE_HYPER_INTERRUPT,
    488     /** Switching testing and profiling stub. */
    489     VMMRC_DO_TESTCASE_NOP,
    490     /** Testcase for checking interrupt masking. */
    491     VMMRC_DO_TESTCASE_INTERRUPT_MASKING,
    492     /** Switching testing and profiling stub. */
    493     VMMRC_DO_TESTCASE_HM_NOP,
    494 
    495     /** The usual 32-bit hack. */
    496     VMMRC_DO_32_BIT_HACK = 0x7fffffff
    497 } VMMRCOPERATION;
    498 
    499 
    500 
    501 /**
    502  * MSR test result entry.
    503  */
    504 typedef struct VMMTESTMSRENTRY
    505 {
    506     /** The MSR number, including padding.
    507      * Set to UINT64_MAX if invalid MSR. */
    508     uint64_t    uMsr;
    509     /** The register value. */
    510     uint64_t    uValue;
    511 } VMMTESTMSRENTRY;
    512 /** Pointer to an MSR test result entry. */
    513 typedef VMMTESTMSRENTRY *PVMMTESTMSRENTRY;
    514 
    515 
    516444
    517445RT_C_DECLS_BEGIN
     
    527455
    528456#ifdef IN_RING0
     457
    529458/**
    530459 * World switcher assembly routine.
     
    648577
    649578#endif /* IN_RING0 */
    650 #ifdef IN_RC
    651 
    652 /**
    653  * Internal GC logger worker: Logger wrapper.
    654  */
    655 VMMRCDECL(void) vmmGCLoggerWrapper(const char *pszFormat, ...);
    656 
    657 /**
    658  * Internal GC release logger worker: Logger wrapper.
    659  */
    660 VMMRCDECL(void) vmmGCRelLoggerWrapper(const char *pszFormat, ...);
    661 
    662 /**
    663  * Internal GC logger worker: Flush logger.
    664  *
    665  * @returns VINF_SUCCESS.
    666  * @param   pLogger     The logger instance to flush.
    667  * @remark  This function must be exported!
    668  */
    669 VMMRCDECL(int)  vmmGCLoggerFlush(PRTLOGGERRC pLogger);
    670 
    671 /** @name Trap testcases and related labels.
    672  * @{ */
    673 DECLASM(void)   vmmGCEnableWP(void);
    674 DECLASM(void)   vmmGCDisableWP(void);
    675 DECLASM(int)    vmmGCTestTrap3(void);
    676 DECLASM(int)    vmmGCTestTrap8(void);
    677 DECLASM(int)    vmmGCTestTrap0d(void);
    678 DECLASM(int)    vmmGCTestTrap0e(void);
    679 DECLASM(int)    vmmGCTestTrap0e_FaultEIP(void); /**< a label */
    680 DECLASM(int)    vmmGCTestTrap0e_ResumeEIP(void); /**< a label */
     579
     580RT_C_DECLS_END
     581
    681582/** @} */
    682583
    683 #endif /* IN_RC */
    684 
    685 RT_C_DECLS_END
    686 
    687 /** @} */
    688 
    689584#endif /* !VMM_INCLUDED_SRC_include_VMMInternal_h */
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