VirtualBox

Changeset 10088 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jul 2, 2008 9:37:35 AM (16 years ago)
Author:
vboxsync
Message:

Log MSR names

File:
1 edited

Legend:

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

    r10016 r10088  
    21952195}
    21962196
     2197#ifdef LOG_ENABLED
     2198static const char *emMSRtoString(unsigned uMsr)
     2199{
     2200    switch(uMsr)
     2201    {
     2202    case MSR_IA32_APICBASE:
     2203        return "MSR_IA32_APICBASE";
     2204    case MSR_IA32_CR_PAT:
     2205        return "MSR_IA32_CR_PAT";
     2206    case MSR_IA32_SYSENTER_CS:
     2207        return "MSR_IA32_SYSENTER_CS";
     2208    case MSR_IA32_SYSENTER_EIP:
     2209        return "MSR_IA32_SYSENTER_EIP";
     2210    case MSR_IA32_SYSENTER_ESP:
     2211        return "MSR_IA32_SYSENTER_ESP";
     2212    case MSR_K6_EFER:
     2213        return "MSR_K6_EFER";
     2214    case MSR_K8_SF_MASK:
     2215        return "MSR_K8_SF_MASK";
     2216    case MSR_K6_STAR:
     2217        return "MSR_K6_STAR";
     2218    case MSR_K8_LSTAR:
     2219        return "MSR_K8_LSTAR";
     2220    case MSR_K8_CSTAR:
     2221        return "MSR_K8_CSTAR";
     2222    case MSR_K8_FS_BASE:
     2223        return "MSR_K8_FS_BASE";
     2224    case MSR_K8_GS_BASE:
     2225        return "MSR_K8_GS_BASE";
     2226    case MSR_K8_KERNEL_GS_BASE:
     2227        return "MSR_K8_KERNEL_GS_BASE";
     2228    }
     2229    return "Unknown MSR";
     2230}
     2231#endif
     2232
    21972233/**
    21982234 * Interpret RDMSR
     
    22842320        break;
    22852321    }
    2286     Log(("EMInterpretRdmsr %x -> val=%VX64\n", pRegFrame->ecx, val));
     2322    Log(("EMInterpretRdmsr %s (%x) -> val=%VX64\n", emMSRtoString(pRegFrame->ecx), pRegFrame->ecx, val));
    22872323    pRegFrame->eax = (uint32_t) val;
    22882324    pRegFrame->edx = (uint32_t) (val >> 32ULL);
     
    23292365
    23302366    val = (uint64_t)pRegFrame->eax | ((uint64_t)pRegFrame->edx << 32ULL);
    2331     Log(("EMInterpretWrmsr %x val=%VX64\n", pRegFrame->ecx, val));
     2367    Log(("EMInterpretWrmsr %s (%x) val=%VX64\n", emMSRtoString(pRegFrame->ecx), pRegFrame->ecx, val));
    23322368    switch (pRegFrame->ecx)
    23332369    {
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