VirtualBox

Changeset 72866 in vbox


Ignore:
Timestamp:
Jul 4, 2018 10:42:51 AM (7 years ago)
Author:
vboxsync
Message:

IEM,CPUM: Can use LogRel in ring-0 too now and have it go to VBox.log.

Location:
trunk/src/VBox/VMM
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp

    r72634 r72866  
    645645        return VINF_SUCCESS;
    646646    }
    647 #ifdef IN_RING3
    648647    LogRel(("CPUM: IA32_SYSENTER_EIP not canonical! %#llx\n", uValue));
    649 #else
    650     Log(("CPUM: IA32_SYSENTER_EIP not canonical! %#llx\n", uValue));
    651 #endif
    652648    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange); RT_NOREF_PV(uRawValue);
    653649    return VERR_CPUM_RAISE_GP_0;
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

    r72688 r72866  
    62546254        return rcStrict;
    62556255    }
    6256 #else /* IN_RING3 */
     6256#endif
     6257
    62576258    /* Often a unimplemented MSR or MSR bit, so worth logging. */
    6258     static uint32_t s_cTimes = 0;
    6259     if (s_cTimes++ < 10)
     6259    if (pVCpu->iem.s.cLogRelRdMsr < 32)
     6260    {
     6261        pVCpu->iem.s.cLogRelRdMsr++;
    62606262        LogRel(("IEM: rdmsr(%#x) -> #GP(0)\n", pVCpu->cpum.GstCtx.ecx));
     6263    }
    62616264    else
    6262 #endif
    6263         Log(("IEM: rdmsr(%#x) -> #GP(0)\n", pVCpu->cpum.GstCtx.ecx));
     6265        Log((   "IEM: rdmsr(%#x) -> #GP(0)\n", pVCpu->cpum.GstCtx.ecx));
    62646266    AssertMsgReturn(rcStrict == VERR_CPUM_RAISE_GP_0, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)), VERR_IPE_UNEXPECTED_STATUS);
    62656267    return iemRaiseGeneralProtectionFault0(pVCpu);
     
    63186320        return rcStrict;
    63196321    }
    6320 #else /* IN_RING3 */
     6322#endif
     6323
    63216324    /* Often a unimplemented MSR or MSR bit, so worth logging. */
    6322     static uint32_t s_cTimes = 0;
    6323     if (s_cTimes++ < 10)
     6325    if (pVCpu->iem.s.cLogRelWrMsr < 32)
     6326    {
     6327        pVCpu->iem.s.cLogRelWrMsr++;
    63246328        LogRel(("IEM: wrmsr(%#x,%#x`%08x) -> #GP(0)\n", pVCpu->cpum.GstCtx.ecx, uValue.s.Hi, uValue.s.Lo));
     6329    }
    63256330    else
    6326 #endif
    6327         Log(("IEM: wrmsr(%#x,%#x`%08x) -> #GP(0)\n", pVCpu->cpum.GstCtx.ecx, uValue.s.Hi, uValue.s.Lo));
     6331        Log((   "IEM: wrmsr(%#x,%#x`%08x) -> #GP(0)\n", pVCpu->cpum.GstCtx.ecx, uValue.s.Hi, uValue.s.Lo));
    63286332    AssertMsgReturn(rcStrict == VERR_CPUM_RAISE_GP_0, ("%Rrc\n", VBOXSTRICTRC_VAL(rcStrict)), VERR_IPE_UNEXPECTED_STATUS);
    63296333    return iemRaiseGeneralProtectionFault0(pVCpu);
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r72643 r72866  
    598598    /** @} */
    599599
    600     uint32_t                au32Alignment8[HC_ARCH_BITS == 64 ? 4 + 8 : 4]; /**< Alignment padding. */
     600    /** Counts RDMSR \#GP(0) LogRel(). */
     601    uint8_t                 cLogRelRdMsr;
     602    /** Counts WRMSR \#GP(0) LogRel(). */
     603    uint8_t                 cLogRelWrMsr;
     604    /** Alignment padding. */
     605    uint8_t                 abAlignment8[HC_ARCH_BITS == 64 ? 46 : 14];
    601606
    602607    /** Data TLB.
  • trunk/src/VBox/VMM/testcase/tstVMStruct.h

    r72643 r72866  
    305305    GEN_CHECK_OFF(IEMCPU, aMemBbMappings);
    306306    GEN_CHECK_OFF(IEMCPU, aMemBbMappings[1]);
     307    GEN_CHECK_OFF(IEMCPU, cLogRelRdMsr);
     308    GEN_CHECK_OFF(IEMCPU, cLogRelWrMsr);
    307309    GEN_CHECK_OFF(IEMCPU, DataTlb);
    308310    GEN_CHECK_OFF(IEMCPU, CodeTlb);
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