diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2015-08-04 11:45:02 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2015-08-04 11:45:02 +0000 |
commit | 8d05939dc8e709a06e7ca460657d546e0b548156 (patch) | |
tree | f037bdbdcd041c9092173067e7bf553a2e3f06ba /src/VBox/HostDrivers | |
parent | a02bfc3fdf0da4fa8fed6e4ca864cae9e543e295 (diff) | |
download | VirtualBox-svn-8d05939dc8e709a06e7ca460657d546e0b548156.tar.gz |
supdrvMeasureTscDeltaOne: Shot at the FX-8350 problem - don't measure using cores/modules/threads with adjacent APIC IDs, just like we do on Intel. Exclude bulldozers as FX-8150 experiments (way back) indicated that this was counterproductive there, IIRC.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@57174 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/HostDrivers')
-rw-r--r-- | src/VBox/HostDrivers/Support/SUPDrvGip.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/VBox/HostDrivers/Support/SUPDrvGip.cpp b/src/VBox/HostDrivers/Support/SUPDrvGip.cpp index 14c0f4c6621..837ea06e544 100644 --- a/src/VBox/HostDrivers/Support/SUPDrvGip.cpp +++ b/src/VBox/HostDrivers/Support/SUPDrvGip.cpp @@ -3726,6 +3726,7 @@ static int supdrvMeasureTscDeltaOne(PSUPDRVDEVEXT pDevExt, uint32_t idxWorker) PSUPGIPCPU pGipCpuWorker = &pGip->aCPUs[idxWorker]; PSUPGIPCPU pGipCpuMaster; uint32_t iGipCpuMaster; + uint32_t u32Tmp; /* Validate input a bit. */ AssertReturn(pGip, VERR_INVALID_PARAMETER); @@ -3768,11 +3769,14 @@ static int supdrvMeasureTscDeltaOne(PSUPDRVDEVEXT pDevExt, uint32_t idxWorker) AssertReturn(iGipCpuMaster < pGip->cCpus, VERR_INVALID_CPU_ID); pGipCpuMaster = &pGip->aCPUs[iGipCpuMaster]; if ( ( (pGipCpuMaster->idApic & ~1) == (pGipCpuWorker->idApic & ~1) + && pGip->cOnlineCpus > 2 && ASMHasCpuId() && ASMIsValidStdRange(ASMCpuId_EAX(0)) && (ASMCpuId_EDX(1) & X86_CPUID_FEATURE_EDX_HTT) - && !ASMIsAmdCpu() - && pGip->cOnlineCpus > 2) + && ( !ASMIsAmdCpu() + || ASMGetCpuFamily(u32Tmp = ASMCpuId_EAX(1)) > 0x15 + || ( ASMGetCpuFamily(u32Tmp) == 0x15 /* Piledriver+, not bulldozer (FX-4150 didn't like it). */ + && ASMGetCpuModelAMD(u32Tmp) >= 0x02) ) ) || !RTMpIsCpuOnline(idMaster) ) { uint32_t i; |