VirtualBox

Changeset 49728 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Nov 29, 2013 2:12:56 PM (11 years ago)
Author:
vboxsync
Message:

MSR prober fixes.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r49634 r49728  
    51895189            else if (rc == VERR_ACCESS_DENIED)
    51905190            {
    5191                 pReq->u.Out.uResults.Read.fGp    = true;
     5191                pReq->u.Out.uResults.Write.fGp   = true;
    51925192                rc  = VINF_SUCCESS;
    51935193            }
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r49642 r49728  
    868868
    869869    if (idCpu == NIL_RTCPUID)
    870         idCpu = RTMpCpuId();
    871     else if (!RTMpIsCpuOnline(idCpu))
     870        rc = rdmsr_safe(uMsr, &u32Low, &u32High);
     871    else if (RTMpIsCpuOnline(idCpu))
     872        rc = rdmsr_safe_on_cpu(idCpu, uMsr, &u32Low, &u32High);
     873    else
    872874        return VERR_CPU_OFFLINE;
    873     rc = rdmsr_safe_on_cpu(idCpu, uMsr, &u32Low, &u32High);
    874     if (rc >= 0)
     875    if (rc == 0)
    875876    {
    876877        *puValue = RT_MAKE_U64(u32Low, u32High);
     
    890891
    891892    if (idCpu == NIL_RTCPUID)
    892         idCpu = RTMpCpuId();
    893     else if (!RTMpIsCpuOnline(idCpu))
     893        rc = wrmsr_safe(uMsr, RT_LODWORD(uValue), RT_HIDWORD(uValue));
     894    else if (RTMpIsCpuOnline(idCpu))
     895        rc = wrmsr_safe_on_cpu(idCpu, uMsr, RT_LODWORD(uValue), RT_HIDWORD(uValue));
     896    else
    894897        return VERR_CPU_OFFLINE;
    895     rc = wrmsr_safe_on_cpu(idCpu, uMsr, RT_LODWORD(uValue), RT_HIDWORD(uValue));
    896     if (rc >= 0)
     898    if (rc == 0)
    897899        return VINF_SUCCESS;
    898900    return VERR_ACCESS_DENIED;
     
    958960    pReq->u.Out.uResults.Modify.uWritten   = uWritten;
    959961    pReq->u.Out.uResults.Modify.uAfter     = uAfter;
    960     pReq->u.Out.uResults.Modify.fBeforeGp  = rcBefore  < 0;
    961     pReq->u.Out.uResults.Modify.fModifyGp  = rcWrite   < 0;
    962     pReq->u.Out.uResults.Modify.fAfterGp   = rcAfter   < 0;
    963     pReq->u.Out.uResults.Modify.fRestoreGp = rcRestore < 0;
     962    pReq->u.Out.uResults.Modify.fBeforeGp  = rcBefore  != 0;
     963    pReq->u.Out.uResults.Modify.fModifyGp  = rcWrite   != 0;
     964    pReq->u.Out.uResults.Modify.fAfterGp   = rcAfter   != 0;
     965    pReq->u.Out.uResults.Modify.fRestoreGp = rcRestore != 0;
    964966    RT_ZERO(pReq->u.Out.uResults.Modify.afReserved);
    965967}
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