Changeset 80274 in vbox for trunk/src/VBox/VMM/VMMR0/EMR0.cpp
- Timestamp:
- Aug 14, 2019 2:34:38 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132727
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/EMR0.cpp
r78431 r80274 20 20 * Header Files * 21 21 *********************************************************************************************************************************/ 22 #define VBOX_BUGREF_9217_PART_I 22 23 #define LOG_GROUP LOG_GROUP_EM 23 24 #include <VBox/vmm/em.h> 24 25 #include "EMInternal.h" 25 #include <VBox/vmm/vm .h>26 #include <VBox/vmm/vmcc.h> 26 27 #include <VBox/vmm/gvm.h> 27 28 #include <iprt/errcore.h> … … 41 42 #ifdef VBOX_BUGREF_9217 42 43 VMMR0_INT_DECL(int) EMR0InitVM(PGVM pGVM) 43 # define pVM pGVM /* temp hack */44 44 #else 45 VMMR0_INT_DECL(int) EMR0InitVM(PGVM pGVM, PVM pVM)45 VMMR0_INT_DECL(int) EMR0InitVM(PGVM pGVM, PVMCC pVM) 46 46 #endif 47 47 { … … 49 49 * Override ring-0 exit optimizations settings. 50 50 */ 51 bool fEnabledR0 = pVM->aCpus[0].em.s.fExitOptimizationEnabled 52 && pVM->aCpus[0].em.s.fExitOptimizationEnabledR0 51 #ifdef VBOX_BUGREF_9217 52 PVMCPUCC pVCpu0 = &pGVM->aCpus[0]; 53 #else 54 PVMCPUCC pVCpu0 = VMCC_GET_CPU_0(pVM); 55 #endif 56 57 bool fEnabledR0 = pVCpu0->em.s.fExitOptimizationEnabled 58 && pVCpu0->em.s.fExitOptimizationEnabledR0 53 59 && (RTThreadPreemptIsPossible() || RTThreadPreemptIsPendingTrusty()); 54 60 bool fEnabledR0PreemptDisabled = fEnabledR0 55 && pV M->aCpus[0].em.s.fExitOptimizationEnabledR0PreemptDisabled61 && pVCpu0->em.s.fExitOptimizationEnabledR0PreemptDisabled 56 62 && RTThreadPreemptIsPendingTrusty(); 63 for (VMCPUID idCpu = 0; idCpu < pGVM->cCpus; idCpu++) 64 { 57 65 #ifdef VBOX_BUGREF_9217 58 for (VMCPUID i = 0; i < pGVM->cCpusSafe; i++)66 PVMCPUCC pVCpu = &pGVM->aCpus[idCpu]; 59 67 #else 60 for (VMCPUID i = 0; i < pGVM->cCpus; i++)68 PVMCPUCC pVCpu = VMCC_GET_CPU(pVM, idCpu); 61 69 #endif 62 { 63 pVM->aCpus[i].em.s.fExitOptimizationEnabledR0 = fEnabledR0; 64 pVM->aCpus[i].em.s.fExitOptimizationEnabledR0PreemptDisabled = fEnabledR0PreemptDisabled; 70 pVCpu->em.s.fExitOptimizationEnabledR0 = fEnabledR0; 71 pVCpu->em.s.fExitOptimizationEnabledR0PreemptDisabled = fEnabledR0PreemptDisabled; 65 72 } 66 73
Note:
See TracChangeset
for help on using the changeset viewer.