VirtualBox

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


Ignore:
Timestamp:
Sep 13, 2023 11:42:14 AM (15 months ago)
Author:
vboxsync
Message:

VMM: Started implemented the CPU ID parsing and overriding bits as well as logging host and guest CPU features, bugref:10525

Location:
trunk/src/VBox/VMM
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r100752 r101103  
    365365        VMMR3/CPUM-armv8.cpp \
    366366        VMMR3/CPUMDbg-armv8.cpp \
     367        VMMR3/CPUMR3CpuId-armv8.cpp \
    367368        VMMR3/CPUMR3Db-armv8.cpp \
    368369        VMMR3/DBGF.cpp \
  • trunk/src/VBox/VMM/VMMR3/CPUM-armv8.cpp

    r100755 r101103  
    128128*   Global Variables                                                                                                             *
    129129*********************************************************************************************************************************/
     130#if defined(RT_ARCH_ARM64)
     131/** Host CPU features. */
     132DECL_HIDDEN_DATA(CPUHOSTFEATURES) g_CpumHostFeatures;
     133#endif
     134
    130135/**
    131136 * System register ranges.
     
    375380    DBGFR3InfoRegisterInternalEx(pVM, "cpumguest",        "Displays the guest cpu state.",
    376381                                 &cpumR3InfoGuest, DBGFINFO_FLAGS_ALL_EMTS);
     382    DBGFR3InfoRegisterInternalEx(pVM, "cpumguestinstr",   "Displays the current guest instruction.",
     383                                 &cpumR3InfoGuestInstr, DBGFINFO_FLAGS_ALL_EMTS);
     384    DBGFR3InfoRegisterInternal(  pVM, "cpuid",            "Displays the guest cpuid information.",
     385                                 &cpumR3CpuIdInfo);
    377386
    378387    rc = cpumR3DbgInit(pVM);
     
    949958    if (cCores)
    950959        LogRel(("CPUM: Physical host cores: %u\n", (unsigned)cCores));
    951     RT_NOREF(pVM);
    952 #if 0 /** @todo Someting similar. */
    953960    LogRel(("************************* CPUID dump ************************\n"));
    954961    DBGFR3Info(pVM->pUVM, "cpuid", "verbose", DBGFR3InfoLogRelHlp());
     
    956963    DBGFR3_INFO_LOG_SAFE(pVM, "cpuid", "verbose"); /* macro */
    957964    LogRel(("******************** End of CPUID dump **********************\n"));
    958 #endif
    959965
    960966    /*
  • trunk/src/VBox/VMM/include/CPUMInternal-armv8.h

    r99383 r101103  
    100100typedef struct CPUM
    101101{
     102    /** The (more) portable CPUID level. */
     103    uint8_t                 u8PortableCpuIdLevel;
    102104    /** Indicates that a state restore is pending.
    103105     * This is used to verify load order dependencies (PGM). */
    104106    bool                    fPendingRestore;
    105     uint8_t                 abPadding0[7];
     107    uint8_t                 abPadding0[6];
    106108
     109    /** Align to 64-byte boundary. */
     110    uint8_t                 abPadding1[56];
     111
     112    /** Host CPU feature information.
     113     * Externaly visible via the VM structure, aligned on 64-byte boundrary. */
     114    CPUMFEATURES            HostFeatures;
     115    /** Guest CPU feature information.
     116     * Externaly visible via that VM structure, aligned with HostFeatures. */
     117    CPUMFEATURES            GuestFeatures;
    107118    /** Guest CPU info. */
    108119    CPUMINFO                GuestInfo;
    109     /** @todo */
     120    /** Host CPU ID registers. */
     121    CPUMIDREGS              HostIdRegs;
     122    /** Guest CPU ID registers. */
     123    CPUMIDREGS              GuestIdRegs;
    110124
    111125    /** @name System register statistics.
     
    121135} CPUM;
    122136#ifndef VBOX_FOR_DTRACE_LIB
    123 /** @todo Compile time size/alignment assertions. */
     137AssertCompileMemberOffset(CPUM, HostFeatures, 64);
     138AssertCompileMemberOffset(CPUM, GuestFeatures, 112);
    124139#endif
    125140/** Pointer to the CPUM instance data residing in the shared VM structure. */
     
    159174DECLHIDDEN(int)       cpumR3DbgInit(PVM pVM);
    160175DECLHIDDEN(int)       cpumR3SysRegStrictInitChecks(void);
     176
     177DECLCALLBACK(void)    cpumR3CpuIdInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    161178# endif
    162179
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