Changeset 19076 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 21, 2009 1:20:48 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r19032 r19076 1644 1644 { 1645 1645 uint32_t u32Dummy, u32Features, u32ExtFeatures; 1646 CPUMGetGuestCpuId(pV M, 1, &u32Dummy, &u32Dummy, &u32ExtFeatures, &u32Features);1646 CPUMGetGuestCpuId(pVCpu, 1, &u32Dummy, &u32Dummy, &u32ExtFeatures, &u32Features); 1647 1647 if (u32ExtFeatures & X86_CPUID_FEATURE_ECX_MONITOR) 1648 1648 { … … 3100 3100 uint32_t u32Dummy, u32Features; 3101 3101 3102 CPUMGetGuestCpuId(pV M, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features);3102 CPUMGetGuestCpuId(pVCpu, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features); 3103 3103 if (!(u32Features & X86_CPUID_FEATURE_EDX_PAE)) 3104 3104 return EMSTATE_REM; -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r19041 r19076 2535 2535 AssertPtr(pEax); AssertPtr(pEbx); AssertPtr(pEcx); AssertPtr(pEdx); 2536 2536 2537 CPUMGetGuestCpuId( pDevIns->Internal.s.pVMR3, iLeaf, pEax, pEbx, pEcx, pEdx);2537 CPUMGetGuestCpuId(VMMGetCpu(pDevIns->Internal.s.pVMR3), iLeaf, pEax, pEbx, pEcx, pEdx); 2538 2538 2539 2539 LogFlow(("pdmR3DevHlp_GetCpuId: caller='%s'/%d: returns void - *pEax=%#x *pEbx=%#x *pEcx=%#x *pEdx=%#x\n", -
trunk/src/VBox/VMM/PGM.cpp
r19044 r19076 1941 1941 /** @todo How to test for the 40 bits support? Long mode seems to be the test criterium. */ 1942 1942 uint32_t u32Dummy, u32Features; 1943 CPUMGetGuestCpuId( pVM, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features);1943 CPUMGetGuestCpuId(VMMGetCpu(pVM), 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features); 1944 1944 1945 1945 if (u32Features & X86_CPUID_FEATURE_EDX_PSE36) … … 3976 3976 uint32_t u32Dummy, u32Features; 3977 3977 3978 CPUMGetGuestCpuId( pVM, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features);3978 CPUMGetGuestCpuId(VMMGetCpu(pVM), 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features); 3979 3979 if (!(u32Features & X86_CPUID_FEATURE_EDX_PAE)) 3980 3980 return VMSetRuntimeError(pVM, VMSETRTERR_FLAGS_FATAL, "PAEmode", -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r19075 r19076 1044 1044 * Gets a CpuId leaf. 1045 1045 * 1046 * @param pV M The VMhandle.1046 * @param pVCpu The VMCPU handle. 1047 1047 * @param iLeaf The CPUID leaf to get. 1048 1048 * @param pEax Where to store the EAX value. … … 1051 1051 * @param pEdx Where to store the EDX value. 1052 1052 */ 1053 VMMDECL(void) CPUMGetGuestCpuId(PVM pVM, uint32_t iLeaf, uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx) 1054 { 1053 VMMDECL(void) CPUMGetGuestCpuId(PVMCPU pVCpu, uint32_t iLeaf, uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx) 1054 { 1055 PVM pVM = pVCpu->CTX_SUFF(pVM); 1056 1055 1057 PCCPUMCPUID pCpuId; 1056 1058 if (iLeaf < RT_ELEMENTS(pVM->cpum.s.aGuestCpuIdStd)) … … 1067 1069 *pEcx = pCpuId->ecx; 1068 1070 *pEdx = pCpuId->edx; 1071 1072 if ( iLeaf == 1 1073 && pVM->cCPUs > 1) 1074 { 1075 /* Bits 31-24: Initial APIC ID */ 1076 Assert(pVCpu->idCpu <= 255); 1077 *pEbx |= (pVCpu->idCpu << 24); 1078 } 1079 1069 1080 Log2(("CPUMGetGuestCpuId: iLeaf=%#010x %RX32 %RX32 %RX32 %RX32\n", iLeaf, *pEax, *pEbx, *pEcx, *pEdx)); 1070 1081 } -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r19032 r19076 1945 1945 1946 1946 /* Note: operates the same in 64 and non-64 bits mode. */ 1947 CPUMGetGuestCpuId(pV M, iLeaf, &pRegFrame->eax, &pRegFrame->ebx, &pRegFrame->ecx, &pRegFrame->edx);1947 CPUMGetGuestCpuId(pVCpu, iLeaf, &pRegFrame->eax, &pRegFrame->ebx, &pRegFrame->ecx, &pRegFrame->edx); 1948 1948 Log(("Emulate: CPUID %x -> %08x %08x %08x %08x\n", iLeaf, pRegFrame->eax, pRegFrame->ebx, pRegFrame->ecx, pRegFrame->edx)); 1949 1949 return VINF_SUCCESS; … … 2657 2657 return VERR_EM_INTERPRETER; /* supervisor only */ 2658 2658 2659 CPUMGetGuestCpuId(pV M, 1, &u32Dummy, &u32Dummy, &u32ExtFeatures, &u32Dummy);2659 CPUMGetGuestCpuId(pVCpu, 1, &u32Dummy, &u32Dummy, &u32ExtFeatures, &u32Dummy); 2660 2660 if (!(u32ExtFeatures & X86_CPUID_FEATURE_ECX_MONITOR)) 2661 2661 return VERR_EM_INTERPRETER; /* not supported */ … … 2681 2681 return VERR_EM_INTERPRETER; /* supervisor only */ 2682 2682 2683 CPUMGetGuestCpuId(pV M, 1, &u32Dummy, &u32Dummy, &u32ExtFeatures, &u32Dummy);2683 CPUMGetGuestCpuId(pVCpu, 1, &u32Dummy, &u32Dummy, &u32ExtFeatures, &u32Dummy); 2684 2684 if (!(u32ExtFeatures & X86_CPUID_FEATURE_ECX_MONITOR)) 2685 2685 return VERR_EM_INTERPRETER; /* not supported */ … … 2792 2792 return VERR_EM_INTERPRETER; /* supervisor only */ 2793 2793 2794 CPUMGetGuestCpuId(pV M, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features);2794 CPUMGetGuestCpuId(pVCpu, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features); 2795 2795 if (!(u32Features & X86_CPUID_FEATURE_EDX_MSR)) 2796 2796 return VERR_EM_INTERPRETER; /* not supported */ … … 2926 2926 return VERR_EM_INTERPRETER; /* supervisor only */ 2927 2927 2928 CPUMGetGuestCpuId(pV M, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features);2928 CPUMGetGuestCpuId(pVCpu, 1, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features); 2929 2929 if (!(u32Features & X86_CPUID_FEATURE_EDX_MSR)) 2930 2930 return VERR_EM_INTERPRETER; /* not supported */ … … 2963 2963 2964 2964 /* Filter out those bits the guest is allowed to change. (e.g. LMA is read-only) */ 2965 CPUMGetGuestCpuId(pV M, 0x80000001, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features);2965 CPUMGetGuestCpuId(pVCpu, 0x80000001, &u32Dummy, &u32Dummy, &u32Dummy, &u32Features); 2966 2966 if (u32Features & X86_CPUID_AMD_FEATURE_EDX_NX) 2967 2967 uMask |= MSR_K6_EFER_NXE;
Note:
See TracChangeset
for help on using the changeset viewer.