VirtualBox

Changeset 100184 in vbox for trunk/include/VBox/vmm/cpum.h


Ignore:
Timestamp:
Jun 16, 2023 6:51:39 AM (18 months ago)
Author:
vboxsync
Message:

VMM: Add a CPUMGetGuestArch() method and PDM device helper to make it easier to determine the guest architecture and not having to deal with the massive CPUMMICROARCH enum, bugref:10385

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpum.h

    r99051 r100184  
    6969    CPUMCPUVENDOR_32BIT_HACK = 0x7fffffff
    7070} CPUMCPUVENDOR;
     71
     72
     73/**
     74 * CPU architecture.
     75 */
     76typedef enum CPUMARCH
     77{
     78    /** Invalid zero value. */
     79    kCpumArch_Invalid = 0,
     80    /** x86 based architecture (includes 64-bit). */
     81    kCpumArch_X86,
     82    /** ARM based architecture (includs both AArch32 and AArch64). */
     83    kCpumArch_Arm,
     84
     85    /** @todo RiscV, Mips, ... ;). */
     86
     87    /*
     88     * Unknown.
     89     */
     90    kCpumArch_Unknown,
     91
     92    kCpumArch_32BitHack = 0x7fffffff
     93} CPUMARCH;
    7194
    7295
     
    352375VMMDECL(uint64_t)       CPUMGetGuestFlatSP(PVMCPU pVCpu);
    353376VMMDECL(CPUMCPUVENDOR)  CPUMGetGuestCpuVendor(PVM pVM);
     377VMMDECL(CPUMARCH)       CPUMGetGuestArch(PCVM pVM);
    354378VMMDECL(CPUMMICROARCH)  CPUMGetGuestMicroarch(PCVM pVM);
    355379VMMDECL(void)           CPUMGetGuestAddrWidths(PCVM pVM, uint8_t *pcPhysAddrWidth, uint8_t *pcLinearAddrWidth);
     
    362386
    363387VMMDECL(CPUMCPUVENDOR)  CPUMGetHostCpuVendor(PVM pVM);
     388VMMDECL(CPUMARCH)       CPUMGetHostArch(PCVM pVM);
    364389VMMDECL(CPUMMICROARCH)  CPUMGetHostMicroarch(PCVM pVM);
    365390
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