VirtualBox

Ignore:
Timestamp:
Nov 11, 2019 3:23:46 PM (5 years ago)
Author:
vboxsync
Message:

SUPDrv,tstRTInlineAsm: Fixed assertion/failure when trying to use the 0x0b leaf for APIC ID on AMD boxes. bugref:9501

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp

    r81613 r81762  
    200200    if (uOther >= UINT32_C(0xb) && ASMIsValidStdRange(uOther))
    201201    {
    202         uOther = ASMGetApicIdExt0B();
    203         if ((uOther & 0xff) == idApic)
    204             return uOther;
    205         AssertMsgFailed(("ASMGetApicIdExt0B=>%#x idApic=%#x\n", uOther, idApic));
     202        uint32_t uEax = 0;
     203        uint32_t uEbx = 0;
     204        uint32_t uEcx = 0;
     205        uint32_t uEdx = 0;
     206#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
     207        ASMCpuId_Idx_ECX(0xb, 0, &uEax, &uEbx, &uEcx, &uEdx);
     208#else
     209        ASMCpuIdExSlow(0xb, 0, 0, 0, &uEax, &uEbx, &uEcx, &uEdx);
     210#endif
     211        if ((uEcx >> 8) != 0) /* level type != invalid */
     212        {
     213            if ((uEdx & 0xff) == idApic)
     214                return uEdx;
     215            AssertMsgFailed(("ASMGetApicIdExt0B=>%#x idApic=%#x\n", uEdx, idApic));
     216        }
    206217    }
    207218
     
    401412        ASMCpuIdExSlow(0xb, 0, 0, 0, &uEax, &uEbx, &uEcx, &uEdx);
    402413#endif
    403         if (uEax || uEbx || uEcx || uEdx)
     414        if ((uEcx >> 8) != 0) /* level type != invalid */
    404415        {
    405416            if (RT_LIKELY(   uEdx < RT_ELEMENTS(pGip->aiCpuFromApicId)
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